Wednesday, 09 December, 2020

DevOps Tip - Prevent MSDeploy Overwriting Umbraco File Permissions

How to prevent Visual Studio's MSDeploy changing the file permissions on the web-server when you publish updates.

When publishing an Umbraco or ASP.NET application Visual Studio's MSDeploy will change the file permissions on the hosting server by default.

By default, Visual Studio sets read permissions on the root folder of the destination site and write permissions on the App_Data folder.  

For Umbraco websites this is not desired behaviour; see

You can prevent Visual Studio and MSDeploy from amending file permissions for your project and all it's publish profiles by creating a wpp.targets file and adding the following entry:

<?xml version="1.0" encoding="utf-8"?> 
<Project ToolsVersion="4.0" xmlns=""> 
<IncludeSetACLProviderOnDestination>False</IncludeSetACLProviderOnDestination> </PropertyGroup> 

This may require a Visual Studio restart to take effect and will only work with Web Project style applications (those having a .csproj file); read for more information.

Want to Say Thanks?

Why not buy me a coffee at