Hi Ralph,

Ralph Ronnquist writes:

> leloft wrote on 14/11/17 21:13:
>> Hello to everyone,
>>
>> Please, has anybody out there had any experience with the
>> Epson-derived epkowa non-free backend for sane.  I am trying to set up a
>> scanner (Epson V100) on a remote headless machine in the lab coupled to
>> an rsync script to transfer the scanned images to another machine with
>> a GUI for processing.
>>
>> I am getting permissions problems with libusb, so I have
>> (1) added sane, iscan, epkowa rules
>> to /etc/udev/rules.d, /lib/udev/rules.d
>> (2) changed permissions (to 666, 777, and back to 644) of the device
>> found by sane-find-scanner at /dev/bus/usb/002/003
>> (3) added the user to the scanner and saned groups
>> (4) turned the scanner off and on, rebooted the computer
>> (5) launching scanimage as root and as a normal user
>> (6) issuing $SANE_DEBUG_SANEI_USB=255 scanimage -v -v -v> test.pnm 2>
>> usb-verbose.log which gives the output
>> ...
>> [sanei_debug] Setting debug level of sanei_usb to 255.
>> [sanei_usb] sanei_usb_init: initializing libusb-1.0
>> [sanei_usb] sanei_usb_scan_devices: marking existing devices
>> [sanei_usb] libusb_scan_devices: Looking for libusb-1.0 devices
>> [sanei_usb] libusb_scan_devices: found libusb-1.0 device
>> (0x04b8/0x012d) interface 0 at libusb:002:003
>> [sanei_usb] store_device: add dn 0 with libusb:002:003
>> ...
>>
>> but none of this works: I am still getting those permissions issues
>>
>> $ scanimage -p > test.pnm
>> scanimage: open of device epkowa:usb:002:003 failed: Access to resource
>> has been denied
>>
>> Am I putting these rules in the right places and/or
>> what permissions should i assign (i thought 777 would do it...!)?  The
>> machine is running ascii upgraded from jessie last week on a 4.9.61-gnu
>> linux-libre kernel. There were no reports of the epson software trying
>> to install any headers during installation.  However, I am not sure if
>> the iscan software only works through a GUI.
>>
>> Any pointers would be greatly appreciated.
>
> The udev rules for scanners (in 60-libsane.rules) end up with a
> "setfacl" command, from the line:
> ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"
>
> I'm not sure what happens there, but it suggests there are some "ACL"
> permissions being involved, separate from the normal file permissions.

Indeed.  This is adding read/write permissions to the device for anyone
in the scanner group (regardless of the device's "primary" group).  On
most distributions, the user needs to be a member of a scanner or sane
group in order to get read/write access to the device.  The read/write
is needed to, doh!, communicate with the device.

I forgot why Julien Blache decided to use setfacl but we discussed it
for quite a bit IIRC.  You might find this in the sane-devel archives.
Anyway, the upshot of this is that doing an `ls -l` on the device does
not tell the whole story.  You'd need getfacl(1) for that.

> On the other hand, by your point (1) you might have seen this already.

Hope this helps,
--
Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
 Support Free Software                        https://my.fsf.org/donate
 Join the Free Software Foundation              https://my.fsf.org/join
_______________________________________________
Dng mailing list
[email protected]
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

Reply via email to