LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   usb scanner premissions issue when running sane-find-scanner (http://www.linuxquestions.org/questions/linux-hardware-18/usb-scanner-premissions-issue-when-running-sane-find-scanner-748881/)

vlsd 08-19-2009 07:49 PM

usb scanner premissions issue when running sane-find-scanner
 
I have an HP Photosmart C4200 series USB scanner that I'm trying to get working under Debian Lenny. Running things as root works, this is the output:

# sane-find-scanner
found USB scanner (vendor=0x03f0 [HP], product=0x5c11 [Photosmart C4200 series]) at libusb:007:010

# scanimage -L
device `hpaio:/usb/Photosmart_C4200_series?serial=CN82IR300K04VP' is a Hewlett-Packard Photosmart_C4200_series all-in-one

However, running things as a regular user gives me:

$ sane-find-scanner
found USB scanner (vendor=0x03f0, product=0x5c11) at libusb:007:010

$ 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).

Notice that sane-find-scanner does not print the and manufacturer of the scanner when called by the user. At first it seems like it's not a permissions issue, since my user is a member of the scanner group, and an ls on the device gives

# ls -l /dev/bus/usb/007/010
crw-rw-r-- 1 lp scanner 189, 777 2009-08-19 19:27 /dev/bus/usb/007/010

so members of the scanner group should have rw access. However, after a quick chmod a+w of the same file, sane-find-scanner works perfectly when called by the user.

Of course, I could just chmod the device every time I need to use the scanner, or even write some script that does that for me. However, I would like to know what it is that makes permissions not work like they are supposed to. A lot of documentation talks about how to modify udev configuration files to get the permissions on the device the way you want them, but the permissions on the device ARE the way I want them, it's just that sane-find-scanner seems to ignore the group of the user who runs it.

Drakeo 08-19-2009 08:44 PM

you need to give it permission. in your user group if your a newbe then you must post the system and the desktop manager.

vlsd 08-20-2009 10:40 AM

A restart later and everything works fine. Weird, but not worth investigating any longer.

tredegar 08-20-2009 12:50 PM

Quote:

A restart later and everything works fine.
Probably all you needed to do was logout and login again for your correct group memberships to take effect. Anyway, problem now solved :)

vlsd 08-20-2009 02:20 PM

Quote:

Originally Posted by tredegar (Post 3651165)
all you needed to do was logout and login again for your correct group memberships to take effect.

Yep, that's exactly what it was. Thanks for pointing it out, it will make a lot more sense next time it happens :)


All times are GMT -5. The time now is 07:18 PM.