Add CAP_SYS_NICE,CAP_CHOWN, and CAP_IPC_LOCK to the fix_capabilities() function

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner 2022-01-02 13:05:05 +00:00
parent 2dde4a64c9
commit 8ea5f9c8dc
No known key found for this signature in database
GPG Key ID: 872950F3ECF2B173
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@
. /opt/pihole/webpage.sh
fix_capabilities() {
setcap CAP_NET_BIND_SERVICE,CAP_NET_RAW,CAP_NET_ADMIN+ei $(which pihole-FTL) || ret=$?
setcap CAP_NET_BIND_SERVICE,CAP_NET_RAW,CAP_NET_ADMIN,CAP_SYS_NICE,CAP_CHOWN,CAP_IPC_LOCK+ei $(which pihole-FTL) || ret=$?
if [[ $ret -ne 0 && "${DNSMASQ_USER:-root}" != "root" ]]; then
echo "ERROR: Failed to set capabilities for pihole-FTL. Cannot run as non-root."