Comment 25 for bug 773617

Revision history for this message
Tom Schutter (t-schutter) wrote :

I am running 12.04 (Precise). On my machine, the problem turned out to be that the saned user was not part of the scanner group. So the simple solution for me was to add the saned user to the scanner group with the command:

sudo adduser saned scanner

Diagnosing the problem was made difficult by the fact that the group of the device file is root. On my machine, sane-find-scanner reveals that my scanner is at libusb:003:002. There is no "normal" indication that the scanner group can read the device:

$ ls -l /dev/bus/usb/003/002
crw-rw-r--+ 1 root root 189, 257 Oct 13 09:02 /dev/bus/usb/003/002

You must use the getfacl command to determine that the scanner group has read permission:

$ getfacl /dev/bus/usb/003/002
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/003/002
# owner: root
# group: root
user::rw-
user:tom:rw-
group::rw-
group:scanner:rw-
mask::rw-
other::r--

We can see that the scanner group was granted read permission via setfacl:

$ grep setfacl /lib/udev/rules.d/40-libsane.rules
ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"