From 2a0507ffc69b876141fd3a8f4c1a2678701bc2d3 Mon Sep 17 00:00:00 2001 From: advplyr Date: Fri, 2 Oct 2026 17:19:38 -0500 Subject: [PATCH] Update linuxpackager to only set 0775 on required files #5629 --- build/linuxpackager | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build/linuxpackager b/build/linuxpackager index 501d83913..622a00550 100755 --- a/build/linuxpackager +++ b/build/linuxpackager @@ -35,7 +35,6 @@ echo "--------------------" mkdir -p dist rm -rf dist/debian cp -R build/debian dist/debian -chmod -R 775 dist/debian controlfile="Package: audiobookshelf Version: $VERSION @@ -48,6 +47,12 @@ Description: $DESCRIPTION" echo "$controlfile" > dist/debian/DEBIAN/control; +# Package contents: directories 0755, files 0644 (including the systemd unit). +# Maintainer scripts must stay executable so dpkg can run them. +find dist/debian -type d -exec chmod 755 {} + +find dist/debian -type f -exec chmod 644 {} + +chmod 755 dist/debian/DEBIAN/preinst dist/debian/DEBIAN/postinst dist/debian/DEBIAN/prerm + # Package debian pkg --config package.json -t node24-linux-x64 -o dist/debian/usr/share/audiobookshelf/audiobookshelf dist-server/index.js