USB device permissions

Derek Broughton news at pointerstop.ca
Mon Mar 20 19:26:26 UTC 2006


Peter Clark wrote:

> On Monday 20 March 2006 16:40, Derek Broughton wrote:
>> Gabriel Dragffy wrote:
>> > I didn't find the exact file permissions.d but I did
>> > have: /etc/udev/permissions.rules
>> >
>> > this contained the following:
>> > # USB devices
>> > BUS=="usb", KERNEL=="legousbtower*", MODE="0666"
>> > BUS=="usb", KERNEL=="lp[0-9]*", GROUP="lp"
>> > BUS=="usb", KERNEL=="ub[a-z]*", NAME="%k", MODE="0640", GROUP="plugdev"
>> >
>> > My user account is already registered as being in the group "plugdev",
>> > but still lacks some permissions with reading and writing.
>>
>> OK, note that there are no /dev/sd* devices in that set.  You're looking
>> for KERNEL=="sd[a-z]*"
>     Running `grep -r KERNEL== * | grep "sd\[a" *` in /etc turned up
>     nothing. I'm beginning to think that the settings are compiled into
>     some program,

Sorry, I guess I misled you.  There's no reason it should necessarily say
"sd[a-z]" at all.  I simply meant that none of those rules applied to sda
devices.  I would expect that you're getting defaults - accessible to owner
only, where owner=root.

In my case (on a current dapper system):

derek at othello:~$ grep sd /etc/udev/*/*
/etc/udev/permissions.d/udev.permissions:isdn[0-9]*:root:dialout:0660
/etc/udev/permissions.d/udev.permissions:isdnctrl[0-9]*:root:dialout:0660
/etc/udev/permissions.d/udev.permissions:sd[a-z]:root:disk:0660
/etc/udev/permissions.d/udev.permissions:sd[a-z][0-9]*:root:disk:0660
...

So if you _have_ a permissions.d directory (not a file - I don't think
breezy did have this), you just need to make sure that you have 
 sd[a-z]:root:disk:0660
in there somewhere.

Otherwise make a rule like those above, but for sda or sd[a-z], you don't
need the NAME parameter, set MODE="0660" and GROUP="disk".
-- 
derek





More information about the kubuntu-users mailing list