On Fri 07 Feb 2020 at 09:37:17 -0500, Michael Stone wrote: > On Fri, Feb 07, 2020 at 10:36:11AM +0800, kaye n wrote: > > Hello Friends! > > > > I'm running: > > Kernel: 4.19.0-6-amd64 x86_64 > > bits: 64 > > Desktop: Xfce 4.12.4 > > Distro: Debian GNU/Linux 10 (buster) > > > > My printer is an Epson L220. It's connected to my laptop's USB port. > > > > The command lsusb shows: > > Bus 002 Device 003: ID 04b8:08d1 Seiko Epson Corp. > > > > Therefore in the file, /etc/sane.d/epkowa.conf > > I added this line: > > usb 0x04b8 0x08d1 > > > > The printer can print just fine, but ImageScan and XSane would not run. > > > > ImageScan says: > > Could not send command to scanner. Check the scanner's status. > > > > XSane says: > > Failed to open device 'epkowa:usb:002:003': > > Access to resource has been denied. > > > > Thank you for your time! > > This smells like a permission problem. In your example above the scanner is > on bus 002 device 003. (It may change as you unplug and replug usb devices, > so check with lsusb and change the numbers below as needed.) You can see the > permissions for that device with: > ls -l /dev/bus/usb/002/003 > If it comes back with something that starts with: > crw-rw-r-- 1 root root > then it's writable only by root. A working configuration would have either > crw-rw-rw- 1 root root > or would having your username or a group that you're in rather than root, or > would look like > crw-rw-r--+ 1 root root > indicating an ACL which you can see via getfacl /dev/bus/usb/002/003 > (there would be a line with your username in the default libsane > configuration). > > Assuming the permissions look like they might be the problem, you can > confirm that by running > chmod o+w /dev/bus/usb/002/003 > to make the file world writable (for testing only; it isn't permantent if > the scanner is unplugged or the system rebooted). If xsane works, you've > found the problem. If that's the case, the next step is probably to update > the udev configuration. If not, on to the next guess. :)
Permisions on the USB bus are managed by an ACL. https://wiki.debian.org/Scanner -- Brian.