You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to run a custom cleaner (cleanerML), unexpectedly few files are found when compared to running the "same" custom cleaner against a synthesised copy of the original directory tree.
The error/behaviour is consistent on every execution.
My speculation is that it may be due to the cleaner hitting a permission issue and then failing completely, rather than attempting the next object. However it may be behaviour by design or a fat-fingered operator misunderstanding issue.
Note: This is being run against a VM, hence "damage" to the file system is not an issue. Note: In this development all I am doing is using the "Preview" facility, not the "Clean" function.
The cleaner is designed to search for files using a regex - finding file that match the pattern "*.log"
"testcleaner1" - Cleaner XML:
Logged in to Windows desktop as a "normal" user - not a member of the "administrators" group.
As an administrator user, start up a dos prompt ("Run as administrator").
CAUTION: Don't carry out the next step unless you are on an expendable resource.
Use the script below to drop some files into the folder structure "C:\Windows\System32":
REM
REM Put some dummy log files into the folder structure.
REM
echo "Test" > C:\Windows\System32\LogFiles\setupcln\tmp.log
echo "Test" > C:\Windows\System32\tmp.log
echo "Test" > C:\Windows\System32\SleepStudy\ScreenOn\tmp.log
echo "Test" > C:\Windows\System32\Sysprep\Panther\tmp.log
echo "Test" > C:\Windows\System32\LogFile\setupcln\tmp.log
mkdir C:\Windows\System32\tlog
echo "Test" > C:\Windows\System32\tlog\tmp.log
REM
dir /s C:\Windows\System32\*.log
REM
... These "tmp.log" files should be locatable by the cleaner.
As a non admin user, BleachBit is started ("BleachBit", not "BleachBit no UAC").
At the UAC, an admin user/password is supplied.
The option "Hide irrelevant cleaners" is unticked, so the cleaner ("cleanertest1.xml") becomes available.
All other cleaners are deselected, so that "cleanertest1" is the only cleaner selected.
The "Preview" option is chosen and the cleaner executes.
Disk space to be recovered: 15.2kB
Files to be deleted: 3
elapsed time: 3 seconds
... But I would expect to see more (including more of the synthesised ones, created in the first step).
Close BleachBit.
I then copied the contents of "C:\Windows\System32" to "C:\Temp\Windows\System00", providing admin authentication and skipping any "issue" files.
The cleaner ("testcleaner1.xml") is then modified to point at "C:\Temp\Windows\System00" Create a second cleaner, containing the above modification, if more convienent.
As a non admin user, BleachBit is started ("BleachBit", not "BleachBit not UAC").
At the UAC, an admin user/password is supplied.
The "Preview" option is chosen and the cleaner executes.
Disk space to be recovered: 5.8MB
Files to be deleted: 28
elapsed time: 6 seconds
Expected behaviour
The cleaner is expected to find the files or detail permission failures and continue to the next object.
Observations and notes
If we consider one of the dummy "tmp.log" files we created in the path "C:\Windows\System32\Sysprep\Panther":
... we find it can be opened by a normal user (not member of the "administrator" group):
On attempting to save a modification to the above, we see a warning:
C:\Windows\System32\Sysprep\Panther\tmp.log
You do not have permission to open this file. See the owner of the file or an adminsitrator to obtain permission.
The folder is visible if the same user attempts a "dir" command:
dir C:\Windows\System32\Sysprep\Panther
Output:
Volume in drive C is SYSTEM
Volume Serial Number is 3E7D-AC3A
When attempting to run a custom cleaner (cleanerML), unexpectedly few files are found when compared to running the "same" custom cleaner against a synthesised copy of the original directory tree.
The error/behaviour is consistent on every execution.
My speculation is that it may be due to the cleaner hitting a permission issue and then failing completely, rather than attempting the next object. However it may be behaviour by design or a fat-fingered operator misunderstanding issue.
Note: This is being run against a VM, hence "damage" to the file system is not an issue.
Note: In this development all I am doing is using the "Preview" facility, not the "Clean" function.
The cleaner is designed to search for files using a regex - finding file that match the pattern "*.log"
"testcleaner1" - Cleaner XML:
To Reproduce
... These "tmp.log" files should be locatable by the cleaner.
On my system I see 3 or 4 candidate files:
... But I would expect to see more (including more of the synthesised ones, created in the first step).
I then copied the contents of "C:\Windows\System32" to "C:\Temp\Windows\System00", providing admin authentication and skipping any "issue" files.
The cleaner ("testcleaner1.xml") is then modified to point at "C:\Temp\Windows\System00"
Create a second cleaner, containing the above modification, if more convienent.
This time far more files are found:
Expected behaviour
The cleaner is expected to find the files or detail permission failures and continue to the next object.
Observations and notes
If we consider one of the dummy "tmp.log" files we created in the path "C:\Windows\System32\Sysprep\Panther":
... we find it can be opened by a normal user (not member of the "administrator" group):
On attempting to save a modification to the above, we see a warning:
The folder is visible if the same user attempts a "dir" command:
Output:
Desktop (please complete the following information):
Windows 10 Pro x64 running under VMWare Player hypervisor.
BleachBit version 4.6.0
Build number 2537
GTK version 3.18.9
GTK theme = Adwaita
GTK icon theme = Adwaita
GTK prefer dark theme = True
SQLite version 3.43.2
local_cleaners_dir = None
locale_dir = C:\Program Files (x86)\BleachBit\share\locale
options_dir = C:\Users\Chris Bennett\AppData\Roaming\BleachBit
personal_cleaners_dir = C:\Users\Chris Bennett\AppData\Roaming\BleachBit\cleaners
system_cleaners_dir = C:\Program Files (x86)\BleachBit\share\cleaners
locale.getdefaultlocale = ('en_GB', 'cp1252')
os.getenv('APPDATA') = C:\Users\Chris Bennett\AppData\Roaming
os.getenv('cd') = C:\Program Files (x86)\BleachBit
os.getenv('LocalAppData') = C:\Users\Chris Bennett\AppData\Local
os.getenv('LocalAppDataLow') = C:\Users\Chris Bennett\AppData\LocalLow
os.getenv('Music') = C:\Users\Chris Bennett\Music
os.getenv('USERPROFILE') = C:\Users\Chris Bennett
os.getenv('ProgramFiles') = C:\Program Files (x86)
os.getenv('ProgramW6432') = C:\Program Files
os.getenv('TMP') = C:\Users\CHRISB
1\AppData\Local\Temp') = C:\Users\Chris Bennettos.path.expanduser('
platform.win32_ver1 = 10.0.19041
platform.platform = Windows-10-10.0.19041
platform.version = 10.0.19041
sys.argv = ['C:\Program Files (x86)\BleachBit\bleachbit.exe', '--no-uac', '--gui']
sys.executable = C:\Program Files (x86)\BleachBit\bleachbit.exe
sys.version = 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (Intel)]
win32com.shell.shell.IsUserAnAdmin() = False
file = C:\Program Files (x86)\BleachBit\library.zip\bleachbit\SystemInformation.pyo
The text was updated successfully, but these errors were encountered: