Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1554032

Summary: saned doesn't have permissions to write on usb port
Product: [Fedora] Fedora Reporter: Todd <ToddAndMargo>
Component: sane-backendsAssignee: Nils Philippsen <nphilipp>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 27CC: andrea.vai, nphilipp, thibault.north, ToddAndMargo, zdohnal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1554406 (view as bug list) Environment:
Last Closed: 2018-11-30 21:36:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1554406    

Description Todd 2018-03-10 20:59:04 UTC
Dear Red Hat,

# rpm -qf /usr/lib/udev/rules.d/65-sane-backends.rules
sane-backends-1.0.27-12.fc27.x86_64

Does not give saned permission to use your scanner.

Please add the following two line to this file:

# Permissions must be given to the saned user to access scanners
ACTION=="add", ENV{libsane_matched}=="yes", GROUP="saned", MODE="0660"

Many thanks,
-T

Comment 1 Todd 2018-03-10 21:30:07 UTC
Note: you have to reboot to get this to take:

$ scanimage -L
device `epkowa:interpreter:001:003' is a Epson Perfection V300 flatbed scanner
device `net:localhost:epkowa:interpreter:001:003' is a Epson Perfection V300 flatbed scanner

$ xsane net:localhost
worked

Unplugging and replugging the scanner:
$ scanimage -L
device `epkowa:interpreter:001:008' is a Epson Perfection V300 flatbed scanner
device `net:localhost:epkowa:interpreter:001:008' is a Epson Perfection V300 flatbed scanner

$ xsane net:localhost
worked

Comment 2 Zdenek Dohnal 2018-03-12 11:00:52 UTC
Hi Todd,

thank you for reporting this issue! I'll create another udev file for just saned - because IMHO it doesn't need to be applied when saned isn't installed (sane-backends-daemon isn't installed) and I rewrite the patch a little bit.
Your patch sets the group ownership forcefully to saned, which blocks other groups to access usb port - I know, probably there will not be other groups, which try to access the port, but IMO it is bad to block device this way. I can do the same thing, but non-blocking way, by ACL. So the proposed rule is:

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

Would you mind testing the issue when I create testing package?

Comment 3 Fedora Update System 2018-03-12 14:19:14 UTC
sane-backends-1.0.27-15.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-27b31a3903

Comment 4 Fedora Update System 2018-03-12 19:41:07 UTC
sane-backends-1.0.27-15.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-27b31a3903

Comment 5 Todd 2018-03-12 22:20:43 UTC
(In reply to Zdenek Dohnal from comment #2)
> Would you mind testing the issue when I create testing package?

Sure.  Let me know when I can see the new RPM.

Comment 6 Zdenek Dohnal 2018-03-13 06:50:57 UTC
See link in #3, you can download rpms from the link and install it, or enable fedora-updates-testing repo temporarily and update sane-backends:

$ sudo dnf update --enablerepo=updates-testing sane-backends sane-backends-daemon sane-backends-drivers-scanners sane-backends-libs

Comment 7 Fedora Update System 2018-03-14 19:39:42 UTC
sane-backends-1.0.27-15.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Todd 2018-03-14 20:10:22 UTC
Upgrading:
 sane-backends                   x86_64  1.0.27-15.fc27  updates-testing  791 k
 sane-backends-daemon            x86_64  1.0.27-15.fc27  updates-testing   59 k
 sane-backends-drivers-cameras   i686    1.0.27-15.fc27  updates-testing   57 k
 sane-backends-drivers-cameras   x86_64  1.0.27-15.fc27  updates-testing   55 k
 sane-backends-drivers-scanners  i686    1.0.27-15.fc27  updates-testing  2.5 M
 sane-backends-drivers-scanners  x86_64  1.0.27-15.fc27  updates-testing  2.4 M
 sane-backends-libs              i686    1.0.27-15.fc27  updates-testing  111 k
 sane-backends-libs              x86_64  1.0.27-15.fc27  updates-testing  106 k


Did not work

and I did a 
     # systemctl restart saned.socket
to make sure

I never rebooted though.

And I did a dnf downgrade and it is still busted.

Comment 9 Zdenek Dohnal 2018-04-06 15:03:19 UTC
Can you try upgrading the package and unplugging and plugging USB scanner?

Comment 10 Todd 2018-04-07 07:50:58 UTC
I am on 1.0.27-15

I see no additional upgrades.

# dnf --enablerepo=* upgrade sane-backends 
...
Dependencies resolved.
Nothing to do.
Complete!

This update hosed the thing.  I can not get `xsane net` of PDF Studio to work at all.  The `xsane net:localhost` error is 

   Failed to open device `net:localhost`: Invalid argument

Plugging, unplugging, rebooting, accusing sand's parents of not being married does not help

Comment 11 Zdenek Dohnal 2018-04-17 07:10:32 UTC
Would you mind trying these rpms? https://zdohnal.fedorapeople.org/.sane/

Comment 12 Todd 2018-04-17 10:39:49 UTC
Mumble, mumble

# ls
imagescan-3.32.0-8.1.x86_64.rpm
sane-backends-1.0.27-16.fc27.x86_64.rpm
sane-backends-daemon-1.0.27-16.fc27.x86_64.rpm
sane-backends-daemon-debuginfo-1.0.27-16.fc27.x86_64.rpm
sane-backends-debuginfo-1.0.27-16.fc27.x86_64.rpm
sane-backends-debugsource-1.0.27-16.fc27.x86_64.rpm
sane-backends-devel-1.0.27-16.fc27.x86_64.rpm
sane-backends-drivers-cameras-1.0.27-16.fc27.x86_64.rpm
sane-backends-drivers-cameras-debuginfo-1.0.27-16.fc27.x86_64.rpm
sane-backends-drivers-scanners-1.0.27-16.fc27.x86_64.rpm
sane-backends-drivers-scanners-debuginfo-1.0.27-16.fc27.x86_64.rpm
sane-backends-libs-1.0.27-16.fc27.x86_64.rpm
sane-backends-libs-debuginfo-1.0.27-16.fc27.x86_64.rpm


# dnf install *.rpm
Last metadata expiration check: 0:48:11 ago on Tue 17 Apr 2018 02:50:02 AM PDT.
Error: 
 Problem: cannot install both sane-backends-1.0.27-16.fc27.x86_64 and sane-backends-1.0.27-16.fc27.x86_64
  - conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)

# rpm -qa \*sane-backends\*
<nothing>

Comment 13 Zdenek Dohnal 2018-04-17 11:16:44 UTC
(In reply to Todd from comment #12)
> Mumble, mumble
> 
> # ls
> imagescan-3.32.0-8.1.x86_64.rpm
What about moving out this rpm if you want to install by wildcard... probably it and other rpms are meddling with each other.
> 

> # rpm -qa \*sane-backends\*
> <nothing>

Do you know you wanted to find exact name '*sane-backends*' with it?... It's logical to find nothing.

Comment 14 Todd 2018-04-17 12:20:53 UTC
`# dnf clean all` fixed the issue with dnf.

And afterwards I had to reinstall Epon's stuff (iscan-gt-f720-bundle-1.0.1.x64.rpm), xsane, and simple-scan.

And do a:
# systemctl restart saned.socket

Now both `$ xsane net:localhost` and PDF Studio are happy campers.  They are also a lot faster too.

Yippee!

Thank you!

How soon will we see these in the repos?

-T

Comment 15 Zdenek Dohnal 2018-04-17 13:20:56 UTC
Check bodhi.fedoraproject.org, you can fasten the process by adding karma.

Comment 16 Fedora Update System 2018-04-17 14:32:01 UTC
sane-backends-1.0.27-16.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-bb4f22052e

Comment 17 Todd 2018-04-18 02:19:27 UTC
(In reply to Todd from comment #14)
 
> And do a:
> # systemctl restart saned.socket

Forgot to do a 
     # systemctl enable saned.socket
before the restart

Comment 18 Fedora Update System 2018-04-18 03:00:48 UTC
sane-backends-1.0.27-16.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-bb4f22052e

Comment 19 Fedora Update System 2018-04-19 08:02:51 UTC
sane-backends-1.0.27-17.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-cec6c36fcc

Comment 20 Todd 2018-04-19 08:35:41 UTC
Will this show up in FC28 beta too (I am in process of upgrading all my Fedora machines)?

Comment 21 Zdenek Dohnal 2018-04-19 09:55:50 UTC
It will show up in F28 after it will go through bodhi - that means currently it isn't in F28, but it is available in bodhi - see bodhi.fedoraproject.org for pending sane-backends updates. It will be pushed to F28 when the update will get enough karma. Please add karma to fasten the process.

Comment 22 Fedora Update System 2018-04-19 17:38:57 UTC
sane-backends-1.0.27-17.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-cec6c36fcc

Comment 23 Fedora Update System 2018-04-27 01:20:08 UTC
sane-backends-1.0.27-17.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 24 Ben Cotton 2018-11-27 15:42:31 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 25 Ben Cotton 2018-11-30 21:36:34 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 26 Zdenek Dohnal 2018-12-03 08:41:54 UTC
Actually fixed in current release, but automaton didn't close the bug.