Discussion:
Bug#918358: libsane:amd64: Missing permissions for scanner group on usb device
(too old to reply)
Alexandre Vaissière
2019-01-05 14:00:02 UTC
Permalink
Package: libsane
Version: 1.0.27-3.1
Severity: normal

Dear Maintainer,

I experience this issue since december 2018. I scan my docs every two monthes,
so I would not have noticed any change between october and december.

Context
-------

* investigation on the following issue
https://gitlab.gnome.org/World/OpenPaperwork/paperwork/issues/810
* Canon LiDE 700F scanner (USB)
* usage via saned daemon (run by systemd with saned user)
* saned user is in scanner group
* I have enabled saned daemon with

systemctl enable saned.socket
systemctl start saned.socket


Observed behaviour
------------------

saned seems to never find my device.

Indeed here are the results of sane-find-scanner, run by saned and by root:

$ sudo -u saned sane-find-scanner -q
could not open USB device 0x0b05/0x179c at 003:007: Access denied (insufficient
permissions)
could not open USB device 0x0451/0x8142 at 003:015: Access denied (insufficient
permissions)
could not open USB device 0x04a9/0x1907 at 003:014: Access denied (insufficient
permissions)
could not open USB device 0x0451/0x8142 at 003:013: Access denied (insufficient
permissions)
could not open USB device 0x046d/0xc52b at 003:004: Access denied (insufficient
permissions)
could not open USB device 0x1050/0x0407 at 003:006: Access denied (insufficient
permissions)
could not open USB device 0x05e3/0x0608 at 003:003: Access denied (insufficient
permissions)
could not open USB device 0x8087/0x0024 at 003:002: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0002 at 003:001: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0003 at 006:001: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0002 at 005:001: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0003 at 004:001: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0002 at 002:001: Access denied (insufficient
permissions)
could not open USB device 0x8087/0x0024 at 001:002: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0002 at 001:001: Access denied (insufficient
permissions)

$ sudo sane-find-scanner -q
found USB scanner (vendor=0x04a9 [Canon], product=0x1907 [CanoScan],
chip=GL847) at libusb:003:014

saned user does not have the proper permissions!

Expected behaviour
------------------

saned user should see my scanner, so that this scanner is usable via saned
daemon.

Possible lead
-------------

It seems to me that the /lib/udev/rules.d/60-libsane.rules file should contain
an action line such as

ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"

but i cannot find in my system version of this file.



-- System Information:
Debian Release: buster/sid
APT prefers testing
APT policy: (900, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8), LANGUAGE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libsane:amd64 depends on:
ii acl 2.2.52-3+b1
ii adduser 3.118
ii libavahi-client3 0.7-4+b1
ii libavahi-common3 0.7-4+b1
ii libc6 2.28-2
ii libgphoto2-6 2.5.21-1
ii libgphoto2-port12 2.5.21-1
ii libieee1284-3 0.2.11-13
ii libjpeg62-turbo 1:1.5.2-2+b1
ii libsane-common 1.0.27-3.1
ii libsnmp30 5.7.3+dfsg-4+b2
ii libssl1.1 1.1.1a-1
ii libtiff5 4.0.10-3
ii libusb-1.0-0 2:1.0.22-2
ii udev 240-2

Versions of packages libsane:amd64 recommends:
ii sane-utils 1.0.27-3.1

Versions of packages libsane:amd64 suggests:
ii avahi-daemon 0.7-4+b1
ii hplip 3.18.12+dfsg0-2

-- no debconf information
Jürgen Mellinger
2019-10-17 14:30:02 UTC
Permalink
I experience the same problem with 1.0.27-3.2.
Inspecting the udev rules, I found that the file 60-libsane.rules is missing a line to apply permissions to the device if it has been recognized.
Such a line is present towards the file’s end in older versions:

ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"

Putting this line into a file /etc/udev/rules.d/65-libsane.rules allows scanners to be recognized normally after a reboot.

-Juergen
Post by Alexandre Vaissière
Package: libsane
Version: 1.0.27-3.1
Severity: normal
Dear Maintainer,
I experience this issue since december 2018. I scan my docs every two monthes,
so I would not have noticed any change between october and december.
Context
-------
* investigation on the following issue
https://gitlab.gnome.org/World/OpenPaperwork/paperwork/issues/810
* Canon LiDE 700F scanner (USB)
* usage via saned daemon (run by systemd with saned user)
* saned user is in scanner group
* I have enabled saned daemon with
systemctl enable saned.socket
systemctl start saned.socket
Observed behaviour
------------------
saned seems to never find my device.
$ sudo -u saned sane-find-scanner -q
could not open USB device 0x0b05/0x179c at 003:007: Access denied (insufficient
permissions)
could not open USB device 0x0451/0x8142 at 003:015: Access denied (insufficient
permissions)
could not open USB device 0x04a9/0x1907 at 003:014: Access denied (insufficient
permissions)
could not open USB device 0x0451/0x8142 at 003:013: Access denied (insufficient
permissions)
could not open USB device 0x046d/0xc52b at 003:004: Access denied (insufficient
permissions)
could not open USB device 0x1050/0x0407 at 003:006: Access denied (insufficient
permissions)
could not open USB device 0x05e3/0x0608 at 003:003: Access denied (insufficient
permissions)
could not open USB device 0x8087/0x0024 at 003:002: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0002 at 003:001: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0003 at 006:001: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0002 at 005:001: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0003 at 004:001: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0002 at 002:001: Access denied (insufficient
permissions)
could not open USB device 0x8087/0x0024 at 001:002: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0002 at 001:001: Access denied (insufficient
Florent Rougon
2019-10-17 22:20:02 UTC
Permalink
Hello,

Same problem for me as well as for other people at [1]. This happened
after upgrading to 'buster' the machine where the scanner is plugged.
Adding the udev rule fixes the issue. This regression is annoying, it
would be nice for other users if our dear maintainers could fix it. :-)

Thanks & regards

[1] https://www.raspberrypi.org/forums/viewtopic.php?t=243513
--
Florent
Chris Nospam
2019-12-27 03:10:01 UTC
Permalink
This post might be inappropriate. Click to display it.
Chris Nospam
2020-06-11 05:50:02 UTC
Permalink
Dear Maintainer, dear Jörg,

the bug is closed since a couple of weeks. However, there was no patch released at least for debian testing. The (lib)sane version is still 1.0.27 and the bug(s) still exists.

$ dpkg -l | grep sane
ii libcommon-sense-perl 3.75-1+b1 amd64 module that implements some sane defaults for Perl programs
ii libkf5sane-data 19.08.1-1 all scanner library (data files)
ii libkf5sane5:amd64 19.08.1-1+b1 amd64 scanner library (runtime)
ii libsane:amd64 1.0.27-3.2+b1 amd64 API library for scanners
ii libsane:i386 1.0.27-3.2+b1 i386 API library for scanners
ii libsane-common 1.0.27-3.2 all API library for scanners -- documentation and support files
ii libsane-hpaio:amd64 3.20.5+dfsg0-3 amd64 HP SANE backend for multi-function peripherals
ii sane 1.0.14-15 amd64 scanner graphical frontends
ii sane-utils 1.0.27-3.2+b1 amd64 API library for scanners -- utilities
ii xsane 0.999-8 amd64 featureful graphical frontend for SANE (Scanner Access Now Easy)
ii xsane-common 0.999-8 all xsane architecture independent files

Are there any remaining quirks which are not documented here preventing a patch release? If not, please release the new version to testing.

Thanks for maintaining sane,

Chris
Jörg Frings-Fürst
2020-06-12 11:40:02 UTC
Permalink
Hello Chris,

the version 1.0.30-1~experimental2 is almost ready to start the upcoming
transition. At the moment only the build on 2 architectures[1] is missing.

As soon as they are finished I will talk to my mentor and apply for the start of
the transition.

Since the fix to fix the bug is quite simple[2] there is no bugfix release.

CU
Jörg

[1] https://buildd.debian.org/status/package.php?p=sane-backends&suite=experimental
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=918358#12
--
New:
GPG Fingerprint: 63E0 075F C8D4 3ABB 35AB 30EE 09F8 9F3C 8CA1 D25D
GPG key (long) : 09F89F3C8CA1D25D
GPG Key : 8CA1D25D
CAcert Key S/N : 0E:D4:56

Old pgp Key: BE581B6E (revoked since 2014-12-31).

Jörg Frings-FÌrst
D-54470 Lieser


git: https://jff.email/cgit/

Threema: SYR8SJXB
Wire: @joergfringsfuerst
Skype: joergpenguin
Ring: jff
Telegram: @joergfringsfuerst


My wish list:
- Please send me a picture from the nature at your home.
Loading...