[sane-devel] wrong permissions for usb scanner at boot time SOLVED

Klaus-Peter Schrage kpschrage at gmx.de
Sun Feb 29 19:17:24 GMT 2004


Klaus-Peter Schrage wrote:
> My AGFA Snapscan 1212_U has been working properly for years, using the 
> scanner module in the kernel (now Redhat 9).
> On the occasion of a kernel upgrade to 2.6.x I wanted to shift from the 
> kernel module to libusb.
> 
> The story so far:
> - got me recent rpms of libusb, sane, hotplug ...
> - added a "scanner" line for the Snapscan with the appropriate idVendor 
> and idProduct to /etc/hotplug/usb.usermap
> - put a script called "scanner" into /etc/hotplug/usb which sets the 
> permissions of the usb device to world read/write:
>     if [ "$ACTION" = "add" -a "$TYPE" = "usb" ]; then
>       chmod 0666 "$DEVICE"
>     fi
> 
> All is working as expected if I plug in the scanner after the system is 
> running, and I can access the scanner as a normal user then.
> BUT: permissions aren't set at system startup, even with the scanner 
> plugged in, I always have to dis- and reconnect the usb cable to get the 
> scanner to work.
> 
> I feel that I am missing something very obvious, so any pointers would 
> be welcome.

Oh, I was too blind to see, the solution is quite simple:
In the process of upgrading from kernel 2.4.x to 2.6.x I had to change 
Redhat's startup script /etc/rc.d/rc.sysinit several times, resulting in 
hotplug being started BEFORE usbfs got mounted. Thus, permissions on the 
device files in /proc/bus/usb/ couldn't be adjusted by 
/etc/hotplug/usb/scanner.
Sorry, Klaus




More information about the sane-devel mailing list