Web deployment and folder permissions
We use TeamCity for continuous integration, and have noticed a very strange problem recently: every time the website was deployed to the test server, ACL on folders was reset. That’s bad because application pool identity user needs to have write permission on some of the folders in our solution.
After some time, we discovered that folder permissions are reset by MS Deploy. Solution that worked for us was to create a .wpp.targets file, as described on the following link: https://msdn.microsoft.com/en-us/library/ff398069(v=vs.110).aspx
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <IncludeSetACLProviderOnDestination>False</IncludeSetACLProviderOnDestination> </PropertyGroup> </Project>