Skip to content

Instantly share code, notes, and snippets.

@erikvip
Created June 13, 2014 17:10
Show Gist options
  • Save erikvip/6d09d9f879346e53070e to your computer and use it in GitHub Desktop.
Save erikvip/6d09d9f879346e53070e to your computer and use it in GitHub Desktop.
Win7 Take ownership of files
For Files:
takeown /f <file name> /d y
icacls<file name> /grant administrators:F
For Folders or Directories (will perform action recursively):
takeown /f <directory name> /r /d y
icacls <directory name> /grant administrators:F /t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment