Setting permissions on serial port
Jon Stanley
fedora at rmrf.net
Fri Dec 21 19:20:38 UTC 2007
On 12/20/07, Tom Horsley <tom.horsley at att.net> wrote:
> Yea, I finally did that myself, much simpler that wading through
> the maze of udev stuff :-).
udev is actually fairly easy. I just took RH436 (Red Hat Clustering
and Storage Management) where there's a unit on udev. To find out all
of the attirbutes that you can use to describe a device, the following
command is useful:
udevinfo -ap `udevinfo -q path -n /dev/sda`
replacing /dev/sda with the serial port that you are interested in. I
would probably use for the harddrive above:
KERNEL=="sd[a-z]$", ATTRS{model}=="ST3808110AS ",
OWNER=="someone", GROUP=="something", SYMLINK+="whatever"
For that specific model of drive in my machine (for some reason there
is no ATA serial number provided by libata :( ), that will set the
owner to someone, group to something, and add a symlink /dev/whatever
to it. For the USB serial port, I would probably add BUS=="usb" and
the serial number of the serial port.
Put this in /etc/udev/rules.d/75-custom.rules for example.
More information about the fedora-list
mailing list