# [solved] Scanner only works for root

## tkzv

Hello. I'm having troubles with a newly bought scanner (Canon LiDE 110).

I emerged media-gfx/sane-frontends and media-gfx/sane-backends. Scanner is correctly detected by root and works for root, but as an unprivileged user the programs don't see it. What should I check?

I did add the user to scanner and usb groups. saned is started.

```

$ eix sane-

[I] media-gfx/sane-backends

. . .

     Installed versions:  1.0.25_pre20150628(22:00:53 01.11.2015)(ipv6 nls threads usb -avahi -doc -gphoto2 -snmp -systemd -v4l -xinetd ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32" SANE_BACKENDS="genesys -abaton -agfafocus -apple -artec -artec_eplus48u -as6e -avision -bh -canon -canon630u -canon_dr -canon_pp -cardscan -coolscan -coolscan2 -coolscan3 -dc210 -dc240 -dc25 -dell1600n_net -dmc -epjitsu -epson -epson2 -fujitsu -gt68xx -hp -hp3500 -hp3900 -hp4200 -hp5400 -hp5590 -hpljm1005 -hpsj5s -hs2p -ibm -kodak -kodakaio -kvs1025 -kvs20xx -kvs40xx -leo -lexmark -ma1509 -magicolor -matsushita -microtek -microtek2 -mustek -mustek_pp -mustek_usb -mustek_usb2 -nec -net -niash -p5 -pie -pixma -plustek -plustek_pp -pnm -qcam -ricoh -rts8891 -s9036 -sceptre -sharp -sm3600 -sm3840 -snapscan -sp15c -st400 -stv680 -tamarack -teco1 -teco2 -teco3 -test -u12 -umax -umax1220u -umax_pp -xerox_mfp")                              

     Homepage:            http://www.sane-project.org/                    

     Description:         Scanner Access Now Easy - Backends              

                                                                          

[I] media-gfx/sane-frontends                                              

     Available versions:  1.0.14 {gimp}                                   

     Installed versions:  1.0.14(21:10:38 01.11.2015)(gimp)               

     Homepage:            http://www.sane-project.org                     

     Description:         Scanner Access Now Easy      

```

```

# scanimage -L

device `genesys:libusb:001:006' is a Canon LiDE 110 flatbed scanner

```

The non-root user does see the scanner via lsusb:

```

Bus 001 Device 008: ID 04a9:1909 Canon, Inc. CanoScan LiDE 110

```

and usb-devices:

```

T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  8 Spd=480 MxCh= 0

D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1

P:  Vendor=04a9 ProdID=1909 Rev=07.01

S:  Manufacturer=Canon

S:  Product=CanoScan

C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA

I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)

```

UPDATE: After the reboot (local blackout) everything started to work as non-root too.Last edited by tkzv on Sat Nov 14, 2015 11:38 pm; edited 1 time in total

----------

## NeddySeagoon

tkzv,

Check the normal users groups.

Its changed a lot over the years.  From memory, you need to be in either or both of plugdev and usb.

Only if they exist on your system already.

----------

## tkzv

 *NeddySeagoon wrote:*   

> tkzv,
> 
> Check the normal users groups.
> 
> Its changed a lot over the years.  From memory, you need to be in either or both of plugdev and usb.
> ...

 

I already was both in plugdev and usb. I also added "scanner".

----------

## tkzv

UPDATE: I noticed an odd thing. When I give a command "groups username", it displays the group scanner, but for just "groups" it does not:

```

$ groups

bin disk wheel floppy audio tape video games usb cdemu vboxusers portage plugdev android tkzv

$ groups tkzv

bin disk wheel floppy uucp audio tape video usb portage tkzv vboxusers games cdemu android plugdev scanner

```

Do I have to activate a newly created group somehow? (Haven't created new groups for years and forgot how I did it before.)

----------

## Fitzcarraldo

Scanners can be a major pain in Linux, especially because of udev/eudev (the rules are a quagmire). If you're connecting via USB, does the Canon LiDE 110 also have some internal memory that is accessed by the usb-storage driver in Linux? That can cause all sorts of problems. With my Canon MFP (PIXMA MP560) I had to do the following in order to be able to scan (almost-reliably!) via USB (I have found scanning via a network much easier):

1. Stop the kernel from binding the usb-storage driver to the device.

2. Create a UDEV rule to modify the ACL (access control list) of the device to give both the ‘lp‘ and ‘scanner‘ groups Read-Write access to the device.

3. Create a UDEV rule to: a) change the owner of the device from ‘root‘ to my user account (fitzcarraldo); b) change the device’s group to ‘scanner‘ instead of ‘lp‘; c) give all users Read-Write access to the device.

4. Disable the SANE backend from accessing the MP560 via the network.

In case it's of any help to you, I explained how to do all the above in a blog post: The problem of scanning using USB multi-function printers in Linux (success at last). Although your device is not a MFP, some of the above could still be applicable in your case (the parts of the UDEV rules to give the 'scanner' group Read-Write access to the device and changing the owner from 'root' to your user account, etc.).

----------

## tomtom69

The difference between "groups" and "groups <name>" is the fact that "groups <name>" reads the group memberships from /etc/group while "groups" reads the groups memberships for the current login session.

You have to log out and log in again to take the changes of /etc/group into effect.

----------

## tkzv

 *tomtom69 wrote:*   

> The difference between "groups" and "groups <name>" is the fact that "groups <name>" reads the group memberships from /etc/group while "groups" reads the groups memberships for the current login session.
> 
> You have to log out and log in again to take the changes of /etc/group into effect.

 

Thanks. Is there any way to do it without restarting the X session?

----------

## tkzv

 *Fitzcarraldo wrote:*   

> If you're connecting via USB, does the Canon LiDE 110 also have some internal memory that is accessed by the usb-storage driver in Linux?

 

No, it doesn't. As far as I can tell, this scanner is as simple as they get.

The problem seems to have been in some permissions that only applied after a reboot.

----------

