Package: libsane Version: 1.0.17-3 Severity: normal
I've been trying to use my Canon N640P. It works very well when I run as root, but when I run as my normal user, sane can't find the scanner. When I run scanimage -L as root, I see: device `canon_pp:parport0' is a CANON N640P flatbed scanner As normal user, I get: 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). I think that it has something to do with the permissions on /dev/port that libieee1284-3 uses. $ ls -l /dev/port crw-rw---- 1 root scanner 1, 4 2006-05-11 08:16 /dev/port I've changed these permissions to the above in /etc/udev/permissions.rules, and I am a member of the scanner group. Here's an extract of an strace -L as normal uses: open("/dev/parport0", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parports/0", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parport1", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parports/1", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parport2", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parports/2", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parport3", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parports/3", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parport4", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parports/4", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parport5", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parports/5", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parport6", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parports/6", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parport7", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parports/7", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) ioperm(0x378, 0x3, 0x1) = -1 EPERM (Operation not permitted) open("/dev/port", O_RDWR|O_NOCTTY) = -1 EPERM (Operation not permitted) open("/dev/lp0", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/lp1", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/lp2", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) And here's a similar extract as root. open("/dev/parports/1", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parport2", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parports/2", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parport3", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parports/3", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parport4", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parports/4", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parport5", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parports/5", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parport6", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parports/6", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parport7", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/parports/7", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) ioperm(0x378, 0x3, 0x1) = 0 ioperm(0x378, 0x3, 0) = 0 open("/dev/port", O_RDWR|O_NOCTTY) = 3 close(3) = 0 open("/dev/lp0", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/lp1", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) open("/dev/lp2", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) As you can see, root happily opens /dev/port, but normal user doesn't. Doh. That's about all of the useful info that I can think of. -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (650, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.16.9 Locale: LANG=en_CA, LC_CTYPE=en_CA (charmap=ISO-8859-1) Versions of packages libsane depends on: ii adduser 3.87 Add and remove users and groups ii libc6 2.3.6-7 GNU C Library: Shared libraries ii libgphoto2-2 2.1.6-8 gphoto2 digital camera library ii libgphoto2-port0 2.1.6-8 gphoto2 digital camera port librar ii libieee1284-3 0.2.10-1 cross-platform library for paralle ii libjpeg62 6b-12 The Independent JPEG Group's JPEG ii libusb-0.1-4 2:0.1.12-2 userspace USB programming library ii makedev 2.3.1-81 creates device files in /dev Versions of packages libsane recommends: ii module-init-tools 3.2.2-2 tools for managing Linux kernel mo ii sane-utils 1.0.17-3 API library for scanners -- utilit ii udev [hotplug] 0.091-2 /dev/ and hotplug management daemo -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]