Setting USB port permissions with udev rules ?
Somewhat off topic. Sorry. I don't know where else to turn for advice.
I have several USB devices that I need to set permissions for. I have created a file called 55-myusb-rules and put it in /etc/udev/rules.d.
This is the file:
#OLIMEX USB JTAG Debugger
#This one works
SYSFS{idProduct}="0003", SYSFS{idVendor}="15ba", MODE="666", OWNER="xxx", GROUP="users"
#PL2303 USB SERIAL DEVICES
#This one works
SYSFS{idProduct}="2303", SYSFS{idVendor}="067b", MODE="666", OWNER="xxx", GROUP="users"
#Custom Device
#This rule does not work ! SYSFS{idProduct}=”0004”, SYSFS{idVendor}=”efff”, MODE=”666”, OWNER="xxx", GROUP-"users"
As the comments in the rules state, the permissions do not set properly for the last device.
Here is what is on my computer for USB devices.
$ lsusb Bus 002 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port Bus 002 Device 003: ID 15ba:0003 Bus 002 Device 001: ID 0000:0000 Bus 003 Device 006: ID efff:0004 Bus 003 Device 002: ID 046d:c512 Logitech, Inc. Bus 003 Device 001: ID 0000:0000 Bus 004 Device 001: ID 0000:0000 Bus 001 Device 001: ID 0000:0000
$ ls -l /dev/bus/usb/003/ total 0 crw-rw-r-- 1 root root 189, 256 2007-03-22 01:26 001 crw-rw-r-- 1 root root 189, 257 2007-03-22 11:26 002 crw-rw-r-- 1 root root 189, 261 2007-03-22 11:15 006
Yet for the first two...
ls -l /dev/bus/usb/002/
total 0
crw-rw-r-- 1 root root 189, 128 2007-03-22 01:26 001 crw-rw-r-- 1 xxx users 189, 129 2007-03-22 07:26 002 crwxrwxrwx 1 xxx users 189, 130 2007-03-22 11:08 003
If I manually set the permissions for the third device, it works fine. Why doesn't my rule set the permission for the 3rd device ?
Thanks.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID�VDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 8 lines · linuxguy
I have several USB devices that I need to set permissions for. I have created a file called 55-myusb-rules and put it in
/etc/udev/rules.d.#Custom Device
#This rule does not work ! SYSFS{idProduct}="0004", SYSFS{idVendor}="efff", MODE="666", OWNER="xxx", GROUP-"users"
Quoted 4 lines
As the comments in the rules state, the permissions do not set properly for the last device.
If I manually set the permissions for the third device, it works fine. Why doesn't my rule set the permission for the 3rd device ?
It should be GROUP= instead of GROUP-, does that make a difference?
Kay
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 5 lines · On Thu, 22 Mar 2007 17:13:18 -0600 linuxguy wrote:
#OLIMEX USB JTAG Debugger
#This one works
SYSFS{idProduct}="0003", SYSFS{idVendor}="15ba", MODE="666", OWNER="xxx", GROUP="users"
Quoted 8 lines
#PL2303 USB SERIAL DEVICES
#This one works
SYSFS{idProduct}="2303", SYSFS{idVendor}="067b", MODE="666", OWNER="xxx", GROUP="users"#Custom Device
#This rule does not work !
SYSFS{idProduct}=___0004___, SYSFS{idVendor}=___efff___, MODE=___666___,
This line contained Unicode U+201D "RIGHT DOUBLE QUOTATION MARK" characters instead of ASCII U+0022 "QUOTATION MARK" characters. Other (working) lines contain proper ASCII quotes.
Quoted 1 line
OWNER="xxx", GROUP-"users"
And here is '-' instead of '=' sign.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel