次の方法で共有


Don't have permission to save to C:inetpubwwwroot ??

I recently had this baisic problem and I could find an easy fix when searching on the web.  SoI am puting it here in case it helps someone.  I was setting up IIS7 on Windows Server 2008 SP1 and had a very early basic problem. When using Notepad to save a file called default.htm to the folder C:\inetpub\wwwroot  and got the following error:

You don’t have permission to save to this location.

Contact the administrator to obtain permission.

Would you like to save in the Documents Folder instead?

Well,  I was the Administrator on that machine, and as far as I could tell using Windows Explorer and looking at the properties of the folder,  Administrators had full access to that folder so I had adequate permissions to save to that folder. What was also interesting is that if I saved to another folder I could copy and paste the file to C:\inetpub\wwwroot .

Solution is basic ... You need to start Notepad (or whatever you are using) AS administrator, by right clicking the notepad.exe and choosing run as administrator.

Hope this helps someone.

Terry

Comments

  • Anonymous
    July 29, 2010
    Terry, MANY thanks!  You just saved me lots of time and frustration... I encountered the same problem and your solution worked like a charm.

  • Anonymous
    July 02, 2011
    THANX BUDDY I RECENTLY CONFIGURED IIS7 WITH PHP AND MYSQL AND GOT THE SAME PROBLEM BUT NOW PERFECT,ur the one VIVA.

  • Anonymous
    July 19, 2011
    The comment has been removed

  • Anonymous
    March 11, 2012
    Hey!!thanks for your post...OMG!! i was struggling hard...now iam bit relief thank you so much

  • Anonymous
    July 05, 2012
    i am unable to do it. i m an administrator of my machine and still the same msg is coming

  • Anonymous
    September 12, 2012
    Glad I could help guys :-)

  • Anonymous
    July 23, 2013
    microsoft is stupid for making the folder non-writable.  Their security model is broken.  

  • Anonymous
    August 10, 2013
    i was trying from last 2 weeks ,, nw it sort out thanx

  • Anonymous
    December 14, 2013
    Microsoft is not stupid and security model is not broken. You just need to do it in the right way. Open as administrator is a pain as everybody know, please follow the below solution:

  1. Open a explorer window and navigate to inetput folder    (Start -> Computer -> C: -> inetpub)
  2. Right click on 'wwwroot' and select properties
  3. Click on Security Tab (third tab in the top of the properties window)
  4. Click on Users and click on Edit
  5. Select 'Full Controll' checkbox and click on Apply.
  6. I did the above (5th step) for IIS_IUSRS, Administrators and Creator Owner groups. Now you should be able to write to that folder using any editors in normal mode. Tip: You might want to try Sublime Text instead of Notepad. Happy coding!
  • Anonymous
    May 16, 2014
    Changed users to full control in security tab ,  but running as administrator will keep folder protected...

  • Anonymous
    December 24, 2014
    Thank you very much for such a simple solution

  • Anonymous
    March 03, 2015
    The solution above by Arun Vasudevan Nair 14 Dec 2013 2:37 PM # ALSO works on Windows 8.1

  • Anonymous
    March 03, 2015
    Thanks so much Terry for your time and effort to post your solution! I've been browsing Microsoft Helpdesk sites for hours without success... should have found you earlier

  • Anonymous
    April 03, 2015
    Arun Vasudevan Nair's solution worked for windows 8.1 , thanks :)

  • Anonymous
    August 31, 2015
    really thanksssssssssssssssssssssssssss

  • Anonymous
    September 15, 2015
    And what a stupid bleedin' concept. Thanks Microsoft.

  • Anonymous
    September 29, 2015
    Needless to say, don't actually do Arun's solution on a real server.  It means any rogue process or exploit would have full write permissions on the entire web root.  Exactly the opposite of the configuration you'd want for an internet facing web server. Right clicking notepad and choosing "run as administrator" is the only correct answer for this problem (or install Notepad++).

  • Anonymous
    December 05, 2015
    hi arun. i was follow your steps to take permissions but when i click on apply button it will not work.