Workaround for: "Can't delete some files in XP"

----------- Black_Ome@hotmail.com
Sat May 1 12:42:00 GMT 2004


Hi,

I couldn't find too much information on Cygwin in XP where after 
reinstalling XP and having Cygwin on another partition with wrong 
"owner"-accounts.
Resulting in some files being unable to be deleted, how hard you might be 
trying. (I've tried very hard.)


I finally came up with a way to work around;

1. Browse* to the file that is 'locked' or cannot be deleted. (after trying 
to delete the Cygwin files and getting the "cannot delete"-errors, there 
will only be the locked files left, so you just have to browse a bit.)

2. Right-Click -> Properties ->  Security
Here you notice you're locked out, and all options are greyed out,  Your 
previous account that had admin rights to/owned the file is indicated as 
"not found".

3. Click advanced -> "Owner"-tab, and select the current owner. Hit "apply" 
then "Ok".
Close out the underlaying menu ("Host Properties" / Security Tab) by 
clicking ok to reload the changed settings.

4. Rightclick the file(s) again -> Properties -> Security.

You'll notice you now can change the access rights as you desire; Set your 
account to full control and delete the file(s) and hit "ok", then delete the 
files as you desire.


*Trying to change permissions for the upmost parent folder in the way 
described above didn't work as desired.

Regards,
Tim










More information about the Cygwin-xfree mailing list