Umbraco file permissions when deployed to an Azure cloud service?
Hi,
I'm currently trying to configure an Umbraco 7.5 instance to play nicely on a an Azure cloud service. Has anyone successfully got an Umbraco instance to deploy correctly, as my deployments seem to be falling over with file permission issues?
Access to the path 'E:\sitesroot\0\Config\Dashboard.config' is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access to the path 'E:\sitesroot\0\Config\Dashboard.config' is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET access to a file, right-click the file in File Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
If this was on a virtual machine, then it wouldn't be an issue as the file permissions can just be adjusted. However on a cloud service this isn't possible, so I can't see how I'm supposed to get around this issue?
Has anyone else encountered this problem, or found a solution for it?
I'm currently trying to configure an Umbraco 8.6.4 instance on a an Azure Web Apps. Has anyone successfully got an Umbraco 8.6.4 instance to deploy correctly, as my deployments seem to be falling over with file permission issues?
I can't save/publish anything (everything works fine on local , but showing permission issues on azure web apps , Umbraco Health Check shows an error under permissions section as "The following folders must be set up with modify permissions but could not be acccessed AppData, AppData\packages, App_Plugins.") . Any idea ?
Umbraco file permissions when deployed to an Azure cloud service?
Hi,
I'm currently trying to configure an Umbraco 7.5 instance to play nicely on a an Azure cloud service. Has anyone successfully got an Umbraco instance to deploy correctly, as my deployments seem to be falling over with file permission issues?
If this was on a virtual machine, then it wouldn't be an issue as the file permissions can just be adjusted. However on a cloud service this isn't possible, so I can't see how I'm supposed to get around this issue?
Has anyone else encountered this problem, or found a solution for it?
Thanks
Hi Andrew,
You need to setup a deployment script to adjust permissions. Here's the steps for you;
In your ServiceDefinition.csdef file, add these lines under the WebRole node
<Startup> <Task commandLine="install.cmd" executionContext="elevated" taskType="simple"> <Environment> <Variable name="ComputeEmulatorRunning"> <RoleInstanceValue xpath="/RoleEnvironment/Deployment/@emulated" /> </Variable> </Environment> </Task> </Startup>
(formatting went a bit screwed there, apologies)
Hopefully that's enough to get the file permissions changed on deployment.
Cheers
Thanks for this. Sounds a good solution, however in the end I used app services instead and avoided this issue.
Hi,
I'm currently trying to configure an Umbraco 8.6.4 instance on a an Azure Web Apps. Has anyone successfully got an Umbraco 8.6.4 instance to deploy correctly, as my deployments seem to be falling over with file permission issues?
I can't save/publish anything (everything works fine on local , but showing permission issues on azure web apps , Umbraco Health Check shows an error under permissions section as "The following folders must be set up with modify permissions but could not be acccessed AppData, AppData\packages, App_Plugins.") . Any idea ?
I can confirm that everything fine with the Azure Web Apps set up guidelines described here https://our.umbraco.com/documentation/getting-started/setup/server-setup/azure-web-apps
is working on a reply...