4

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)?

4 Answers 4

5

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.

1
  • That did the trick! Muchas Gracias. Larry Press Commented Jun 14, 2010 at 23:57
1

I had the same problem but with Windows 10, having copied my inetpub from a Windows Vista box. (What a useless error message!)

The gist of what @Doltknuckle recommended worked for me but it was a bit different:

  1. Right click on inetpub
  2. Properties > Security tab
  3. Select your username or a group to which you belong (eg. Adminstrators) in the "Group or user names" list, and click the "Edit..." button
  4. Check the "Full control" "Allow" checkbox. All the checkboxes below it should be selected when you do this, apart from the "Special Permissions" one at the bottom.
  5. Click "OK" to close the dialog and apply the changes, and "OK" again to return to File Explorer.

I hope this helps someone.

1
  • Oh I now see the question was Windows 7 only. Sorry.
    – MSC
    Commented Oct 14, 2015 at 9:24
0

You're looking at the checkbox on the General tab in the Attributes section. This is the wrong checkbox. It's a carry-over for fat32 file systems and doesn't really apply to your Windows 7 system anymore. That's why it's in that third middle state rather than fully checked or unchecked.

Rather, you need to look at the permissions listing on the Security tab of the same dialog.

1
  • I had also set them all to "full control," but it was not sufficient until I took ownership. You would think Microsoft would drop the FAT carry-over rather than show it as grey with a check mark -- if I understand what you are saying correctly, that is super bad UI design. Commented Jun 15, 2010 at 0:27
0

in cmd prompt, type takeown /f <filename> best performed as administrator or from account in admin group.

1
  • Suggestion - you could improve your answer by citing some reference to the command. Commented Feb 14, 2023 at 23:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .