2

Okay, let me just say I have little idea of what I'm doing here. Sorry if I'm making this more complicated than it needs to be,

I have a website that I've been setting up on IIS6 for awhile now, it worked just fine. I've taken the exact same site and tried setting it up on Windows Server 2008 Enterprise 32-bit.

Here are the steps I followed:

  1. Take the zip file containing the website from the server.
  2. Unzip it into inetpub/website/version.
  3. It gives the error that the config file needs to be migrated, so I grant IIS_IUSRS read permission on the main folder and run the migrate command.

Now the website loads but I have two problems:

  1. I can't edit any of the files inside the website folder. I open it up, edit it, and when I try to save it says "Access Denied." Yet if I move the file from the folder to my Desktop, I can edit it there and move it back without a problem. I'm logged in as the administrator and the Administrators group has full permissions on every file in the website.
  2. When I try to use the website, there are setup pages that edit some configuration files. I always get a permissions error trying to use these pages (the rest of the site functions fine):

    An error occured loading a configuration file: Access to the path 'C:\inetpub\website\version\XXXXX.tmp' is denied. (C:\inetpub\website\version\web.config)

  3. I check the permissions and see that the /config folder is set to read only, so I uncheck that. It hasn't seemed to change anything.

I read on the IIS forums that these permission issues are because I unzipped it directly to the inetpub folder and so it didn't inherit the proper permissions. So I tried unzipping it to My Documents and then moving it into inetpub as suggested, but that didn't seem to do anything.

Permissions are currently setup like this:

  • website (Read-only, Administrators Group has Full Control, Users group and IIS_IUSRS has Read & execute)
    • version (Same as above)
      • /config (Same as above, except IIS_IUSRS also have Modify and Write)
      • web.config (Same above)
  • wwwroot

So anyone know what else I have to do to get rid of that error?

2 Answers 2

1

This sounds like a user access control problem.

With UAC turned on you are not a member of the Administrators group even if you log on as local administrator. You only "belong" to that group when you "run as administrator". So if you launch notepad "as administrator" you will be able to edit the files with no problem. So the answer is to either turn off UAC or grant your user account explicit Modify permissions to the file. Yes it is really annoying.

So that fixes the problem of you editing the config files, but it sounds like you want the app to also edit files. That sounds a bit dangerous, but probably acceptable if you are controlling who has access to the application.

The best approach is to put the web app in its own application pool not the default app pool. Then set the identity on the app pool to a specific user account, not the default network service account. Then grant that account the permissions it needs on the specific files and/or folders.

0
1

You would get "Access Denied" when making changes in system folder's because of UAC. In Windows Server 2008 even though you are a member of Administrators group on the machine when you try to make any changes in folder like inetpub or system32 UAC fires in and verifies that you acknowledge the change.

It is highly recommended not to make changes to UAC but you can check the settings under Control Panel -> User Accounts -> User Accounts. Select the account and click on Change User Account Control settings.

HTH

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .