Predrag Punosevac wrote:

> Hi Misc,
> 
> I am trying for the first time to scan a document on
> 
> predrag@oko$ uname -a
> OpenBSD oko.int.bagdala2.net 6.7 GENERIC.MP#2 amd64
> 
> Can somebody familiar with the changes in permissions between releases
> and 6.6 and 6.7 help me out how to enable scanning for a non root user
> This is what I am talking about
> 
> predrag@oko$ scanimage -L
> 
> No scanners were identified. If you were expecting something different,
> check that the scanner is plugged in, turned on and detected by the
> sane-find-scanner tool (if appropriate). Please read the documentation
> which came with this software (README, FAQ, manpages).
> 
> 
> now as a root
> 
> predrag@oko$ doas scanimage -L
> doas (pred...@oko.int.bagdala2.net) password: 
> device `snapscan:libusb:000:003' is a EPSON EPSON Scanner flatbed
> scanner
> 
> 
> I can confirm that the scanning works as expected on 6.7 minus
> permission problem. Actually even changing permission on /dev/ugen* from
> current 600 to 660 (as it was on 6.6) would not allow me to use XSane
> for scanning.
> 
> Cheers,
> Predrag

Solved per pkg-readme of course :-)

predrag@oko$ pwd               
/usr/local/share/doc/pkg-readmes
predrag@oko$ cat sane-backends 
$OpenBSD: README,v 1.17 2019/12/14 13:02:28 ajacoutot Exp $

+-----------------------------------------------------------------------
| Running sane-backends on OpenBSD
+-----------------------------------------------------------------------

First read /usr/local/share/doc/sane-backends/PROBLEMS.

USB
===
Since USB scanning will be handled by libusb, you need to allow
the user access to the corresponding USB endpoint. To do so, find
where your scanner is attached to using:
    $ usbdevs -v
then change the ownerships accordingly.

e.g.
      
Controller /dev/usb0:
      
<...>
      
addr 05: 03f0:4812 HP, Officejet 7500 E910
      
         high speed, self powered, config 1, rev 1.00, iSerialNumber
MY2793100Q05JB
         driver: umass0
      
         driver: ugen1
      

      
# chown <username> /dev/ugen1.* /dev/usb0

To preserve your changes after a system update, use rc.local(8).
Alternatively, hotplugd(8) attach/detach scripts can automate this.

You can grant multiple users direct access to the scanner by adding them
to the
_saned group and allowing access to its ugen(4) device.
e.g. chgrp _saned /dev/ugen1.* && chmod 660 /dev/ugen1.*

Reply via email to