[sane-devel] /proc/bus/usb/001/002 , write permission changes
required, is that normal behaviour?
Bertrik Sikken
bertrik at zonnet.nl
Tue Aug 30 20:25:25 UTC 2005
Rayudu Addagarla wrote:
> Hello
> When i run scanimage -L as user i dont see the devices.
> when i run as root i can see the devices.
> i set Debug on and i see plustek backend says open failed.
>
> sane-find-scanner gives that device is libusb:001:002
> The permission on the /proc/bus/usb/001/002 device file has read
> permissions to everyone.
> -rw-r--r-- 1 root root 43 2005-08-29 17:42 002
>
> I had to change to have write permissions to other like,
> -r--r--rw- 1 root root 57 2005-08-30 12:22 002
> then only as user i can see the device with scanimage -L
>
> Is this a common behavior? I expect to have only read perms and does not
> require write perms.
>
> My system configuration:
> SuSE , Version = 9.1
> sane-frontends-1.0.13-2
> xsane-gimp-0.95-3
> sane-backends-1.0.15-9
> xsane-0.95-3
You usually need both read and write permission on the /proc/bus/usb
device files to access a scanner. For example, a backend probably
needs to send scan settings to the scanner before starting a scan
and this requires write permission. This may even be the case for
positively identifying the scanner.
By default, kernel 2.6 sets the permission quite restrictive.
As far as I know, distros solve this by using a hotplug script
that updates the permission for the /proc/bus/usb files to r/w
for a group called 'scanner' or 'usb'. Any user who wants to
access the scanner needs to be a member of this group.
So perhaps the hotplug script is not working properly on your PC.
Bertrik
More information about the sane-devel
mailing list