[Gllug] Scanner works only as root

Daniel P. Berrange dan at berrange.com
Fri Dec 30 17:04:18 UTC 2005


On Fri, Dec 30, 2005 at 05:51:08PM +0100, Martin A. Brooks wrote:
> Henry Gilbert wrote:
> >I've changed the permissions of all files in /proc/bus/usb/*
> >and temporarily it works
> 
> I'm no SANE expert but I'd be _really_ surprised if this was what caused 
> it to start working.  /proc differs so much across UNIXes that it would 
> be a really terrible way to try to address a device across multiple 
> platforms.

Applications won't typically refer to the USB device files directly, but
instead use the libusb library. This provides a portable API for accessing
USB devices, which under the hood will access /proc/bus/usb/* on the app's
behalf. No knowledge of the linux-specific /proc/bus/usb stuff need be
present in the app itself.

> >but this might get lost on reboot.
> 
> s/might/will/

Even just unplugging the scanner & plugging it back in again you will
loose the permissions settings, since these files are created & deleted
on the fly. Hence setting up hotplug to match the product & vendor id
and run a script is the optimal way to manage permissions.

Regards,
Dan.
-- 
|=-            GPG key: http://www.berrange.com/~dan/gpgkey.txt       -=|
|=-       Perl modules: http://search.cpan.org/~danberr/              -=|
|=-           Projects: http://freshmeat.net/~danielpb/               -=|
|=-   berrange at redhat.com  -  Daniel Berrange  -  dan at berrange.com    -=|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20051230/83bcfcf8/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list