Page 1 of 1

Can't get scanimage to work as non-root

Posted: Tue Jul 23, 2013 3:45 pm
by yttriuszzerbus
I've got a Canon MP190 scanner/printer connected to my Model B RasPi. The printer works fine, and I have it networked.

I'm trying to set up scanning on the Pi, and I installed saned. To test it, I ran the command scanimage, which is a command-line tool to capture an image. If I run it as root, it scans successfully (I can hear the scanner operating), but if I run it as any other user, e.g. the user saned, I get this error:

Code: Select all

scanimage: open of device pixma:04A91734 failed: Access to resource has been denied
The user saned is a member of the groups scanner and lp

I've googled the error, but all the help on the internet pertains to operating systems other than Raspian, so I couldn't apply any of it.

Any ideas?

Edit: the same problem appears to be here: http://www.raspberrypi.org/phpBB3/viewt ... 2&p=376936 but the OP didn't say how they fixed it.

Another edit: this bug in sane looks like it could be the cause: https://bugs.launchpad.net/ubuntu/+sour ... bug/180794

Re: Can't get scanimage to work as non-root

Posted: Tue Jul 23, 2013 4:23 pm
by yttriuszzerbus
Fixed: I ran lsusb to find all devices attached, and chmod'ed the scanner to 0777
I know chmod 0777 is generally a bad idea, but it works.

Re: Can't get scanimage to work as non-root

Posted: Tue Jul 23, 2013 4:35 pm
by joan
Have a look at the device using

ls -l

It might belong to the root and the scanner groups. If that's the case you could add the pi user to the scanner group by

sudo adduser pi scanner