[Nut-upsuser] APC Back-UPS XS 1200 - permission denied

Kevin DeGraaf kevin at kdegraaf.net
Thu Jan 18 23:04:19 CET 2007


I have a new APC Back-UPS XS 1200.  It is detected properly by the Linux
kernel (2.6.16):

# dmesg
usb 5-3.4: new low speed USB device using ehci_hcd and address 9
usb 5-3.4: new device found, idVendor=051d, idProduct=0002
usb 5-3.4: new device strings: Mfr=3, Product=1, SerialNumber=2
usb 5-3.4: Product: Back-UPS XS 1200 FW:8.g1 .D USB FW:g1
usb 5-3.4: Manufacturer: American Power Conversion
usb 5-3.4: SerialNumber: BB0100009999
usb 5-3.4: configuration #1 chosen from 1 choice
hiddev96: USB HID v1.10 Device [American Power Conversion Back-UPS XS
1200 FW:8.g1 .D USB FW:g1 ] on usb-0000:00:1d.7-3.4

This UPS works properly with apcupsd, but I'd rather use NUT.   :-)

Here's my ups.conf:

[xs1200]
        driver = newhidups
        port = auto
        user = upsd
        desc = "Back-UPS XS 1200"

I receive this error when I run newhidups manually:

# /usr/lib/ups/driver/newhidups xs1200
Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.3)
No matching USB/HID UPS found

Forcing it to use the "root" user makes a positive difference:

# /usr/lib/ups/driver/newhidups -u root xs1200
Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.3)
Detected a UPS: American Power Conversion/Back-UPS XS 1200 FW:8.g1 .D
USB FW:g1
Using subdriver: APC HID 0.8

Here's the relevant strace output from upsd itself:

# strace /usr/sbin/upsd 2>&1
[snip ...]
socket(PF_FILE, SOCK_STREAM, 0)         = 5
connect(5, {sa_family=AF_FILE, path="newhidups-auto"}, 110) = -1 EACCES
(Permission denied)
close(5)                                = 0
time(NULL)                              = 1169155308
write(2, "Can\'t connect to UPS [xs1200] (n"..., 66Can't connect to UPS
[xs1200] (newhidups-auto): Permission denied
[snip ...]

For what it's worth:

# lsusb
Bus 005 Device 009: ID 051d:0002 American Power Conversion Back-UPS Pro
500/1000/1500

# ls -l /dev/bus/usb/005/009
crw-r--r-- 1 upsd root 189, 520 Jan 18 16:20 /dev/bus/usb/005/009

Any ideas?  I'm not sure where in the filesystem upsd is attempting to
write the "newhidups-auto" socket.  Thanks.

-- 
Kevin DeGraaf



More information about the Nut-upsuser mailing list