[Bug 1747115] Re: scanbd does not find scanner
Hi, having the same issue here I found out that the rule in /lib/udev/rules.d/99-saned.rules should set the GROUP to "scanner" rather than "saned" e.g. replace ENV{libsane_matched}=="yes", GROUP="saned" by ENV{libsane_matched}=="yes", GROUP="scanner" It solve the problem on my system. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1747115 Title: scanbd does not find scanner To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/scanbd/+bug/1747115/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1747115] Re: scanbd does not find scanner
Remote access does not work as well e.g. by using the Windows client SaneTwain I'm uncertain if this is related to previuos issue. But it worked in Ubuntu 16.04. Error message in syslog is: Mar 17 08:18:00 my-desktop saned[26802]: saned (AF-indep+IPv6) from sane-backends 1.0.27 starting up Mar 17 08:18:00 my-desktop saned[26802]: check_host: access by remote host: :::192.168.178.34 Mar 17 08:18:00 my-desktop saned[26802]: init: access granted to myuser@:::192.168.178.34 Mar 17 08:18:00 my-desktop saned[26802]: process_request: (control_option) error while decoding args h=0 (Cannot allocate memory) Mar 17 08:18:00 my-desktop saned[26802]: process_request: bad status 12 Mar 17 08:18:00 my-desktop saned[26802]: saned exiting -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1747115 Title: scanbd does not find scanner To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/scanbd/+bug/1747115/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1747115] Re: scanbd does not find scanner
Finally, the following is what works for me: It seems that there is the need to change users to root at several places: 1. /etc/scanbd/scanbd.conf Change user so that it is 'root' instead of 'saned' # drop priviliges to this user #= # Linux (most distributions use the saned user): # user= saned # ArchLinux (ArchLinux doesn't have saned user) # user= daemon # *BSD # user= root # user= saned user = root 2. /lib/systemd/system/scanbm@.service Change User from 'User=daemon' to 'User=root'. Since if it is 'daemon' after you have pressd a button scanbd tries to start the saned process with user 'daemon'. But then saned does not find any scanner device. It just seem to work with user 'root' [Unit] Description=Scanner Service Requires=scanbm.socket [Service] ExecStart=/usr/sbin/scanbm -c /etc/scanbd/scanbd.conf #User=daemon User=root Group=scanner StandardInput=socket Environment=SANE_CONFIG_DIR=/etc/scanbd 3. /etc/dbus-1/system.d/scanbd_dbus.conf Here I also changed the user. It was 'saned' before, but I changed it to 'root' as well. Don't forget to run systemctl daemon-reload http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd;> In my case everything works as before in Ubuntu 16.04. I expect that it is just a workaround to run all these processes with root priviledges. The root cause is probably related to the way of access to the usb device. (libusb?) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1747115 Title: scanbd does not find scanner To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/scanbd/+bug/1747115/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1747115] Re: scanbd does not find scanner
I made the next step. After I have changed the user from saned to root in scanbd.conf I am able to start scanbd and it starts polling the usb device. scanbd.conf looks like this now: # drop priviliges to this user #= # Linux (most distributions use the saned user): # user= saned # ArchLinux (ArchLinux doesn't have saned user) # user= daemon # *BSD # user= root # user= saned user = root I have started scanbd from command line and it works well. $ scanbd -c /etc/scanbd/scanbd.conf -d7 -f scanbd: foreground scanbd: reading config file /etc/scanbd/scanbd.conf scanbd: debug on: level: 7 scanbd: dropping privs to uid root scanbd: dropping privs to gid scanner scanbd: group scanner has member: scanbd: saned scanbd: drop privileges to gid: 124 scanbd: Running as effective gid 124 scanbd: drop privileges to uid: 0 scanbd: Running as effective uid 0 scanbd: dbus_init scanbd: dbus match type='signal',interface='org.freedesktop.Hal.Manager' scanbd: SANE_CONFIG_DIR not set scanbd: sane version 1.0 scanbd: Scanning for local-only devices scanbd: found device: plustek:libusb:002:008 Canon CanoScan LiDE25 flatbed scanner scanbd: start_sane_threads scanbd: Starting poll thread for plustek:libusb:002:008 After I have pressed one of the buttons, scanbd calls my script - let's say scan.sh - in order to finally run the scanimage command. Perfect! Nevertheless, I said one step. The normal case is to start scanbd via systemd. But in this case my scan.sh-script with scanimage does not find devices. In this case I find the following messages in syslog: Dec 8 13:41:28 my-desktop dbus-daemon[617]: [system] Activating via systemd: service name='de.kmux.scanbd.server' unit='dbus-de.kmux.scanbd.server.service' requested by ':1.270' (uid=1 pid=14081 comm="/usr/sbin/scanbm -c /etc/scanbd/scanbd.conf " label="unconfined") Dec 8 13:41:53 my-desktop saned[14110]: saned (AF-indep+IPv6) from sane-backends 1.0.27 starting up Dec 8 13:41:53 my-desktop saned[14110]: check_host: access by remote host: :::127.0.0.1 Dec 8 13:41:53 my-desktop saned[14110]: init: access granted to saned-user@:::127.0.0.1 Dec 8 13:41:54 my-desktop scanbd[12422]: scanimage: no SANE devices found Dec 8 13:41:54 my-desktop saned[14110]: saned exiting Dec 8 13:41:54 my-desktop dbus-daemon[617]: [system] Activating via systemd: service name='de.kmux.scanbd.server' unit='dbus-de.kmux.scanbd.server.service' requested by ':1.270' (uid=1 pid=14081 comm="/usr/sbin/scanbm -c /etc/scanbd/scanbd.conf " label="unconfined") Dec 8 13:42:01 my-desktop systemd-resolved[496]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP. Dec 8 13:42:01 my-desktop systemd-resolved[496]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP. I haven't solved it yet. In general I guess that all this is related to permissions and roles. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1747115 Title: scanbd does not find scanner To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/scanbd/+bug/1747115/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1747115] Re: scanbd does not find scanner
I've just tried to configure scanbd under Ubuntu 18.10 and ran into same trouble. Scanner device is available: # scanimage -L device `plustek:libusb:002:007' is a Canon CanoScan LiDE25 flatbed scanner But after starting scanbd it terminates with message that it is not available: # scanbd -f -d 7 -c /etc/scanbd/scanbd.conf scanbd: dbus match type='signal',interface='org.freedesktop.Hal.Manager' scanbd: SANE_CONFIG_DIR not set scanbd: no devices, not starting any polling thread I come from Ubuntu 16.04.5 where it worked perfectly. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1747115 Title: scanbd does not find scanner To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/scanbd/+bug/1747115/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1747115] Re: scanbd does not find scanner
Thank you for your report and sorry for your troubles. The Debian bug you referenced is not what you are experiencing, though, since Chris confirmed this was gone in the package that was eventually uploaded as 1.4.4-2 ** Changed in: scanbd (Ubuntu) Assignee: (unassigned) => Rolf Leggewie (r0lf) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1747115 Title: scanbd does not find scanner To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/scanbd/+bug/1747115/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1747115] Re: scanbd does not find scanner
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: scanbd (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1747115 Title: scanbd does not find scanner To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/scanbd/+bug/1747115/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs