Potentially system destroying bug in the include custom files and folders option

I was playing around with the custom files and folders option and I discovered a timebomb waiting to happen. the option to include files subfolders and the folder it'sself has a nasty side effect that could potentially destroy a vista or 7 based machine depending on the user rights.

any way my mac created a bunch of trash files on my network drive the infamous .Ds_Store nuscances. i configured ccleaner to remove these useless files from all shared drives on my system. after running the process it gave me a small list of deletions.

i has selected the include folder it;sself because i had an exess of new folders as well that i could do away with. any way i first noticed this issue when a game i had installed would not run. upon further inspection i noticed several other folders were missing. the one thing that all these broken folders had in common was that they were Junctions i had created in my program files folder to run several applications off of my raid set.

the only conclusion i can draw is that ccleaner views the mount point for a ntfs junction as a empty folder and removes it.

so in all it is my sole belife that the only reason i did not suffer a catastrophic failure was because i was running XP the aftermath involved maby 5 minutes recreating the lost junction points and resetting ccleaner to not remove empty folders on the custom sweep.

it is also my concern that since windows vista and windows 7 use large numbers of junction points as part of it;s reverse compatability system that such a error could result in the complete destruction of a system that makes libral use of ntfs junctions within the operating system.

ccleaner should have better detection and handeling of junctions and hardlinks so that this doesent happen in the future.

Are you running ccleaner for mac?

the one thing that all these broken folders had in common was that they were Junctions i had created in my program files folder to run several applications off of my raid set.

Perhaps you did not adequately protect what you created.

Microsoft warn that Junctions should be protected via Access Control List, otherwise deleting a Junction can destroy all that it connected to.

I also believe that when Junction provides READ but not DELETE access to a file, it may permit WRITE and/or SECURE DELETE.

There was a complaint a year or two ago that someone used Secure Delete on Windows.Old.

I believe the Junctions in Windows.Old that once designated documents and music etc. within the previous Windows did not point at Music.Old etc,

but designated the current music which he had not expected to lose.

I have added my own Junctions to both XP and Windows 7, but I treat with care.

When using Secure Delete then "all bets are off".

well most of the time deleting the mount point of the junction does not delete the destination it is only when you open the junction and start deleting folders within. but mostly my complint is the link breaking. either way ccleaner should be smart enough to recurse through the junction and realise that it is not an empty folder. there is really no excuse fo such a mistake

Are you running ccleaner for mac?

no. infact junctions are something only ntfs has mac and linux use something called hard or symlinks which do basicly the same thing

I asked because you said...

any way my mac created a bunch of trash files on my network drive the infamous .Ds_Store nuscances. i configured ccleaner to remove these useless files from all shared drives on my system. after running the process it gave me a small list of deletions

you also mentioned you used xp and talked about Vista and Windows 7.

Perhaps a clearer post would have helped :)

well most of the time deleting the mount point of the junction does not delete the destination it is only when you open the junction and start deleting folders within. but mostly my complint is the link breaking. either way ccleaner should be smart enough to recurse through the junction and realise that it is not an empty folder. there is really no excuse fo such a mistake

The early warning by Microsoft was before Vista.

I think they may have improved protection.

Launching CMD.EXE under XP I have used Cacls and observed that it has 2 dozen flavours of access restriction,

Obviously some restrictions protect better than others.

I think your judgement on CCleaner is false in every respect :-

1. The idea of Junctions is to fool most applications into thinking the files are where they "ought to be" and be ignorant of reality - needed for backward compatibility;

2. If access is via a Junction then CCleaner has a DUTY to go through the Junction and delete what you included for deletion - you need to be careful.

3. I have just set to include for deletion

C:\Program Files\COMODO\COMODO Internet Security\Repair\Base.cav

I have analysed and CCleaner will do what I told it to do - it will zap the "spare" Antivirus Database,

which actually lives on the secondary drive partition E:\Junctions\Repair\

CCleaner will do no more and no less than what I tell it to do.

4. To do its job CCleaner does not NEED to recognise the difference between a Junction and a real folder.

5. When stipulating the target I had to browse, and when I reached

C:\Program Files\COMODO\COMODO Internet Security\

I saw many folders including Repair, BUT THERE WAS A DISTINCTION,

"Repair" had a curved arrow denoting a Junction/Short-cut which none of the other folders had.

6. CCleaner does not by default remove "empty" folders, despite frequent ill-conceived requests that it should.

I am only aware of empty folders being removed along with full folders if you choose the option

Include Files, sub-folders, and the folder itself.

The early warning by Microsoft was before Vista.

I think they may have improved protection.

Launching CMD.EXE under XP I have used Cacls and observed that it has 2 dozen flavours of access restriction,

Obviously some restrictions protect better than others.

I think your judgement on CCleaner is false in every respect :-

1. The idea of Junctions is to fool most applications into thinking the files are where they "ought to be" and be ignorant of reality - needed for backward compatibility;

2. If access is via a Junction then CCleaner has a DUTY to go through the Junction and delete what you included for deletion - you need to be careful.

3. I have just set to include for deletion

I have analysed and CCleaner will do what I told it to do - it will zap the "spare" Antivirus Database,

which actually lives on the secondary drive partition E:\Junctions\Repair\

CCleaner will do no more and no less than what I tell it to do.

4. To do its job CCleaner does not NEED to recognise the difference between a Junction and a real folder.

5. When stipulating the target I had to browse, and when I reached

C:\Program Files\COMODO\COMODO Internet Security\

I saw many folders including Repair, BUT THERE WAS A DISTINCTION,

"Repair" had a curved arrow denoting a Junction/Short-cut which none of the other folders had.

6. CCleaner does not by default remove "empty" folders, despite frequent ill-conceived requests that it should.

I am only aware of empty folders being removed along with full folders if you choose the option

but i intended to use that option to purge empty folders

the issue is that if ccleaner did go through junctions than it would have seen the mount point as a full folder. but i am not sure if ccleaner can even go through junctions because the way it was behaving indicated that it thought the junction mount point was a still an empty folder

my concern is not for my system i am more than capable of fixing this minor inconvienance and already have the issue i am concerned about is for other users who run operating systems that utalize junctions more frequently. if ccleaner cannot go through a junction and instead reads them as the empty folder that they origionally started out as than ccleaner needs to have better junction handeling all together.

the issue is that if ccleaner did go through junctions than it would have seen the mount point as a full folder. but i am not sure if ccleaner can even go through junctions because the way it was behaving indicated that it thought the junction mount point was a still an empty folder

my concern is not for my system i am more than capable of fixing this minor inconvienance and already have the issue i am concerned about is for other users who run operating systems that utalize junctions more frequently. if ccleaner cannot go through a junction and instead reads them as the empty folder that they origionally started out as than ccleaner needs to have better junction handeling all together.

Why did you not believe me ?

As I previously quoted but was omitted from your quote

"3. I have just set to include for deletion"

"C:\Program Files\COMODO\COMODO Internet Security\Repair\Base.cav"

"I have analysed and CCleaner will do what I told it to do - it will zap the "spare" Antivirus Database,"

CCleaner makes no mistake. It did not mistakenly think it was an empty folder unless you have some bizarre access control settings.

This is what happens when I ANALYZE what I included, and then save the results to a text file

ANALYSIS COMPLETE - (2.464 secs)
------------------------------------------------------------------------------------------
186.4 MB to be removed. (Approximate size)
------------------------------------------------------------------------------------------

Details of files to be deleted (Note: No files have been deleted yet)

Advanced - Custom Files and Folders 190,827 KB 3 files
Firefox/Mozilla - Internet Cache 0 KB 0 files

C:\Users\Alan\AppData\Roaming\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys\settings.sol 1 KB
C:\Program Files\COMODO\COMODO Internet Security\Repair\bases.cav 190,823 KB
C:\Users\Alan\AppData\Local\Temp\cmc6D3.tmp 4 KB
Firefox/Mozilla cache cleaning was skipped.

This is what DIR shows in the relevant area

 Directory of C:\Program Files\COMODO\COMODO Internet Security
29/12/2010  02:42           195,912 framework.dll
28/08/2010  13:39            21,996 incompatsw.ini
06/01/2011  18:37             7,665 inspect.cat
28/08/2010  13:38             2,746 inspect.inf
06/01/2011  18:37            89,840 inspect.sys
29/12/2010  02:41           611,144 msica.dll
29/12/2010  02:42           258,888 platform.dll
04/02/2011  19:40    <DIR>          Quarantine
04/02/2011  19:38                12 registration.txt
19/03/2011  17:21    <JUNCTION>     Repair [E:\Junctions\repair]
28/07/2011  11:45    <DIR>          scanners
29/12/2010  02:42         1,049,416 signmgr.dll
04/02/2011  19:38    <DIR>          themes
04/02/2011  19:38    <DIR>          translations
28/08/2010  13:39               126 validation.list

Please observe that there is no Repair Folder, but a replacement Repair JUNCTION.

Originally Comodo placed two copies of base.cav in FOLDERS named Repair and Scanners.

Repair is only a "backup" that I NEVER need due to Macrium backups of the whole drive,

and every time I delete Repair Comodo immediately recreates it with 200 MB of redundant bases.cav

I therefore copied the Repair folder to E:\Junctions (along with other stuff I wish to exclude from the C:\ image backup)

and now Comodo is happy when the Junction tells it that ...\Repair\Base.cav is where it should be,

and regardless of whether Repair is a Folder or a Junction, CCleaner can go and zap it if I tell it to.

There is no way that CCleaner is seeing this Junction as an empty folder.

There is no way that CCleaner needs to improve its handling of Junctions.

You probably lost your junctions because you included them for deleting,

and it makes zero difference whether CCleaner saw through Windows deception to realise they were Junctions and not Folders,

either way it dealt with them as you stipulated, and if you chose to delete the folder as well as its contents,

that is what you got regardless of the nature of the Folder/Junction beast.

The only "Applications" which need to know the reality of Folders vs Junctions that I can think of are "system tools" such as

Partition imagers such as Macrium,

and Partition Defraggers which can be told to defrag a file - they really need to know what HDD and partition it is on.

Also CCleaner does not remove empty folders, unless you tell it to remove the folder with |REMOVESELF

Just thought I'd add that in. :)

i feel as though people are aproaching this trouble shooting session through the misconception that i did not configure ccleaner properly

i configured the includes to delete only .ds_store files as well as any empty folders. i knew what settings i was selecting. the fact that all the junctions broke just as ccleaner runs indicates some sort of bug or undesirable behavior. and maby i dont know enough about ccleaner or junctions to know exactly why this happened. i provided my best Guess based on the behavior i observed. so maby i was wrong about ccleaner seeing the junction as a empty folder but that dosent change the fact that it is removing junctions when they are not set to be included. so can you stop explaining how my theory is wrong and try to figure out why junctions are removed when the remove empty folders option is enabled?

Where is the option to remove empty folders? AFAIK there is no such option.