From 484d38477d147a0dfec571630a37d31d7cf82403 Mon Sep 17 00:00:00 2001 From: Jens Maus Date: Sun, 24 Sep 2023 19:59:25 +0200 Subject: [PATCH] modified S51nut to set correct permissions for upsd.users --- .../overlay/base-raspmatic/etc/init.d/S51nut | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/buildroot-external/overlay/base-raspmatic/etc/init.d/S51nut b/buildroot-external/overlay/base-raspmatic/etc/init.d/S51nut index b5d75349a9..d3aa0fc75d 100755 --- a/buildroot-external/overlay/base-raspmatic/etc/init.d/S51nut +++ b/buildroot-external/overlay/base-raspmatic/etc/init.d/S51nut @@ -34,12 +34,15 @@ case $1 in echo -n "Starting NUT services: " # make sure some necessary state dirs exist + # and that permissions are right mkdir -p /var/state/ups chown nut:nut /var/state/ups - chmod 770 /var/state/ups + chmod 0770 /var/state/ups mkdir -p /var/run/upsd chown nut:nut /var/run/upsd - chmod 770 /var/run/upsd + chmod 0770 /var/run/upsd + chown nut:nut /etc/config/nut/upsd.users 2>/dev/null + chmod 0600 /etc/config/nut/upsd.users 2>/dev/null # start the server (upsdrvctl/upsd) case "${MODE}" in