[arch] udev no longer honoring GROUP assignment?

Rafal Szczepaniak infopolia at adres.pl
Wed Oct 4 03:22:03 EDT 2006


Snarkout <snarkout at linuxfortherestofus.com>:
>SUBSYSTEMS=="scsi", ATTRS{vendor}=="Apple", KERNEL=="sd?2", ATTRS{model}=="iPod*", NAME="%k", SYMLINK+="ipod", GROUP="ipod"

SUBSYSTEMS== and ATTRS== matches also all parent devices - read previous posts 
about udev rules it's all explained already. 

It's IMHO genrally better to use SUBSYSTEMS and ATTRS if you include enough fields
to match a given device.

I would change the above rule a little. First it's better to use idVendor and idProduct 
pair if it's avaialable. Plug in your ipod, run lsusb and you'll have idVendor:idProduct
values. This way you won't need SUBSYSTEMS and other ATTRS. 

Also for assigning values use ":=" not "=" becuse this will ensure no other rule 
processed after your rule will change this value. If you want to be absolutely sure
place it in 00.udev.rules and add OPTIONS="last_rule" but is should work with ":="

So the rule should IMO look like this (replace values of idVendor and idProduct):

ATTRS{idVendor}=="aaaaaa", ATTRS{idProduct}=="bbbbbb", KERNEL=="sd?2", NAME="%k", SYMLINK+="ipod", GROUP:="ipod"

assuming that you have ipod group already created and your user is in this group. 

This rule should produce:
/dev/sdX2 root:ipod
/dev/ipod root:root linking to /dev/sdX2

-- 
Rafal Szczepaniak (lanrat)



More information about the arch mailing list