I'm having trouble understanding the behavior of certain files. Here are the steps to play:
Log in to the server using the default administrator account
Create a text file (testfile.txt) in C: \ ProgramData containing some arbitrary text
Create a new user account and make it a member of the Administrators group
Log in using your new account and open C: \ ProgramData \ testfile.txt
Edit the text and try to save
After clicking the Save Im button, a save dialog is displayed in the form that indicates that I do not have the necessary rights to edit the file. This seems strange given that the new user account is a member of the Administrators.
When I look at the file permissions, I see that there are three groups in the list: System, Administrators, and Users. System and administrators have full permissions, however, users only have read and execute checks and read checks.
It seems that when I open the testfile.txt file from a new user account, it opens in the context of the Users group, despite the fact that it is a member of the Administrators group, is that correct? This certainly explains the behavior.
The reason this is a problem for me is because if I distribute the application through "Run as administrator", ordinary users will be able to edit the text files that I install in ProgramData.
Is this behavior a limited Windows server or is it the same in Vista and Win7.
source share