[Nut-upsuser] ownership of pid directory
Doug Reynolds
mav at wastegate.net
Tue Jan 2 15:53:46 CET 2007
>
> Hello all,
>
> Some time ago, you all were very helpful in getting nut running on an OpenBSD
> system, using--for what it's worth--a CyberPower 1500AVR.
>
> So I finally got my FreeBSD system's UPS, also a CyberPower 1500AVR, within
> reach of its serial cable and I'm trying to get nut running here. I'm going
> nuts.
>
> Basically, I copied the OpenBSD configuration over to the FreeBSD system and
> tried to put everything in the right place. It looked like the FreeBSD port
> wants to run as user uucp rather than nutmon, so I changed ups.conf and
> upsmon.conf accordingly and tried changing the ownership of everything to
> uucp.
>
> upsdrvctl still complains that it "Can't chdir to /var/db/nut: Permission
> denied"
> The directory exists and is owned by both user and group uucp. What does it
> want?
I have an answer to your question now (i don't recall if you got an
answer now) since I run freebsd, I finally secure nut on my system.
my /var/db/nut dir looks like this:
drwxr-x--- 2 nutmon nut 512 Jan 2 09:17 nut/
I run my driver as user nutmon, group nut. If you goto your /etc/group
file, add user UUCP to the nut group.. then add:
user = nutmon
It sounds like the permission on your /var/db/nut are probably 700 or
740.. on my system orignially it was owned by uucp:dialer, that could be
your problem if it is own by uucp:uucp
I ran into the same thing when I switch over to a non-root setup. I
sure you trouble has something to do with permissions..
Also, don't forget to put:
# Insert other shutdown procedures here
if (test -f /etc/killpower)
then
echo "Killing the power, bye!"
/usr/local/libexec/nut/upsdrvctl shutdown
fi
right before the:
echo '.'
exit 0
in your /etc/rc.shutdown for freebsd, as if you don't, your ups won't
shutdown, and could cause a race condition.
More information about the Nut-upsuser
mailing list