Re: Fw: access permissions for udev / usb device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > My base problem is that I can access a USB device
> (Tektronix TDS
> > 2014B oscilloscope) only as root.
> ...
> > the device & endpoints are added to GID=1000 w/
> permissions 664
> > (illustrated below), but this still does not allow
> non-root users to
> > actually control the device.  (I get an
> "Operation not permitted"
> > error
> 
> How are you trying to control the device?  What software
> and what
> interface is it using?  If (for example) you're using
> an older version
> of libusb that uses /proc/bus/usb, you'll have problems
> because udev
> only sets permissions on /dev/bus/usb.  You could use a
> rule similar
> to this to set it in both places ($ENV{DEVICE} points to
> /proc/bus/usb):
> 
> ATTRS{idVendor}=="04d8", MODE="0664",
> GROUP="plugdev"
> ATTRS{idVendor}=="04d8", RUN+="/bin/chmod
> 664 $ENV{DEVICE}"
> ATTRS{idVendor}=="04d8", RUN+="/bin/chgrp
> plugdev $ENV{DEVICE}"

Adding the RUN+= commands doesn't seem to have made a difference.  Before this most-recent change, the file in /dev/bus/usb was assigned to root-usb-664 and the file in /proc/bus/usb was assigned to root-root-644.  After the change, ll confirms the permissions & group-assignment of the relevant files were altered (root-usb-664 for both devices).  I'm attaching the modified 10-libsane.rules; my copy of 55-libsane.rules contains a similar section where the "Tektronix" code was before.

TO answer your other questions, the low-level interface to the usb port is through libusb-0.1.12.  That's being wrapped by pyusb-0.4.1, and my code is  actually written in Python 2.5.1.  I've tried skipping the Python intermediary, but something gets lost in conversion when I try to write up the control code in C.  I get intermittent "timeout" errors as both root and non-root.   The timeout errors occur with similar frequencies on two different machines and are frustratingly difficult to isolate / predict / control  (I've some descriptions on them over in the libusb-devel archives if anyone's curious...)

The current (permissions) difficulty seems separate - it appears on one machine (SUSE 10.3, udev 114, Python 2.5.1), but not on another one (SUSE 10.0, udev 068, Python 2.4.1).  The versions of libusb and (I think) pyusb are the same on both machines.  The permissions difficulty is also entirely reproducible.

Any ides on how I can isolate & fix its cause?

Thanks.
-Sarah



      

Attachment: 10-libsane.rules
Description: Binary data


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux