Created
February 23, 2013 06:35
-
-
Save sayedihashimi/5018723 to your computer and use it in GitHub Desktop.
Shows how you can use the setAcl provider to set a permission on the root directory on publish.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
This file is used by the publish/package process of your Web project. You can customize the behavior of this process | |
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121. | |
--> | |
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<IncludeSetAclProviderOnDestination>false</IncludeSetAclProviderOnDestination> | |
<WebPublishMethod>MSDeploy</WebPublishMethod> | |
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> | |
<LastUsedPlatform>Any CPU</LastUsedPlatform> | |
<SiteUrlToLaunchAfterPublish /> | |
<ExcludeApp_Data>False</ExcludeApp_Data> | |
<MSDeployServiceURL>localhost</MSDeployServiceURL> | |
<DeployIisAppPath>default web site/PermSample</DeployIisAppPath> | |
<RemoteSitePhysicalPath /> | |
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer> | |
<MSDeployPublishMethod>InProc</MSDeployPublishMethod> | |
<EnableMSDeployBackup>False</EnableMSDeployBackup> | |
<UserName /> | |
<_SavePWD>False</_SavePWD> | |
</PropertyGroup> | |
<Target Name="SetupCustomAcls" AfterTargets="AddIisSettingAndFileContentsToSourceManifest"> | |
<Message Text="SetupCustomAcls" Importance="high"/> | |
<ItemGroup> | |
<MsDeploySourceManifest Include="setAcl"> | |
<Path>$(_MSDeployDirPath_FullPath)</Path> | |
<setAclAccess>Modify</setAclAccess> | |
<setAclResourceType>Directory</setAclResourceType> | |
<AdditionalProviderSettings>setAclResourceType;setAclAccess</AdditionalProviderSettings> | |
</MsDeploySourceManifest> | |
</ItemGroup> | |
</Target> | |
<Target Name="DeclareCustomParameters" AfterTargets="AddIisAndContentDeclareParametersItems"> | |
<Message Text="DeclareCustomParameters" Importance="high"/> | |
<ItemGroup> | |
<MsDeployDeclareParameters Include="CustomSetAclParam"> | |
<Kind>ProviderPath</Kind> | |
<Scope>setAcl</Scope> | |
<Match>^$(_EscapeRegEx_MSDeployDirPath)$</Match> | |
<Description>Add write permission to the root folder.</Description> | |
<DefaultValue>{$(_MsDeployParameterNameForContentPath)}</DefaultValue> | |
<Value>$(_DestinationContentPath)</Value> | |
<Tags>Hidden</Tags> | |
<Priority>$(VsSetAclPriority)</Priority> | |
<ExcludeFromSetParameter>True</ExcludeFromSetParameter> | |
</MsDeployDeclareParameters> | |
</ItemGroup> | |
</Target> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment