I am setting up Amazon Elastic Beanstalk for our web app. Using Visual Studio Express I am unable to use the AWS toolkit, so I have to publish as a Web Deploy Package and then upload the zip file to EB. The problem I am encountering is to do with file / folder permissions in the deploy. There is a folder which requires write permission, however when deploying the app all folders get read only permissions. Following this article I created a .targets file for deployment which uses setAcl to set the permissions on the folder. However when I deploy the app the permissions do not appear and the app breaks. Below is what is in my .targets file
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IncludeCustomACLs>TRUE</IncludeCustomACLs>
<AfterAddIisSettingAndFileContentsToSourceManifest Condition="$(AfterAddIisSettingAndFileContentsToSourceManifest)==''">
$(AfterAddIisSettingAndFileContentsToSourceManifest);
SetCustomACLs;
</AfterAddIisSettingAndFileContentsToSourceManifest>
</PropertyGroup>
<Target Name="SetCustomACLs" Condition="'$(IncludeCustomACLs)'=='TRUE'">
<Message Text="Adding Custom ACls" />
<ItemGroup>
<MsDeploySourceManifest Include="setAcl"
Condition="$(IncludeSetAclProviderOnDestination)">
<Path>$(_MSDeployDirPath_FullPath)\Includes\Site</Path>
<setAclAccess>Read,Write,Modify</setAclAccess>
<setAclResourceType>Directory</setAclResourceType>
<AdditionalProviderSettings>setAclResourceType;setAclAccess</AdditionalProviderSettings>
</MsDeploySourceManifest>
</ItemGroup>
When I look in the zip file that gets created and open the archive.xml file I see my permission settings there:
<setAcl path="C:\Users\Peuge\Documents\Visual Studio 2012\Projects\ProjectName\ProjectWebstie\obj\Release\Package\PackageTmp\Includes\Site" MSDeploy.path="2" isDest="AA==" MSDeploy.isDest.Type="Microsoft.Web.Deployment.DeploymentObjectBooleanAttributeValue" setAclUser="" MSDeploy.setAclUser="1" setAclAccess="Modify" MSDeploy.setAclAccess="1" MSDeploy.MSDeployLinkName="Child4" MSDeploy.MSDeployKeyAttributeName="path" MSDeploy.MSDeployProviderOptions="H4sIAAAAAAAEAE2PwU4CMRCGF4Uq6gWfYB+AbIAVNCYcCFyIQVdAPNhLtztgoWw3nRbdp9dWBJ3DP3+mnX5/g0oQBF+ufPd1deLkbSK4VqiWJvqANMqgkKrcQm6a4QI0CpX3b6N21IpazXBopbEa+jlYo5lsholNpeAPUM7VBvJ+3E6X8V23x7K4dwNxt+ZJnT/AqwOMjoB/NtFqJzLQT4VxQKz6cMXv7JFtoVow817LnUOyY9ICViqE+Pjk1AuCGXBJ/N7n8J6+oEtOE7AroCPFrUcgXQi0TIYzYzOhwk6r3aGOuwbuzp6t4Bswh+6CojBAVbqmU5DAEGjC+Iatjn2+Leg459JmgHTmLtdrjl4nThre/YQ78x/ZhxtwDojk3E2u95MpoLKaw7wsoEEOK3UvE5WJZUku/IsjoV1EpcvLb2s9SavBAQAA" />
I am not sure if it has to do with the path having my local directories or not?
Any help is much appreciated.
Thanks