[Nut-upsuser] Nut problems with Centos and Belkin UPS

Richard Chapman rchapman at aardvark.com.au
Tue Nov 27 07:01:26 UTC 2007


Hi Tomas and Arjen

Thanks for your very expert assistance....

We are definitely getting close to solving this. Maybe there is a 
packaging problem - or maybe there is a problem somewhere else in my system.

If I track down the ups usb port - and change the permissions of the 
/dev/bus/usb/xxx/yyy  as suggested by Tomas - everything works fine - as 
far as I can tell so far at least.

I note though - that in my system - the usb device number seems rather 
erratic. Over the past day or so - the usb device number of the UPS has 
been increasing (possibly whenever I kill the processes trying to attach 
to it??) I am confident that i have not removed the connector or 
rebooted the system or powered off the UPS - but the device number 
originally reported as 4 and today it was up to 14.

Today I also tried some experiments where I changed the permissions so 
that nut was working - then unplugged the usb cable, then plugged it 
back into the same connector. The device number increased from 4 to 5 
and I had to fix the permissions again.

How much of this behaviour is as you would expect?
What do you think caused the device number to increase without me 
removing the cable or rebooting?
Is it normal that the number will change when I unplug/replug?
Arjen refered to "hotplugging/udev" scripts. Where should these be? I 
wasn't able to find them anywhere - but maybe I am looking for the wrong 
thing in the wrong place.
Tomas - Do you know why redhat removed nut from their RHEL? Did they 
replace it with something?

Again thank you both for your help.

Richard.


Tomáš Smetana wrote:
> On Mon, 26 Nov 2007 21:36:29 +0900
> Richard Chapman <rchapman at aardvark.com.au> wrote:
>
>   
>> Hi Arjen
>>
>> Also for Tomas Smetana of the epel repository
>>
>> I think we are getting somewhere - but not quite to the final goal...
>>
>> If I run:
>> /sbin/usbhid-ups -u root -DDDDD -a BelkinUps
>>
>> as suggested it all works fine - and finds the UPS on the USB port.
>> It still does so if I remove all the -DDDDDs.
>>
>> However - if I run it without the -u root - it will not find the UPS.
>>
>> When I run the provided startup script (action) - it behaves very
>> much the same as when I run the above command without the "-u root"
>> option. I am running the script as root (I think). It appears to me
>> that maybe the script is not running the driver as root for some
>> reason, or maybe the user it runs as has insufficient rights. I have
>> had a quick look at the script but it isn't obvious how or where it
>> runs the driver, so I will need to look further. Does anything
>> obvious spring to mind as to why the standard startup action may be
>> starting the driver as the wrong user? As far as I can see - the user
>> "nut" and/or the group "nut" must have been created by the rpm
>> install. I didn't knowingly create them. What user would you expect
>> the driver to run as?
>>
>> I could attach the action script - but I'm not sure it will help.
>>     
>
> The drivers are supposed to run under user "nut" group "uucp".  Your
> problem seems to be somewhere in the udev rules provided with the rpm
> package -- they should change the ownership and permissions of the
> appropriate USB devices.  If you have your UPS attached
> on /dev/bus/usb/003/002 then ls -l /dev/bus/usb/003/002 should say:
> crw-rw---- 1 root uucp 189, 257 2007-11-26 14:05 002
> (i.e. mode 0660, group uucp)
>
> I will try to find out what's exacly wrong.  But everything points to
> the udev rules.  Sorry for the inconveniences.
>
> Regards.
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20071127/6e50bff3/attachment-0001.htm 


More information about the Nut-upsuser mailing list