[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sharing a scanner from a Buster system



On 2021-03-04 23:38, John Boxall wrote:
I have been trying for some time to setup a system that will share an
attached scanner over the network. I had hoped to use Buster as it is
still the stable instance of Debian. I have followed everything in [1]
but I could never get it to work. I then tried Bullseye and it worked
right away. Today I decided to install a clean NETINST image of each
and repeat the "server" steps as outlined at [1].

Even though the howto states that it covers Debian from versions 8 to
11, I could not get it to work on Buster (10). The process failed on
Buster, again, even though scanimage on the system saw the USB scanner
(Epson Perfection 2480 Photo). I then installed Bullseye. The exact
same process and the very same saned.conf file worked immediately.

The client was the same in both cases (Buster).

Is there a tweak that I am missing? Has there been a change that isn't
in Buster but has made it to Bullseye? Any recommendations on debug
steps would be appreciated?

I suspect the tweak you are missing is the permissions on the scanner device so that the saned daemon can access it.

I have a network shared scanner on my Debian buster system (With an Ubuntu client), and had trouble getting it to work.

Firstly, make sure can you access the scanner locally as root, and can scan an image via the command line.

Then you need to set the ACL permissions on your scanner so that the username 'scanner' that the saned daemon uses can access the device in order to share it over the network. The Debian docs [2] for a scanner have the necessary commands to identify your scanner on the USB bus, and set the ACL on it.

For my scanner, the command I used was:

setfacl -m g:scanner:rw- /dev/bus/usb/003/002

Your scanner is probably connected to a different USB socket, so for you the command will be different.

Then restart the saned daemon, and test connectivity from your client machine.

If that works then you need to make the change permanent (otherwise it will be lost when you reboot). For that you will need to add a custom udev rule so that the kernel will recognise the device as a scanner during boot up device enumeration or when you connect it. The notes on how to do this came from the Arch Linux wiki. [3]

From the sane-find-scanner output, make a note of the Device id & vendor id for your scanner, and then prepare a new udev rule file:

/etc/udev/rules.d/49-sane-missing-scanner.rules

Mine contains the identification for my scanner (HP ScanJet 3300c), Yours will be different:

ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0205", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"


I hope this solves your problem. I struggled with that exact issue a couple of months ago, and I know how frustrating it can be.

[2] https://wiki.debian.org/Scanner
[3] https://wiki.archlinux.org/index.php/SANE#Permission_problem


--
David Pottage


Reply to: