I am deploying to elastic beanstalk via Visual Studio 2013.
Here is my wpp.targets file:
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Target Name="SetupCustomAcls" AfterTargets="AddIisSettingAndFileContentsToSourceManifest"> <ItemGroup> <MsDeploySourceManifest Include="setAcl"> <Path>$(_MSDeployDirPath_FullPath)\ChatFiles</Path> <setAclAccess>Read,Write</setAclAccess> <setAclResourceType>Directory</setAclResourceType> <AdditionalProviderSettings>setAclResourceType;setAclAccess</AdditionalProviderSettings> </MsDeploySourceManifest> <MsDeploySourceManifest Include="setAcl"> <Path>$(_MSDeployDirPath_FullPath)\FileHoldingForS3</Path> <setAclAccess>Read,Write</setAclAccess> <setAclResourceType>Directory</setAclResourceType> <AdditionalProviderSettings>setAclResourceType;setAclAccess</AdditionalProviderSettings> </MsDeploySourceManifest> <MsDeploySourceManifest Include="setAcl"> <Path>$(_MSDeployDirPath_FullPath)\FileHoldEmail</Path> <setAclAccess>Read,Write</setAclAccess> <setAclResourceType>Directory</setAclResourceType> <AdditionalProviderSettings>setAclResourceType;setAclAccess</AdditionalProviderSettings> </MsDeploySourceManifest> </ItemGroup> </Target> <Target Name="DeclareCustomParameters" AfterTargets="AddIisAndContentDeclareParametersItems"> <ItemGroup> <MsDeployDeclareParameters Include="FilesSetAclParam"> <Kind>ProviderPath</Kind> <Scope>setAcl</Scope> <Match>^$(_EscapeRegEx_MSDeployDirPath)\\ChatFiles$</Match> <Description>Add write permission to the ChatFiles folder.</Description> <DefaultValue>{$(_MsDeployParameterNameForContentPath)}/ChatFiles</DefaultValue> <Value>$(_DestinationContentPath)/ChatFiles</Value> <Tags>Hidden</Tags> <Priority>$(VsSetAclPriority)</Priority> <ExcludeFromSetParameter>True</ExcludeFromSetParameter> </MsDeployDeclareParameters> <MsDeployDeclareParameters Include="FilesSetAclParam"> <Kind>ProviderPath</Kind> <Scope>setAcl</Scope> <Match>^$(_EscapeRegEx_MSDeployDirPath)\\FileHoldingForS3$</Match> <Description>Add write permission to the FileHoldingForS3 folder.</Description> <DefaultValue>{$(_MsDeployParameterNameForContentPath)}/FileHoldingForS3</DefaultValue> <Value>$(_DestinationContentPath)/FileHoldingForS3</Value> <Tags>Hidden</Tags> <Priority>$(VsSetAclPriority)</Priority> <ExcludeFromSetParameter>True</ExcludeFromSetParameter> </MsDeployDeclareParameters> <MsDeployDeclareParameters Include="FilesSetAclParam"> <Kind>ProviderPath</Kind> <Scope>setAcl</Scope> <Match>^$(_EscapeRegEx_MSDeployDirPath)\\FileHoldEmail$</Match> <Description>Add write permission to the FileHoldEmail folder.</Description> <DefaultValue>{$(_MsDeployParameterNameForContentPath)}/FileHoldEmail</DefaultValue> <Value>$(_DestinationContentPath)/FileHoldEmail</Value> <Tags>Hidden</Tags> <Priority>$(VsSetAclPriority)</Priority> <ExcludeFromSetParameter>True</ExcludeFromSetParameter> </MsDeployDeclareParameters> </ItemGroup> </Target>
But the folder permissions are not changed after deployment on any of my ec2 instances.
I am ensuring that I the wpp.targets file is not cached prior to deployment.
1 Answers
Answers 1
Make sure you didn't instruct MSDeploy to ignore ACLs via the MSDeploy.exe call
,includeAcls="False"
Or in the build:
http://blogs.iis.net/msdeploy/skipping-setting-an-acl-in-a-visual-studio-2010-deployment-package
0 comments:
Post a Comment