[Nut-upsuser] MGE Evolution, USB and linux
Rodrigo Ventura
yoda at isr.ist.utl.pt
Wed Jun 7 11:45:05 UTC 2006
Let me add the following to my previous email: a strace of upsdrvctl
# strace -ff /usr/local/nutups/bin/upsdrvctl start
execve("/usr/local/nutups/bin/upsdrvctl", ["/usr/local/nutups/bin/upsdrvctl", "start"], [/* 34 vars */]) = 0
[...]
[pid 7422] open("/proc/bus/usb/001/002", O_RDONLY) = 5
[pid 7422] read(5, "\22\1\20\1\0\0\0\10c\4\377\377\0\1\4\2102\1", 18) = 18
[pid 7422] read(5, "\t\2\"\0\1\1\0\340", 8) = 8
[pid 7422] read(5, "\24\t\4\0\0\1\3\0\0\0\t!\0\1!\1\"T\6\7\5\201\3\10\0\24"..., 26) = 26
[pid 7422] close(5) = 0
[pid 7422] getdents64(4, /* 0 entries */, 4096) = 0
[pid 7422] close(4) = 0
[pid 7422] open("/proc/bus/usb/001/001", O_RDWR) = -1 EACCES (Permission denied)
[pid 7422] open("/proc/bus/usb/001/001", O_RDONLY) = 4
[pid 7422] ioctl(4, USBDEVFS_CONTROL, 0xbfffc550) = -1 EPERM (Operation not permitted)
[pid 7422] ioctl(4, USBDEVFS_CONTROL, 0xbfffc550) = -1 EPERM (Operation not permitted)
[pid 7422] close(4) = 0
[pid 7422] open("/proc/bus/usb/001/002", O_RDWR) = -1 EACCES (Permission denied)
[pid 7422] open("/proc/bus/usb/001/002", O_RDONLY) = 4
[pid 7422] ioctl(4, USBDEVFS_CONTROL, 0xbfffc550) = -1 EPERM (Operation not permitted)
[pid 7422] ioctl(4, USBDEVFS_CONTROL, 0xbfffc550) = -1 EPERM (Operation not permitted)
[pid 7422] ioctl(4, USBDEVFS_CONTROL, 0xbfffc550) = -1 EPERM (Operation not permitted)
[pid 7422] ioctl(4, USBDEVFS_CLAIMINTERFACE, 0xbfffc6f4) = -1 EPERM (Operation not permitted)
[pid 7422] ioctl(4, USBDEVFS_IOCTL, 0xbfffc6d0) = -1 EPERM (Operation not permitted)
[pid 7422] ioctl(4, USBDEVFS_CLAIMINTERFACE, 0xbfffc6f4) = -1 EPERM (Operation not permitted)
[pid 7422] ioctl(4, USBDEVFS_IOCTL, 0xbfffc6d0) = -1 EPERM (Operation not permitted)
[pid 7422] ioctl(4, USBDEVFS_CLAIMINTERFACE, 0xbfffc6f4) = -1 EPERM (Operation not permitted)
[pid 7422] ioctl(4, USBDEVFS_IOCTL, 0xbfffc6d0) = -1 EPERM (Operation not permitted)
[pid 7422] ioctl(4, USBDEVFS_CLAIMINTERFACE, 0xbfffc6f4) = -1 EPERM (Operation not permitted)
[pid 7422] ioctl(4, USBDEVFS_CONTROL, 0xbfffc6c0) = -1 EPERM (Operation not permitted)
[pid 7422] close(4) = 0
[pid 7422] write(2, "No matching USB/HID UPS found\n", 30No matching USB/HID UPS found
) = 30
[...]
Seems the driver has no R/W permission, probably because of a change
of UID of the driver.
# ls -laF /proc/bus/usb/001/
total 0
dr-xr-xr-x 1 root root 0 Jun 7 11:07 ./
dr-xr-xr-x 1 root root 0 Jun 7 11:07 ../
-rw-r--r-- 1 root root 18 Jun 7 11:07 001
-rw-r--r-- 1 root root 18 Jun 7 11:07 002
Since this is a usbdevfs, how can I make this read/writable by nutups user?
Cheers,
Rodrigo Ventura
--
*** Rodrigo Martins de Matos Ventura <yoda at isr.ist.utl.pt>
*** Web page: http://www.isr.ist.utl.pt/~yoda
*** Teaching Assistant and PhD Student at ISR:
*** Instituto de Sistemas e Robotica, Polo de Lisboa
*** Instituto Superior Tecnico, Lisboa, PORTUGAL
*** PGP fingerprint = 0119 AD13 9EEE 264A 3F10 31D3 89B3 C6C4 60C6 4585
More information about the Nut-upsuser
mailing list