Access is Denied: Fixing windows permissions!

Posted: 11th September 2007 by Grant Perry in Operating systems, Windows

Having trouble with permissions to a file on Windows XP? So was I even though I was logged as an Administrator.. the same account which created the file.. the permissions hadn’t been modified.. Even worse the files locked were a virtual server I had spent days configuring!

The process to fix it was actually quite simple but took awhile to find:

  1. Download SubInACL from Microsoft and install it.
  2. Using notepad create a file in the SubInACL.exe directory called “reset.cmd”.
  3. Paste the following commands in to this file then run it.
subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f
subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f
subinacl /subdirectories %SystemDrive% /grant=administrators=f
 
subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=system=f
subinacl /subkeyreg HKEY_CURRENT_USER /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=system=f
subinacl /subdirectories %SystemDrive% /grant=system=f

Without reading in to these commands too much I suspect I didn’t need to use them all. But I figured that the Administrators and Systems accounts should have access to everything right? The security conscious paranoid man in me now questions, but its too late so I’m suppressing the voice!