Windows – How to get write permission for the Web (Inetpub) directory on a new Win 7 machine

windows 7

I mirror my Web site on my laptop, and am trying to move the mirror site to a new laptop. I copied the files to the Inetpub directory, and can view them perfectly, but they are read-only (the check-mark is grey, not black), and I cannot change the permission.

When I un-check the read-only attribute on the Inetpub directory, and click "apply" it displays a dialog box stating that I need administrative permission to change the attributes. (I am logged in as an administrator). When I click "continue," it pops up another dialog box saying access is denied to the attributes of the file:

c:\inetpub\custerr\en-us\500-100.asp

That dialog box has an "ignore" button, and if I click that, it appears to work through the directory tree setting the permissions. It leaves all of the files (leafs) set to "read-write," but the directories remain "read only."

I am using 64-bit Windows 7.

I stopped the IIS service while doing all of this.

Might it have something to do with the fact that I copied the files from a different machine in the workgroup (my old laptop)?

Best Answer

You may have to take ownership of the files.

  1. Right click on the file/folder
  2. Go to properties
  3. Go to the security tab.
  4. Click on Advanced.
  5. Pick the Owner tab.

If you, or "administrators", are not the "Current owner", you'll have to replace the permissions. Click Edit, select yourself, check the "Replace owner on subfolder" box, and hit "apply. That should overwrite all permissions on the files.

If it still doesn't work, turn off the limited admin mode for UAC. You can find directions here:

Disabling UAC on Windows 7?

Use method 2 to set the "EnableLUA" registry setting. That will make your admins always run as admins. If you can't take ownership at that point, you may need to copy those files out to a non-system folder.

The final move is to move the files to a fat32 partition (like a thumb drive). That will strip out all NTFS permissions.

Related Question