Windows Server 2008 R2 File Permissions

Posted by Fly_Trap on Stack Overflow See other posts from Stack Overflow or by Fly_Trap
Published on 2010-06-15T12:01:36Z Indexed on 2012/06/13 4:40 UTC
Read the original article Hit count: 228

I’m having some problems understanding some particular file permissions behaviour. Here are the steps to reproduce:

  1. Log into the server using the default Administrator account

  2. Create a text file (testfile.txt) in C:\ProgramData containing some arbitrary text

  3. Create a new user account and make it a member of the Administrators group

  4. Log in using new account and open C:\ProgramData\testfile.txt

  5. Edit the text and try to save

Upon clicking save I’m presented with the save as dialog, which indicates that i do not have the necessary permissions to edit the file. This seems odd considering that the new user account is a member of Administrators.

When I view the permissions of the file I can see the there are three groups listed, System, Administrators and Users. SYSTEM and Administrators have full permissions, however, Users only has the Read & Execute and Read permissions checked.

It would appear that when I open the testfile.txt from the new users account, it opens in the context of the Users group, despite being a member of Administrators, is this correct? It would certainly explain the behaviour.

The reason that this is an issue for me is that if I deploy an application via 'Run as Administrator', will normal users be able to edit the text files I install to ProgramData.

Is this behaviour confined to Windows server or is it the same in Vista and Win7.

© Stack Overflow or respective owner

Related posts about windows-7

Related posts about windows-vista