Unable to save text config files in IIS7 on Windows 2008

iis-7permissionswindows-server-2008

My experience has been (on older setups) that I can remote into a system, edit a text file (*.config, *.aspx, *.ashx, etc…) in Notepad and save it.

I am unable to do this on the new box. I don't know whether it has to do with IIS7 or Windows 2008 or something entirely different.

How can I set things up to allow quick Notepad edits of files being served by IIS7?

(AFAIK, I have full permissions on the file. It is not marked read-only.)

Using Notepad, when I try to save it says "Cannot create the C:\inetpub\wwwroot\myfile.config file. Make sure that the path and name are correct."

Best Answer

It's UAC kicking you down. Non-elevated processes basically have no rights in the INETPub directory structure.

What we do on all our W2K8 boxes is install a folder on the desktop with 3 shortcuts in it - CMD (elevated), Explorer (Elevated) and ProcExplorer (Elevated). Each admin then right clicks them and selects "Pin to Start Menu".

UAC is quite painful with access issues - the error messages are standard "Access Denied" errors rather than "UAC is preventing access" errors, which is confusing as all get out. I don't know how many times I've logged on to a "broken" box where the admin has granted full rights to Everyone in an attempt to fix this w/o knowing it's UAC overriding the ACLs.

Notes: To get explorer to work as elevated, you need to edit the folder options and check "Launch folder windows in a separate process". Or run this REG file:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"DisableThumbnailCache"=dword:00000001
"DontPrettyPath"=dword:00000001
"EnableBalloonTips"=dword:00000001
"FriendlyTree"=dword:00000001
"Hidden"=dword:00000001
"HideFileExt"=dword:00000000
"SeparateProcess"=dword:00000001
"ShowAttribCol"=dword:00000001
"ShowSuperHidden"=dword:00000001
"SuperHidden"=dword:00000001