Web lists-archives.com

Re: Scanner problem




On Tue 12 Sep 2017 at 21:21:33 +0200, MENGUAL Jean-Philippe wrote:

> Le 12/09/2017 à 11:22, Brian a écrit :
> > On Mon 11 Sep 2017 at 19:23:09 +0200, MENGUAL Jean-Philippe wrote:
> > 
> >> Two scanners: 1=Epson; 2=canon. 1 works fine, as root and as user. Canon
> >> works as root but not as user, scanimage and sane-find-scanner do not
> >> find it.
> > 
> > Do we assume your system is a stretch one? Please post the model names
> > of the scanners.
> 
> 
> I try on Stretch and Buster.
> 
> We have Epson Perfection 3490 and Canon Lide 120.
> 
> >> While /dev/bus/usb/001/0XX is owned by root:root,, but as well by the
> >> scanner group (where my user is), it is not the case with Canon, the
> >> device is owned only by root:root.
> > 
> > On jessie and stretch a user is not required to be in the scanner group.
> > 
> > Post the output of 'ls -l /dev/bus/usb/*/*' for both scanners.
> 
> For Epson:
> crw-rw-r--  1 root root 189, 136 sept. 12 21:07 /dev/bus/usb/002/009
> crw-rw-r--+ 1 root root 189,  28 sept. 12 21:06 /dev/bus/usb/001/029
> crw-rw-r--  1 root root 189,  27 sept. 12 20:56 /dev/bus/usb/001/028
> crw-rw-r--  1 root root 189,   1 sept. 12 20:56 /dev/bus/usb/001/002
> crw-rw-r--  1 root root 189, 129 sept. 12 20:56 /dev/bus/usb/002/002
> crw-rw-r--  1 root root 189,   0 sept. 11 18:56 /dev/bus/usb/001/001
> crw-rw-r--  1 root root 189, 128 sept. 11 18:56 /dev/bus/usb/002/001
> crw-rw-r--  1 root root 189, 131 sept. 11 18:56 /dev/bus/usb/002/004
> crw-rw-r--  1 root root 189,   2 sept.  5 20:04 /dev/bus/usb/001/003

This is exactly what you would expect for a supported scanner. In
particular, the ACL:

  crw-rw-r--+ 1 root root 189,  28 sept. 12 21:06 /dev/bus/usb/001/029

> For Canon:
> crw-rw-r-- 1 root root 189, 136 sept. 12 21:09 /dev/bus/usb/002/009
> crw-rw-r-- 1 root root 189,  29 sept. 12 21:09 /dev/bus/usb/001/030
> crw-rw-r-- 1 root root 189,  27 sept. 12 20:56 /dev/bus/usb/001/028
> crw-rw-r-- 1 root root 189,   1 sept. 12 20:56 /dev/bus/usb/001/002
> crw-rw-r-- 1 root root 189, 129 sept. 12 20:56 /dev/bus/usb/002/002
> crw-rw-r-- 1 root root 189,   0 sept. 11 18:56 /dev/bus/usb/001/001
> crw-rw-r-- 1 root root 189, 128 sept. 11 18:56 /dev/bus/usb/002/001
> crw-rw-r-- 1 root root 189, 131 sept. 11 18:56 /dev/bus/usb/002/004
> crw-rw-r-- 1 root root 189,   2 sept.  5 20:04 /dev/bus/usb/001/003

There is no ACL for any device. But the Canon Lide 120 is a supported
device for SANE according to

  http://www.sane-project.org/sane-mfgs.html#Z-CANON
 
> FYI (and without I do any configuration anywhere, I just plug in scanners):
> getfacl /dev/bus/usb/001/031:
> 
> Canon:
> getfacl : suppression du premier « / » des noms de chemins absolus
> # file: dev/bus/usb/001/031
> # owner: root
> # group: root
> user::rw-
> group::rw-
> other::r--

You would want to have "user:jp:rw-", as you do with the Epson.
 
> getfacl /dev/bus/usb/001/032 (EPSON):
> getfacl : suppression du premier « / » des noms de chemins absolus
> # file: dev/bus/usb/001/032
> # owner: root
> # group: root
> user::rw-
> user:jp:rw-
> group::rw-
> group:scanner:rw-
> mask::rw-
> other::r--

The file /lib/udev/rules.d/60-libsane.rules does not have an entry for
the 120. See what happens with scanner detection if you add

  ATTRS{idvendor}=="04a9", ATTRS{idProduct}="x", ENV{libsane_matched}="yes"

to 60-libsane.rules?

You get "x" from the 'lsusb' command.

-- 
Brian.