NUT configuration files permission problem
Carlos Rodrigues
cer09566 at students.fct.unl.pt
Sun Oct 5 00:13:59 UTC 2003
Hi!
I downloaded the nut 1.4.0 package from severn2 and built it on redhat
9. I found that I can't run commands on my ups (among other things)
because of the permissions of the configuration files, namely
/etc/upsd.users which upsd says it can't read (it shows in
/var/log/messages). Making it "-r--------" and owned by "nut:nut" fixes
all problems. Aditionally upsd warns about upsd.conf being world
readable (not an error though) and I changed the permissions to be the
same as upsd.users and it appears to work fine.
Although I'm seeing this in RedHat 9 I think the same thing may happen
in Severn2.
So the changes to the nut specfile are:
-%config(noreplace) %attr(444,root,root) %{_sysconfdir}/ups/upsd.conf
-%config(noreplace) %attr(400,root,root) %{_sysconfdir}/ups/upsd.users
+%config(noreplace) %attr(400,nut,nut) %{_sysconfdir}/ups/upsd.conf
+%config(noreplace) %attr(400,nut,nut) %{_sysconfdir}/ups/upsd.users
For the sake of consistency and considering this (in ups.conf):
# --- SECURITY NOTE ---
#
# If you use snmp-ups and set a community string in here, you
# will have to secure this file to keep other users from obtaining
# that string. It needs to be readable by upsdrvctl and any drivers,
# and by upsd.
I think that maybe ups.conf should also get the same permissions as the
above mentioned files (I changed ups.conf permissions too and had no
problems yet).
Anyways, just a suggestion.
--
Carlos Rodrigues
email: cer09566 at students.fct.unl.pt
url: http://crodrigues.webhop.net
More information about the test
mailing list