Created
January 2, 2013 21:04
-
-
Save bgrins/4438039 to your computer and use it in GitHub Desktop.
Sometimes Windows permissions get messed up such that even an admin cannot access the file. The process for fixing this through the UI is very slow going, so here is a script to set the owner to Administrator then give the Administrator full permissions to said files.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Fix ownership on a directory | |
:: Download subinacl (if needed) at http://www.microsoft.com/en-us/download/details.aspx?id=23510 | |
C:\subinacl /file *.* /setowner=COMPUTER\Administrator | |
cacls *.* /G Administrator:F |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment