Can´t get WebDeploy of a .NET Core 3.1 app to "setACL" for folder
See original GitHub issueHi,
I’m trying to create a WebDeploy package from an ASP.NET Core 3.1 app and on that package was trying to use setACL to change my log folder permissions to allow Write.
I’ve tried a Parameters.xml + Manifest.xml where
Parameters.xml includes:
<parameter name="Log Folder" tags="SetAcl" description="Log folder, ex: ./logs" defaultValue="./logs" > <parameterEntry kind="ProviderPath" scope="setAcl" match="\\logs$" /> </parameter>
and Manifest.xml includes:
<setAcl path="NBWebSeed\\logs" setAclAccess="Write, ReadAndExecute"/>
I’ve tried adding this to my csproj file:
`
<Target Name=“SetupCustomAcls” AfterTargets=“AddIisSettingAndFileContentsToSourceManifest”>
<ItemGroup>
<MsDeploySourceManifest Include=“setAcl”>
<Path>$(_MSDeployDirPath_FullPath)\logs</Path>
<setAclAccess>Read,Write,Modify</setAclAccess>
<setAclResourceType>Directory</setAclResourceType>
<AdditionalProviderSettings>setAclResourceType;setAclAccess</AdditionalProviderSettings>
</MsDeploySourceManifest>
</ItemGroup>
</Target>
<Target Name=“DeclareCustomParameters” AfterTargets=“AddIisAndContentDeclareParametersItems”> <ItemGroup> <MsDeployDeclareParameters Include=“SetAclForLogFolder”> <Kind>ProviderPath</Kind> <Scope>setAcl</Scope> <Match>^$(_EscapeRegEx_MSDeployDirPath)\logs$</Match> <Description>Add write permission to logs folder.</Description> <DefaultValue>{Log Folder}</DefaultValue> <Value>$(_DestinationContentPath)/logs</Value> <Tags>Hidden</Tags> <Priority>$(VsSetAclPriority)</Priority> <ExcludeFromSetParameter>True</ExcludeFromSetParameter> </MsDeployDeclareParameters> </ItemGroup> </Target> `
Nothing seems to work, am I missing something? Is this supported in ASP.NET Core as it was in regular ASP.NET projects?
Thanks and best regards POFerro
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top GitHub Comments
@vijayrkn I am facing the same issue. Is there a target documentation for changes made in ASP.NET Core that I can reference to figure out the issue
Looks like this is the same issue mentioned in #12485 and #12476, as well as another Stack Overflow question. 😦