From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabian Steiner Date: Wed, 06 Sep 2006 07:15:17 +0000 Subject: Re: Permissions of usb hub and its children Message-Id: <44FE7585.3060708@gmail.com> List-Id: References: <44FD48F6.6020900@gmail.com> In-Reply-To: <44FD48F6.6020900@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Greg KH wrote: > 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? Exactly :-) As there is no solution for this so far, we tried to do it on our own, but as you can see we are not that successful since there are quite a lot of different aspects to think of. Our current solution is based on a simple python script which is executed whenever a user logins (by using the PostLogin mechanism of GDM). It then reads the environment variables $DISPLAY and $USER which are set by GDM properly and tries to find out whether a usb hub was assigned to that particular display. This is done manually by using a config file. If someone is interested, I will publish the script. >> 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. Oh, I wasn't aware of that so far. I will probably have to rethink the whole thing, I suppose ... Of course, the system should work under all circumstances and not when the moon wants it to ;-) > good luck, > > greg k-h > Thank you, Fabian STeiner ------------------------------------------------------------------------- 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&kid0709&bid&3057&dat1642 _______________________________________________ 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