The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

• @matijn (: Enneh: sterkte! 1 hour ago
• @IanColdwater Welcome back. I was worried too. Good to know that you are OK. Hope the turned down notifications made things bearable. 1 hour ago
• RT @francesc: I updated the slide deck from my "Introduction to Go" at @CERN earlier this year It now includes links to the recordings for… 1 hour ago
• RT @danidonovan: therapist: and what do we do when we’re feeling stressed? me: stop making plans, avoid text messages, and accidentally al… 1 hour ago
• RT @michaelbolton: 1) Thinking about counting things to measure quality? You might be able to measure *some things* *that bear on* quality.… 1 hour ago

• Email Subscription

Join 1,642 other followers

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.

–jeroen