Libsane Matched Betting

Description

SettingScannerPermissions - Community Help Wiki

Ubuntu DocumentationIntroduction

If you can scan as sudo, but not as user, you likely have a permissions problem.

Scanner permissions are have changed significantly between distributions. In ancient times, permissions were handled by hotplug. Then they were handled by udev. Ubuntu 8.04 Hardy and 8.10 Intrepid used Hardware Abstraction Layer (HAL) to handle scanner permissions. With Ubuntu 9.04 Jaunty and newer, scanner permissions are again handled by udev. HAL is now completely disabled with Ubuntu 10.04.

Additionally, with a recent release, /etc/udev/rules.d/xx-libsane.rules moved to /lib/udev/rules.d/40-libsane.rules.

Recommended Fix

add the following two lines (change the scanner name and usb product id and vendor id to match your scanner):

Also, make sure your user is member of the scanner and saned groups.

Shotgun Approach

This method has security implications. It may be okay for a single user system, but is not recommended for multi user systems.

add a new file as /etc/udev/rules.d/40-scanner-permissions.rules with the following contents:

This fixes permissions and overrides the default rules in /lib/udev/rules.d/ so we persist after an upgrade.

Another shotgun solution that has been suggested is:

This method also has security issues for shared systems and it probably will not persist after rebooting computer or replugging scanner.