Skip to content

Fix broken permissions on Windows Server (or desktop)

Ever see The “Failed to Enumerate Objects in the Container. Access is denied.” error? I get this sometimes on Windows when pulling code from Git.

Here is quick fix:

  1. Open PowerShell as Administrator
  2. Run
    takeown /F C:\fullpathToTheFolder
    takeown /F C:\fullpathToTheFolder /r /d y
    icacls C:\fullpathToTheFolder /grant Administrators:F
    icacls C:\fullpathToTheFolder /grant Administrators:F /t
  3. Then open File Explorer normally and you should be able to set permissions normally again.
Published inWindows

Be First to Comment

Leave a Reply

Your email address will not be published.