pkgs: restore the cap_net_bind_service file capability

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2026-09-14 10:31:24 +02:00
parent 55e443d29e
commit 4731de9508
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -28,6 +28,10 @@ if [ "$1" = "configure" ]; then
chmod 640 /etc/sftpgo/sftpgo.json
fi
# set the cap_net_bind_service capability so the service and the CLI
# commands, such as certificate requests, can bind to privileged ports
setcap cap_net_bind_service=+ep /usr/bin/sftpgo || true
fi
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
+4
View File
@@ -39,5 +39,9 @@ if [ -d /var/lib/sftpgo ]; then
/usr/bin/chmod 750 /var/lib/sftpgo
fi
# set the cap_net_bind_service capability so the service and the CLI
# commands, such as certificate requests, can bind to privileged ports
setcap cap_net_bind_service=+ep /usr/bin/sftpgo || :
# reload to pick up any changes to systemd files
/bin/systemctl daemon-reload >/dev/null 2>&1 || :