linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Permissions of usb hub and its children
Date: Wed, 06 Sep 2006 00:35:44 +0000	[thread overview]
Message-ID: <20060906003544.GA23283@kroah.com> (raw)
In-Reply-To: <44FD48F6.6020900@gmail.com>

On Tue, Sep 05, 2006 at 11:50:03PM +0200, Fabian Steiner wrote:
> Greg KH wrote:
> > On Tue, Sep 05, 2006 at 11:52:54AM +0200, Fabian Steiner wrote:
> >> Hello!
> >>
> >> I am trying to change the permissions of my usb hub with the follwing
> >> udev rule:
> >>
> >> SUBSYSTEM="usb", DEVPATH="/devices/pci0000:00/0000:00:02.1/usb1/1-3",
> >> OWNER="fabi", MODE="600
> > 
> > What are you trying to change here?  The permissions of the usb hub in
> > usbfs?
> 
> Yes, my intension was to assign proper permissions to the usb hub so
> that all devices that are connected to that hub get the same permissions.

Ah, multi-user type setup?

> >> Doing so I hoped that all usb devices that will be connected to that hub
> >> would receive the same permissions but obviously it doesn't work.
> > 
> > No, hub permissions do not propagate down to the devices, sorry.
> > 
> >> Is there any possibility to achieve this goal using udev?
> > 
> > Yes, use much the same rule as above :)
> 
> What does the rule have to look like then? ;-) The main problem is that
> I don't know what kind of devices are plugged in the hub. So the udev
> rule has to match quite a lot of devices (block devices, scanner, mouse,
> etc.).
> 
> Having a more closer look at different manpages and howtos I have found
> a solution that is almost suitable:
> 
> SUBSYSTEM="*",
> ENV{PHYSDEVPATH}="/devices/pci0000:00/0000:00:02.1/usb1/1-3*",
> OWNER:="fabi", MODE:="600"
> 
> I am not quite sure whether this rule will fulfill all of my
> requirements but so far it looks good. I.e. I don't know for sure
> whether ENV{PHYSDEVPATH} is set for all devices and whether it contains
> a sysfs address. Perhaps you could give me a hint :-)

Yes, that should work.  But remember, "usb1" the next time you boot
might not be the same root hub you thought it was last time.  That all
depends on PCI bus numbering (which can change, but rarely), and USB
host controller driver loading order (which changes often due to the
phase of the moon and such.)

So be careful about that.

good luck,

greg k-h

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x120709&bid&3057&dat\x121642
_______________________________________________
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

  parent reply	other threads:[~2006-09-06  0:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-05  9:52 Permissions of usb hub and its children Fabian Steiner
2006-09-05 17:54 ` Greg KH
2006-09-05 21:50 ` Fabian Steiner
2006-09-06  0:35 ` Greg KH [this message]
2006-09-06  0:50 ` Kay Sievers
2006-09-06  7:15 ` Fabian Steiner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060906003544.GA23283@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).