Symptoms

Tasks for creating new IIS websites massively fail due to incorrect permissions:

Last execution output   Destination host 'XXX' (#xx), IP 'x.x.x.x' : Provisioning request failed. Access is denied. [<response><errorContext description="Access is denied." code="0x80070005" executeSeqNo="64"><errorSource namespace="NTFSManager" procedure="setFileOwner"/></errorContext></response>]

Cause

The root cause of the issue is in broken ACL on some file system objects.

Resolution

To fix permissions make the following steps:

  1. Login to webserver under filemanager user HOSTING_DOMAIN\wda_p00000<ID> and apply full permissions for HOSTING_DOMAIN\pem_admin to folder D:\CustomerData\webspaces. Skip objects with error "Access Denied"

  2. Login to webserver under user HOSTING_DOMAIN\pem_admin and apply full permissions HOSTING_DOMAIN\pem_admin to folder D:\CustomerData\ Record webspaces and files that were not modified because of error "Access Denied"

  3. Fix permissions for items that you wrote down in step 2. Staying in the pem_admin session run an elevated command prompt. Execute command:

    > takeown /R /F *.*
    

    Inside D:\CustomerData

Another solution (will take more time):

To restore permissions for Administrators you can do this:

  1. Login as Administrator
  2. Take ownership of problem file :

        > takeown /F <FILE> /A       
    

    - problem "Access denied" file (Like this: D:\CustomerData\webspaces\webspace_00118505\wwwroot\index.html)

  3. Replaces ACLs with default inherited ACLs for

        > icacls <FILE> /reset       
    
  4. Rollback owner of the file:

        > icacls <FILE> /setowner HOSTING_DOMAIN\<UserID>       
    

    - webspace user id in format "w00" (w00118505 for webspace_00118505, w00118734 for webspace_00118734 etc.)

Internal content