On Sun, 10 Dec 2017 16:07:05 +0100 Roger Price <deb...@rogerprice.org>
wrote:
>
> Dear Maintainer,
Hello,
>
> I installed nut 2.7.4-5 on a fresh Debian 9.2.1 system.
> I updated the configuration files, started nut in standalone mode,
and got the
> error message
>
> Can't open /etc/nut/upsd.users: Permission denied
>
> This is because the file has ownership and permissions
>
> -rw------- 1 root nut 91 Aug 3 11:44 upsd.users
>
> I changed the ownership and permissions in /etc/nut/ to
>
> drwxr-xr-x 2 root nut 4096 Dec 7 18:32 ./
> drwxr-xr-x 140 root root 12288 Dec 9 12:39 ../
> -rw-r----- 1 root nut 1411 Dec 7 18:32 nut.conf
> -rw-r----- 1 nut nut 290 Jul 14 20:16 ups.conf
> -rw------- 1 nut nut 290 Jun 20 14:39 upsd.conf
> -rw------- 1 nut nut 91 Aug 3 11:44 upsd.users
> -rw------- 1 nut nut 1623 Jul 1 15:41 upsmon.conf
> -rw-r----- 1 nut nut 1348 Jul 1 09:39 upssched.conf
>
> and the error message disappeared. I was then able to start nut.
The permissions of the file in the /etc/nut directory are set on first
installation and not changed during upgrades:
# make sure that conffiles are secured and have the correct ownerships
# on first install
if [ -z "$2" ] ; then
if [ -d /etc/nut/ ] ; then
chown root:nut /etc/nut/
fi
for file in ups.conf upsd.conf upsd.users ; do
if [ -f /etc/nut/$file ] ; then
chown root:nut /etc/nut/$file
chmod 640 /etc/nut/$file
fi
done
fi
So I think that you might have changed the privileges of the file
manually at some point.
I'm tempted to close this bug as this is a local misconfiguration IMHO.
Kind regards,
Laurent Bigonville