Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web deploy and folder permissions

I'm using VS 2010 to build the deployment package for a web application. I manually deploy it to the IIS 6.0 server using the deployment ccommand script it generates. All the stuff gets copied under the Inetpub default website properly. The only issue I have is that the folder permissions keep getting reset once I deploy.

Say my website is under the folder "Mywebsite". I grant certain user XYS full control to this folder. All is well. The next time I deploy, user XYZ no longer has full control and the permissions gets reset.

like image 610
IceFossil Avatar asked Sep 01 '10 19:09

IceFossil


1 Answers

If you want to skip ACL operations then you need to set a property in your build. You can do this in two ways

  1. Edit your project file
  2. Create a .wpp.targets file

I would recommend #2. For this case create a new file in the same directory as your project file with the name {ProjectName}.wpp.targets where {ProjectName} is the name of your project. Then inside of this file you should place the following contents.

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
         ToolsVersion="4.0">

  <PropertyGroup>
    <IncludeSetAclProviderOnDestination>False</IncludeSetAclProviderOnDestination>
  </PropertyGroup>
</Project>

Here you are setting the property IncludeSetAclProviderOnDestination which will signal the Web Publishing Pipeline to not include ACL providers in the manifest that is created for the package/publish.

If you want to take approach #1 just throw in the entire under the elment.

like image 85
Sayed Ibrahim Hashimi Avatar answered Sep 20 '22 18:09

Sayed Ibrahim Hashimi