Have your Windows permissions been hijacked by spyware, trojans, ftp taggers, a virus or a worm? I often get called in to rescue systems with this problem. Typically a hijacker mangles permissions so that the Windows GUI cannot be used to fix them, resulting in an inability to change, delete or sometimes even to view the files or directories affected.
In some situations SubInACL can be used. When it can be used, this is the way you do it:
subinacl /subdirec *.* /setowner="administrators"
subinacl /subdirec *.* /grant="administrators"=F
If you’re going to run these without SubInACL on the path you’ll probably run the command something like this:
"C:\Program Files\Windows Resource Kits\Tools\subinacl.exe" /subdirec *.* /setowner="administrators"
"C:\Program Files\Windows Resource Kits\Tools\subinacl.exe" /subdirec *.* /grant="administrators"=F
See the complete SubInACL documentation here.
If SubInACL doesn’t work, you’ll need to use takeown.exe, the use of which is documented elsewhere on this site.