linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Setting USB port permissions with udev rules ?
@ 2007-03-22 23:13 linuxguy
  2007-03-22 23:45 ` Kay Sievers
  2007-03-23 11:42 ` Sergey Vlasov
  0 siblings, 2 replies; 3+ messages in thread
From: linuxguy @ 2007-03-22 23:13 UTC (permalink / raw)
  To: linux-hotplug

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&CIDfiVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Setting USB port permissions with udev rules ?
  2007-03-22 23:13 Setting USB port permissions with udev rules ? linuxguy
@ 2007-03-22 23:45 ` Kay Sievers
  2007-03-23 11:42 ` Sergey Vlasov
  1 sibling, 0 replies; 3+ messages in thread
From: Kay Sievers @ 2007-03-22 23:45 UTC (permalink / raw)
  To: linux-hotplug

On 3/23/07, linuxguy <linuxguy123@gmail.com> wrote:
> 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"
>
> 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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Setting USB port permissions with udev rules ?
  2007-03-22 23:13 Setting USB port permissions with udev rules ? linuxguy
  2007-03-22 23:45 ` Kay Sievers
@ 2007-03-23 11:42 ` Sergey Vlasov
  1 sibling, 0 replies; 3+ messages in thread
From: Sergey Vlasov @ 2007-03-23 11:42 UTC (permalink / raw)
  To: linux-hotplug

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"
> 
> #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.

> 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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-03-23 11:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-22 23:13 Setting USB port permissions with udev rules ? linuxguy
2007-03-22 23:45 ` Kay Sievers
2007-03-23 11:42 ` Sergey Vlasov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).