aerios
2006-Apr-20 16:29 UTC
[Nut-upsuser] [2.0.3] upsd.conf: Permission denied even if correctly set ?
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). 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 ... 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...
Peter Selinger
2006-Apr-20 17:32 UTC
[Nut-upsuser] [2.0.3] upsd.conf: Permission denied even if
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): SuccessThis 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