Sanity, udev 규칙을 추가하더라도 sudo를 사용하지 않으면 스캐너를 찾을 수 없습니다(권한 문제)

Sanity, udev 규칙을 추가하더라도 sudo를 사용하지 않으면 스캐너를 찾을 수 없습니다(권한 문제)

내 AIO 프린터/스캐너는 Canon E400이지만 일반 사용자로서 내 스캐너를 찾을 수 없습니다. sudo & scan 또는 sudo만 사용할 수 있습니다.

~ cincinmasukmangkok@orangepizero
< sane-find-scanner                                                                                                       <<<

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

could not open USB device 0x1d6b/0x0001 at 008:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 005:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 007:001: Access denied (insufficient permissions)
could not open USB device 0x04a9/0x177a at 004:007: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 004:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 006:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 003:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 002:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 001:001: Access denied (insufficient permissions)
  # No USB scanners found. If you expected something different, make sure that
  # you have loaded a kernel driver for your USB host controller and have setup
  # the USB system correctly. See man sane-usb for details.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

  # You may want to run this program as root to find all devices. Once you
  # found the scanner devices, be sure to adjust access permissions as
  # necessary.

~ cincinmasukmangkok@orangepizero
> 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).

~ cincinmasukmangkok@orangepizero
< sudo sane-find-scanner                                                                                                  <<< [sudo] password for cincinmasukmangkok:

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04a9 [Canon], product=0x177a [E400 series]) at libusb:004:007
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

~ cincinmasukmangkok@orangepizero
< sudo scanimage --format=png > test.png                                                                                  <<<

~ cincinmasukmangkok@orangepizero 33s
>

또한 /lib/udev/rules.d/60-libsane.rules에 추가했지만 여전히 작동하지 않습니다.

SUBSYSTEM=="usb", ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="177a", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"

답변1

이 줄을 추가하여 이 문제를 해결하세요./lib/udev/rules.d/10-local.rules

ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="177a", MODE="0666"

답변2

scanner,, 에 계정을 추가했습니다 lp. saned하지만 그것만으로는 도움이 되지 않습니다. 이러한 규칙 파일이 없으므로 내 솔루션은 sudo chmod -R a+w /dev/bus/usb. 그런 다음 sane-find-scanner일반 사용자 계정을 사용하여 찾을 수 있는지 확인할 수 있습니다 .

rc.local그런 다음 다음 내용이 포함된 파일을 추가/생성했습니다 .

#!/bin/sh -e
chmod -R a+w /dev/bus/usb
exit 0

그런 다음 나는 그것을 설정했다 sudo chmod +x rc.local.

관련 정보