我尝试按照本教程使用 SANE 设置网络扫描仪:Sane Daemon 教程
但是,如果我尝试在客户端上添加扫描仪,它就无法工作,因为无法访问 USB 端口。
Feb 9 18:55:47 druckserver systemd[1]: Started Scanner Service (10.1.20.25:50515).
Feb 9 18:55:47 druckserver saned[2005]: saned (AF-indep+IPv6+systemd) from sane-backends 1.0.27 starting up
Feb 9 18:55:47 druckserver saned[2005]: check_host: access by remote host: ::ffff:10.1.20.25
Feb 9 18:55:47 druckserver systemd-resolved[1172]: Using degraded feature set (UDP) for DNS server 10.1.10.1.
Feb 9 18:55:52 druckserver saned[2005]: init: access granted to User@::ffff:10.1.20.25
Feb 9 18:55:57 druckserver saned[2005]: io/hpmud/musb.c 2101: Invalid usb_open: Permission denied
Feb 9 18:55:57 druckserver saned[2005]: message repeated 3 times: [ io/hpmud/musb.c 2101: Invalid usb_open: Permission denied]
Feb 9 18:55:57 druckserver saned[2005]: saned exiting
Feb 9 18:56:35 druckserver systemd[1]: Started Scanner Service (10.1.20.25:50531).
Feb 9 18:56:35 druckserver saned[2013]: saned (AF-indep+IPv6+systemd) from sane-backends 1.0.27 starting up
Feb 9 18:56:35 druckserver saned[2013]: check_host: access by remote host: ::ffff:10.1.20.25
Feb 9 18:56:35 druckserver saned[2013]: init: access granted to User@::ffff:10.1.20.25
Feb 9 18:56:41 druckserver saned[2013]: io/hpmud/musb.c 2101: Invalid usb_open: Permission denied
Feb 9 18:56:41 druckserver saned[2013]: message repeated 3 times: [ io/hpmud/musb.c 2101: Invalid usb_open: Permission denied]
Feb 9 18:56:41 druckserver saned[2013]: saned exiting
从该系统日志中弹出的是这一行:
Feb 9 18:56:41 druckserver saned[2013]: io/hpmud/musb.c 2101: Invalid usb_open: Permission denied
我完全不知道该如何解决这个问题。我需要将用户“sane”添加到特定组吗?
谢谢你的帮助。
答案1
好的,我通过添加解决了这个问题:
RUN_AS_USER=saned
到/etc/systemd/system/saned.socket 并将 sane-user 添加到 lp 组:
sudo usermod -a -G lp saned