[elrepo] kmod-option, buggy?

Alan Bartlett ajb at elrepo.org
Fri Dec 18 07:40:55 EST 2009


Here follows a post to a recent Scientific Linux m/l thread. I don't
know if it will be of any use / interest . . .


On Fri, Dec 04, 2009 at 02:22:03PM -0600, James Battat wrote:
>
> I would like to configure my SL5.3 system so that when a USB device (a
> LabJack U3-LV) is plugged in, the group is automatically set to "adm" so
> that members of that group can read/write the device.
>

Here is the magic incantation I use to set permissions on USB-serial devices,
it goes into /etc/udev/rules.d/49-usb_chmod_udev.rules

Observe the "RUN+=" entry executes the "chmod" command to change device
permissions, you may need to change it to "chown" to change ownership.


ACTION=="add", SUBSYSTEM=="usb_device", \
       PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf
bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", RUN+="/bin/chmod a+wr
/proc/%c" \
       NAME="%c", MODE="0666"

KERNEL=="ttyUSB*", NAME="%k", GROUP="uucp", MODE="0666", OPTIONS="last_rule"


--
Konstantin Olchanski
Data Acquisition Systems: The Bytes Must Flow!
Email: olchansk-at-triumf-dot-ca
Snail mail: 4004 Wesbrook Mall, TRIUMF, Vancouver, B.C., V6T 2A3, Canada



More information about the elrepo mailing list