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 1554406 - saned doesn't have permissions to write on usb port
Summary: saned doesn't have permissions to write on usb port
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sane-backends
Version: 7.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Zdenek Dohnal
QA Contact: Dominik Rehák
URL:
Whiteboard:
Depends On: 1554032
Blocks: 1549614
TreeView+ depends on / blocked
 
Reported: 2018-03-12 15:48 UTC by Zdenek Dohnal
Modified: 2018-10-30 08:09 UTC (History)
9 users (show)

Fixed In Version: sane-backends-1.0.24-12.el7
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of: 1554032
Environment:
Last Closed: 2018-10-30 08:09:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3078 0 None None None 2018-10-30 08:09:50 UTC

Description Zdenek Dohnal 2018-03-12 15:48:14 UTC
+++ This bug was initially created as a clone of Bug #1554032 +++

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

--- Additional comment from Todd on 2018-03-10 16:30:07 EST ---

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

--- Additional comment from Zdenek Dohnal on 2018-03-12 07:00:52 EDT ---

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?

--- Additional comment from Fedora Update System on 2018-03-12 10:19:14 EDT ---

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 8 errata-xmlrpc 2018-10-30 08:09:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3078


Note You need to log in before you can comment on or make changes to this bug.