Fixing files inaccessible due to broken NTFS-permissions

Open a command-prompt with escalated privileges:

  1. Press the Start-button.
  2. Type "cmd".
  3. Right-Click "Command Prompt" that shows up, and click "Run as Administrator" (or just hit CTRL+SHIFT+ENTER).

Now go to the problematic area, and use the following commands:

TAKEOWN /F [dir] /R /D Y
CD [dir]
ICACLS * /T /Q /C /RESET

Where [dir] is to be replaced with the path to the directory you're trying to fix. It will, in order of the above commands:

  1. Forcible make you own all files in that directory, recursively.
  2. Change in to the directory.
  3. Reset all Access Control Lists on every object in that directory to the system default.