(There have been lots of similar problems reported elsewhere [
https://duckduckgo.com]. This could be a rough draft for a tutorial.)
The usual suspects, `sane-find-scanner -q` and `scanimage -L` produce the correct results for root, but not for anyone else. Usbfs, which used to be mounted in /proc/bus/usb, is now deprecated; hotplug is deprecated, devfs is deprecated; HAL is deprecated. The kernel developers have been migrating to udev for device detection and initialization for nearly a decade. Udev now populates /dev, which is mounted as filetype tempfs during startup and vanishes upon power-off. Things that used to be in procfs are now in sysfs, which is mounted as /sys and populated by udev. Udev rules are in /lib/udev/rules.d and /etc/udev/rules.d. Scanner manufacturers send their scanner <mfg>.desc description files to the sane folks, who add those descriptions the sane db, then scripts which run as part of the makefile/compile process, like tools/sane-desc, reference those <mfg>.desc files to populate /etc/sane.d with <backend>.conf files and create /lib/udev/rules.d/xx-libsane.rules.
Although it may seem that somewhere along the way things kind of went haywire, once the migration to udev and dracut is complete, such matters will be a lot easier to manage.
I'll use my HP Scanjet 5307C as an example, hoping that someone will write a script that does all this setup automagically.
I looked in /etc/sane.d, but found no custom conf file dedicated to that model. I eventually discovered that the avision backend includes my scanner, with no configuration options needed, that is, leave all the lines in avision.conf commented out.
The default rule for the Avision back-end (most HP flatbed scanners) creates the device links either during startup or when the scanner is turned on and/or the usb cable is plugged into a usb port.
First invoke `lsusb` to get the bus and id assignments: "Bus 002 Device 002: ID 03f0:0701 Hewlett-Packard ScanJet 5300c/5370c" for my scanner. When I invoked `ls -l /dev/bus/usb/002/002`, I discovered that root:root owned it with mode 0664 permissions, which explains the fact that when logged in as root, `scanimage -L` finds the scanner, but not using my user account.
While getting lost among the recursive loops in /sys, I learned that `udevadm info` is your friend.
There is probably a more elegant way to do this, but I dumped the entire udev dabase into a pipe, then grepped the device ID using the `less` command :/3f0.
`udevadm info --export-db | less`
Copy/paste everything from the parent node {P:} to the last environment attribute {E:}, I had everything needed for the next step.
If you create a file in /etc/udev/rules.d with the same name as the scanner rules file in /lib/udev/rules.d, the one in /etc/udev takes precedence. I copied 65-libsane.rules from /lib/udev to /etc/udev, opened /etc/udev/rules.d/65-libsane.rules in a convenient text editor, deleted the entries for other usb and all the scsi devices, uncommented the ENV line because the distribution /boot/config file had commented out the usb device class (#CONFIG_USB_DEVICE_CLASS=n), then created a rule to let me scan.
The extracted udev database entry for my libusb:002:002 device contains attribue-value pairs. I added a line above the libsane_matched rule using idVendor and ifProduct:
ATTRS{manufacturer}=="Hewlett Packard", ATTRS{product}=="Hewlett Packard ScanJet 5300C/5370C ", OWNER="root", GROUP="scanner"
Now all I had to do was create a group named "scanner" and add my user name to that group. I rebooted, (there's a more elegant way to update udev's rules.d) and started scanning, from the command line, then xsane and gimp.
If you are brave of heart, you might proceed as outlined, or just wait for an update that includes a udev rule that changes the scanner group from root. Meanwhile, you can `chmod o+w` the /dev/bus/usb entry for your scanner every startup.