yttriuszzerbus
Posts: 9
Joined: Sat Feb 25, 2012 8:54 am

Can't get scanimage to work as non-root

Tue Jul 23, 2013 3:45 pm

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

yttriuszzerbus
Posts: 9
Joined: Sat Feb 25, 2012 8:54 am

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

Tue Jul 23, 2013 4:23 pm

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.

User avatar
joan
Posts: 14935
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

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

Tue Jul 23, 2013 4:35 pm

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

Return to “Troubleshooting”