You are not logged in.

#1 2008-03-27 16:10:01

felipeleon
Member
Registered: 2008-03-27
Posts: 3

setting permissions for scanner use

Hello,
My USB scanner is a Canon Lide 35 and it had been working perfectly in arch. After  a recent update (don't know exactly which because do not use scanner so often), the device is detected and device is set in /dev/bus/usb/005/00x. The problem is that the permissions are not set correctly, I assume by udev?, and my normal user cannot use the scanner because the device remains as owned by root.root and not 0664, group=scanner, as specified in the sane udev rules (/etc/udev/rules.d/53-sane.rules). The rules file is with the new syntax, i.e., ATTRS instead of SYSFS and so forth. My user belongs to the "scanner" group. I have the feeling it is something related with the udev rules but Im not sure what. Here is the relevant line:

# Canon CanoScan LiDE 35 | Canon CanoScan LiDE 40 | Canon CanoScan LiDE 50
ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="2213", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"

The latest update where kernel stuff and udev stuff were updated resulted in:
kernel-headers-2.6.24.3-1  udev-119-1...

Any help greatly appreciated,
Regards,
Felipe.

Offline

#2 2008-03-27 16:31:54

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: setting permissions for scanner use

That "ENV{}" stuff is new to me. I think the udev devs delight in confusing us.

I would suggest this - haven't tried it recently, but has worked for ages:

Put it in /etc/udev/rules.d/91-local.rules , so that it overrides the earlier rules

BUS=="usb", SYSFS{product}=="CanoScan", GROUP="scanner", MODE="0660"

Offline

#3 2008-03-27 19:35:04

felipeleon
Member
Registered: 2008-03-27
Posts: 3

Re: setting permissions for scanner use

Thanks brebs.
I like the idea of adding a "local" .rules file instead of modifying the sane installed rules. I'll give it a shot. However, according to the new udev, shouldn't I use ATTR{product} instead of SYSFS{product}? I'll try both. I'll post back if it works.

Offline

#4 2008-03-28 03:40:59

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: setting permissions for scanner use

SYSFS could be replaced by one of ATTR or ATTRS.

man udev

Offline

#5 2008-03-28 13:33:55

felipeleon
Member
Registered: 2008-03-27
Posts: 3

Re: setting permissions for scanner use

Brebs, that hack worked!! thanks man!
Do you have any idea as to why the earlier rule suddenly stop doing the perm fixing?? can that be related with the new udev variable or whatever it is called:
  ENV{libsane_matched}="yes"
?

Offline

#6 2008-03-30 02:40:24

Zerg2000
Member
From: Poland
Registered: 2008-03-30
Posts: 10

Re: setting permissions for scanner use

It appears that udev has problems with rules matching by idVendor when system is up and running but everything is ok if device was online during boot. Please check out this bug http://bugs.archlinux.org/task/9935 and comments. If You have the same problem then please vote for this bug and/or post a comment.

Thank You. wink


E-mail: zerg2000 (a) astral org pl
Jabber: zerg2000@jabber.astral.org.pl

Offline

Board footer

Powered by FluxBB