SCIENTIFIC-LINUX-USERS Archives

December 2009

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Konstantin Olchanski <[log in to unmask]>
Reply To:
Konstantin Olchanski <[log in to unmask]>
Date:
Mon, 7 Dec 2009 10:56:13 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (32 lines)
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.



ladd00:~$ more etc_udev_rules.d_49-usb_chmod_udev.rules 

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

ATOM RSS1 RSS2