quamotion / dotnet-packaging

Extensions for the .NET Core CLI which help packaging and publishing .NET Core applications
MIT License
652 stars 85 forks source link

Packaged .deb loses file permissions on install #254

Open CryoViking opened 1 month ago

CryoViking commented 1 month ago

View of source "Release" folder:

image

View of dest "Installed package":

Screenshot 2024-09-17 at 11 44 54 am

How can I either fix this so that the files keep the same permissions when installed, (as well as specify ownship on the target system) or run a post install script to fix permissions, etc.

atauenis commented 1 month ago

Set them via csproj:

        <Content Include="webone.service" CopyToPublishDirectory="Always" LinuxFileMode="644">
            <LinuxPath>/etc/systemd/system/webone.service</LinuxPath>
        </Content>

LinuxPath is not required (it's need only to place the file somewhere outside package install directory).

CryoViking commented 1 month ago

that's what I did for the service files yes, this is for files inside the install directory, the actual DLL's and executable etc.