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:
Login to webserver under filemanager user
HOSTING_DOMAIN\wda_p00000<ID>
and apply full permissions forHOSTING_DOMAIN\pem_admin
to folderD:\CustomerData\webspaces
. Skip objects with error "Access Denied"Login to webserver under user
HOSTING_DOMAIN\pem_admin
and apply full permissionsHOSTING_DOMAIN\pem_admin
to folderD:\CustomerData\
Record webspaces and files that were not modified because of error "Access Denied"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:
- Login as Administrator
Take ownership of problem file :
> takeown /F <FILE> /A
- problem "Access denied" file (Like this: D:\CustomerData\webspaces\webspace_00118505\wwwroot\index.html)
Replaces ACLs with default inherited ACLs for
> icacls <FILE> /reset
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.)