permissions – recursively change owner windows 7 – Super User
Posted by jpluimers on 2016/10/27
Slightly updated the answer the /D Y
part will recursively accept taking ownership when directory listing is denied in the permissions:
To fix really broken permissions, the best is to run these two commands one after the other:
takeown /F /D Y "C:\path\to\folder" /R icacls "C:\path\to\folder" /reset /T
The first one will give you ownership of all the files, however that might not be enough, for example if all the files have the read/write/exec permissions set to “deny”. You own the files but still cannot do anything with them.
In that case, run the second command, which will fix the broken permissions.
via: permissions – recursively change owner windows 7 – Super User
–jeroen
Leave a Reply