Windows has file permissions?

After trying to transfer some files off of a defective hard drive, I was left with many partial files. When I went to delete the files I was greeted by a Windows error message, “Access Denied”. I tried to delete the folder containing the damaged files and Windows informed me that I could not delete the folder because it was not empty. I rebooted and tried to delete the files immediately after the reboot, no luck.

I tired Linux (Knoppix 3.7) and Captive-NTFS to mount my NTFS Windows partition RW and delete the files. Unfortunately I was unsuccessful in getting Captive to mount the drive properly. I guess Captive is still experimental an experimental software. (If my filesystem had been FAT32, I could have used Knoppix with no problems)

I wasn’t sure what to do. I wondered if there was some sort of permission problem, but I didn’t know how to view file permissions in Windows. I found a website which explained that you need to un-check
Windows Explorer > Tools > Folder Options > View > Use simple file sharing
in order to view the permissions for a folder or file (I am using Windows XP SP1, but I would assume that other versions have a similar feature). With simple file sharing disabled, you have a new tab in the “Properties” of all files and folders called “Security”. From here I found that all of these evil files and folders were somehow owned by a strange user account (even though I created all of them). Now I needed to figure out how to change the owner and permissions. On Microsoft.com I found a command called cacls (For you Linux fans cacls = chmod + chown). Here is how it works, from the MS-DOS prompt use the cacls command:

cacls filename [/t] [/e] [/c] [/g user|group:perm] [/r user|group [...]] [/p user|group:perm [...]] [/d user|group [...]]

/T Search the pathname including all subfolders.
/E Edit ACL (leave existing rights unchanged)
/G user:permission (r Read; w Write; c Change (read/write); f Full control)

cacls c:\zzz /t /e /g Everyone:f

I used the above command to change all the files and folders within “zzz” to be fully accessible to everyone. After executing that command at the MS-DOS prompt, I was able to delete the files without any further error messages.

Tags:

Leave a Reply