[Nut-upsuser] [2.0.3] upsd.conf: Permission denied even if

Peter Selinger selinger at mathstat.dal.ca
Thu Apr 20 17:31:47 UTC 2006


aerios wrote:
> 
> Hello all,
> 
> I'm new to nut, i've donwloaded and installed without problem apparently 
> nut 2.0.3 on a slackware 10.x (1 i think).
> 
> /usr/local/ups/bin/upsdrvctl start
> seems to work correctly.
> 
> but when i do:
> /usr/local/ups/sbin/upsd
> i've got:
> Network UPS Tools upsd 2.0.3
> stat /usr/local/ups/etc/upsd.conf: Permission denied
> 
> but upsd.conf is 0640 and set with root.ups as stated in some files 
> (INSTALL if i remember correctly).

Did you check the permissions of /usr/local/ups and
/usr/local/ups/etc?  They both need to be (at least) executable by the
ups user, or else that file cannot be read.
 
> Furthermore what made me subscribe to that list is:
> if i type:
> /usr/local/ups/sbin/upsd -u nut
> the reply is the same
> BUT when i type:
> /usr/local/ups/sbin/upsd -u ups
> i.e. i gave the group as the user to the option, it gives me:
> Network UPS Tools upsd 2.0.3
> getpwnam(ups): Success

This means that there is no user named "ups". The error message is
buggy; it should be: no such user: ups. This bug is already fixed in
the newest development version. 

> ... I suppose that it's a great "feature" for a security piece of code ! ;)
> 
> Of course the programs stops there and there is no upsd running nowhere 
> in background. Using -f does exactly the same. and 
> -DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD does 
> also the same (i really tested it ! :) i'm dead dumb i know)
> 
> Ok, so does someone knows how i can resolve that problem ?
> I suppose that it's not wise to allow usr, local, ups and etc to be 
> readable by ups...

No, they should all be readable. 

-- Peter




More information about the Nut-upsuser mailing list