Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I finally got PHP running on Windows 7 IIS7 but now for the life of me can't edit files in wwwroot because my editor keeps saying "You don't have permission to save to this location... save in Pete instead?"

It's going to be a very long edit/run/debug process if I have to manually copy files into wwwroot each time I want to view my website.

I go into IIS manager and go to that directories and un-click the read-only check box that is set. The problem is next time I "Edit Permissions..." it's checked again!

I'm running as Administrator.

Any ideas?

share|improve this question
up vote 4 down vote accepted

By default only administrators have write access to C:\inetpub\wwwroot. Two options:

  1. Login with an administrator account, and elevate you editor.
  2. Set IIS to use a different directory for its root folder, on which your normal account has write/delete access.
  3. Change the permissions on C:\inetpub\wwwroot.
share|improve this answer
1. Hey, how in the world would I pull off #1? I use UltraEdit. 2. I did this. Thanks! 3. I tried doing that... that's the problem :( – Pete Alvin Jun 26 '10 at 10:53

Right click on the editor and click "Run as Administrator". By default, you cannot edit files that is in the wwwroot directory. UAC prevents the files to be edited even though you are logged on to the machine as an Administrator.

Yes, alternately change the content directory from something other than c:\inetpub\wwwroot folder.

share|improve this answer

Additional info: The read-only check box for a folder doesn't mean that the contents of the folder are read-only.


share|improve this answer

Yes, go to the INTERNET INFORMATION SERVER (IIS) --> RIGHT CLICK over the FILE --> Edit Permission --> Security --> Edit --> Choice all the USER or Group to give them WRITE Permission , in my case was "IIS_IUSRS" and "ADMINISTRATORS"... thats all brothers.

share|improve this answer
Don't ever give the IIS_IUSRS group write permissions. That allows any App Pool identity to write to the contents of itself. If anyone manages to revert to the App Pool identity (not common but also not prevented), that allows defacement of the website. – TristanK Feb 23 '12 at 0:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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