Packaged .deb loses file permissions on install #149

Closed
opened 2026-01-29 16:30:40 +00:00 by claunia · 2 comments
Owner

Originally created by @CryoViking on GitHub (Sep 17, 2024).

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.

Originally created by @CryoViking on GitHub (Sep 17, 2024). View of source "Release" folder: <img width="1259" alt="image" src="https://github.com/user-attachments/assets/f8d37850-7f02-44cd-ae26-5d29d5dbddea"> View of dest "Installed package": <img width="1268" alt="Screenshot 2024-09-17 at 11 44 54 am" src="https://github.com/user-attachments/assets/65f4abab-c484-4972-8549-50ccbc1c1f96"> 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.
Author
Owner

@atauenis commented on GitHub (Sep 17, 2024):

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).

@atauenis commented on GitHub (Sep 17, 2024): Set them via csproj: ```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).
Author
Owner

@CryoViking commented on GitHub (Sep 17, 2024):

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.

@CryoViking commented on GitHub (Sep 17, 2024): 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dotnet-packaging#149