My user account on Windows 7 is part of the Administrators group which has a full control permissions on C:\inetpub\wwwroot:

alt text

However, when I try to create a folder in it, I get the "access denied" error. This is fixed by adding my specific user account to the list but that shouldn't be necessary should it?

link|improve this question

49% accept rate
feedback

migrated from serverfault.com May 11 '10 at 7:57

This question came from our site for system administrators and desktop support professionals.

4 Answers

up vote 2 down vote accepted

This is expected behaviour with UAC enabled.

How are you attempting to create the folder? Windows Explorer will generate a UAC prompt, so I'm assuming you're using some other method?

If you are doing it from a command prompt, make sure it is running with elevated privileges.

link|improve this answer
I thought UAC might play a role here. So any folder with permissions for the Administrators group will require elevated prompt or a specific username? If so, is there any point in assigning permissions on groups with UAC enabled if I want to be able to access that files/folders from a normal, non-elevated command prompt? – Borek May 11 '10 at 8:40
No, with a non-elevated command prompt your user account needs to be explicitly specified in the ACL in order for you to gain access. – Graeme Donaldson May 12 '10 at 7:58
feedback

The thing is though is that UAC can't "elevate" Explorer properly. See following article which explains why this happens and how to fix. I thought this was fixed in Windows 7 but appears as though it isn't, see Windows 7 Access Denied

EDIT: I can see a lot of people linking through to the link I provided. Please up vote this answer then if that helps. This is the only answer that actually ANSWERS this and explains why it happens.

link|improve this answer
feedback

From Technet:

To help prevent malicious software from silently installing and causing computer-wide infection, Microsoft developed the UAC feature. Unlike previous versions of Windows, when an administrator logs on to a computer running Windows Vista, the user’s full administrator access token is split into two access tokens: a full administrator access token and a standard user access token. During the logon process, authorization and access control components that identify an administrator are removed, resulting in a standard user access token. The standard user access token is then used to start the desktop, the Explorer.exe process. Because all applications inherit their access control data from the initial launch of the desktop, they all run as a standard user as well.

After an administrator logs on, the full administrator access token is not invoked until the user attempts to perform an administrative task.

So any time that you try to use admin credentials, you should be given a UAC prompt to invoke that Admin token, giving you access to make that change. Now if that is not working, you'll want to check your UAC settings.

Most likely, the setting you need to disable is the "User Account Control: Run all administrators in Admin Approval Mode". You can change that behavior by modifying the "EnableLUA" key in the following loctaion:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

That should make admins run as admins all of the time. This is dangerous and I would recommend that you turn this feature back on for day to day use.

link|improve this answer
feedback

In Windows7, administrator account is hidden. You can enable the administrator account.

  1. Click start
  2. Program - Accessories- Right click on command prompt and select " Run as" administrator.
  3. In command prompt type command type net user administrator /active:yes

It will cure it. you will 2 user account one is administrator and your user. Now you can login to windows as administrator. Now you will modify the files or even delete it.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.