Bug 244444 - wrong udev permissions - non-root user has no access to usb-scanners
wrong udev permissions - non-root user has no access to usb-scanners
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: sane-backends (Show other bugs)
rawhide
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Nils Philippsen
Fedora Extras Quality Assurance
:
: 249030 249249 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-15 13:56 EDT by mail@romal.de
Modified: 2007-11-30 17:12 EST (History)
3 users (show)

See Also:
Fixed In Version: 1.0.18-15.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-15 15:48:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
lshal with both scanners (102.93 KB, text/plain)
2007-06-21 15:16 EDT, mail@romal.de
no flags Details
lshal with both scanner (104.47 KB, text/plain)
2007-06-26 14:54 EDT, mail@romal.de
no flags Details
lshal -t with Epson and Minolta scanner (2.57 KB, text/plain)
2007-06-26 14:55 EDT, mail@romal.de
no flags Details
lshal output of scanner device Microtek scanmaker 3600 (3.25 KB, text/plain)
2007-06-27 19:06 EDT, eric magaoay
no flags Details

  None (edit)
Description mail@romal.de 2007-06-15 13:56:42 EDT
Description of problem:

Root can use an usb-scanner via sane. Non-Root users cannot.

Version-Release number of selected component (if applicable):

rawhide 2007-06-15

How reproducible:

Every time

Steps to Reproduce:
1. Try to scan something as a non-root-user
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Harald Hoyer 2007-06-21 05:49:23 EDT
The console user should own the scanner, if he logs in. Doesn't that work?

$ fgrep -r scanner /etc/security/console.*
/etc/security/console.perms.d/50-default.perms:<scanner>=/dev/scanner*
/dev/usb/scanner*
/etc/security/console.perms.d/50-default.perms:<console>  0600 <scanner>    0600
root
/etc/security/console.perms.d/50-default.perms.rpmsave:<scanner>=/dev/scanner*
/dev/usb/scanner*
/etc/security/console.perms.d/50-default.perms.rpmsave:<console>  0600 <scanner>
   0600 root

Comment 2 mail@romal.de 2007-06-21 15:16:37 EDT
Created attachment 157564 [details]
lshal with both scanners

lshal with both scanners (Epson and Minolta)
Comment 3 mail@romal.de 2007-06-26 14:54:43 EDT
Created attachment 157936 [details]
lshal with both scanner
Comment 4 mail@romal.de 2007-06-26 14:55:18 EDT
Created attachment 157937 [details]
lshal -t with Epson and Minolta scanner
Comment 5 mail@romal.de 2007-06-26 14:56:37 EDT
No, does not work:

from dmesg after switching on the devices:

usb 5-2: new high speed USB device using ehci_hcd and address 4
usb 5-2: configuration #1 chosen from 1 choice
usb 5-1: new high speed USB device using ehci_hcd and address 5
usb 5-1: configuration #1 chosen from 1 choice

[root@localhost dev]# ls -ld 5*
crw------- 1 root root 189, 516 26. Jun 20:49 5-1
crw------- 1 root root 189, 515 26. Jun 20:49 5-2
[root@localhost dev]# 
Comment 6 Harald Hoyer 2007-06-27 06:52:28 EDT
then /etc/udev/rules.d/60-libsane.rules has to be extended...
Comment 7 eric magaoay 2007-06-27 19:06:09 EDT
Created attachment 158076 [details]
lshal output of scanner device Microtek scanmaker 3600

Under "user" login, it works OK out of the box on FC7 with kernel version
2.6.21-1.3194.fc4. However, under the latest rawhide kernel 2.6.21-1.3240,
"scanimage -L" cannot detect the device under user login. Under "root" login,
there is no problem.  I'm not sure if modifying
/etc/security/console.perms.d/50defaults.perms would work. I'm not sure if I
got it right, but I added the following on <scanner> line:

<scanner>=/dev/scanner* /dev/1-4* /sys/bus/usb/devices/1-4*
/sys/bus/usb/drivers/usb/1-4* 

Still failed to dected under "user" login. 

So for now the only workaround is run "xsane" under "root" login
Comment 8 Nils Philippsen 2007-06-28 04:18:27 EDT
R-M- and Eric, your scanners are listed in the sane udev rules (in the future,
please post the output of "lsusb" as well, it is much more readable than lshal).

When the scanners are plugged in, what does "ls -l /dev/scanner*" give?
Comment 9 mail@romal.de 2007-06-28 11:26:06 EDT
Comes at once:

[root@localhost ~]# lsusb 
Bus 005 Device 005: ID 04b8:012a Seiko Epson Corp. 
Bus 005 Device 002: ID 0686:400e Minolta Co., Ltd 
Bus 005 Device 001: ID 0000:0000  
Bus 004 Device 001: ID 0000:0000  
Bus 003 Device 001: ID 0000:0000  
Bus 002 Device 003: ID 045e:00db Microsoft Corp. 
Bus 002 Device 002: ID 045e:008c Microsoft Corp. Wireless Intellimouse Explorer 2.0
Bus 002 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  
[root@localhost ~]# lsusb -t
Bus#  5
`-Dev#   1 Vendor 0x0000 Product 0x0000
  |-Dev#   2 Vendor 0x0686 Product 0x400e
  `-Dev#   5 Vendor 0x04b8 Product 0x012a
Bus#  4
`-Dev#   1 Vendor 0x0000 Product 0x0000
Bus#  3
`-Dev#   1 Vendor 0x0000 Product 0x0000
Bus#  2
`-Dev#   1 Vendor 0x0000 Product 0x0000
  |-Dev#   2 Vendor 0x045e Product 0x008c
  `-Dev#   3 Vendor 0x045e Product 0x00db
Bus#  1
`-Dev#   1 Vendor 0x0000 Product 0x0000
[root@localhost ~]# 


There is no /dev/scanner* .
Comment 10 Nils Philippsen 2007-06-29 05:51:43 EDT
Harald, this is from the 60-libsane.rules file from F7:

[...]
# EPSON GT-X800 | EPSON Perfection 4990 PHOTO | Epson Perfection 4990
SYSFS{idVendor}=="04b8", SYSFS{idProduct}=="012a", SYMLINK+="scanner-%k"
[...]
# Minolta Dimage Scan Elite 5400 | Konica Minolta DiMAGE Scan Elite 5400
SYSFS{idVendor}=="0686", SYSFS{idProduct}=="400e", SYMLINK+="scanner-%k"
[...]

Now I'm a bit puzzled why there are no /dev/scanner* symlinks and the
permissions are not set -- and I don't see what would be wrong with the file.
Can you please elaborate if (and what) I need to add to 60-libsane.rules so the
symlinks and the permissions are set? Thanks.
Comment 11 Harald Hoyer 2007-06-29 09:10:57 EDT
hmm, kernel 2.6.21-1.3240 may change some sysfs files?
/dev/5-1 should have been /dev/usbdev5.1* or s.th. like that.

R.M.Albrecht, can you please run:
# udevinfo --attribute-walk --name /dev/5-1

Comment 12 Harald Hoyer 2007-06-29 09:15:37 EDT
oder whatever device your scanner is..
Comment 13 Harald Hoyer 2007-06-29 09:21:47 EDT
oh, another thing... SYSFS{} should be ATTRS{}.
Change 60-libsane.rules with:
# sed -i -e 's/SYSFS/ATTRS/g' /etc/udev/rules.d/60-libsane.rules

and see, if that helps.
Comment 14 mail@romal.de 2007-06-29 10:47:38 EDT
@Comment 13: Nope, didn't help.

[root@localhost dev]# udevinfo --attribute-walk --name usbdev5.8_ep00

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/class/usb_endpoint/usbdev5.8_ep00':
    KERNEL=="usbdev5.8_ep00"
    SUBSYSTEM=="usb_endpoint"
    DRIVER==""
    ATTR{direction}=="both"
    ATTR{type}=="Control"
    ATTR{interval}=="0ms"
    ATTR{wMaxPacketSize}=="0040"
    ATTR{bInterval}=="00"
    ATTR{bmAttributes}=="00"
    ATTR{bEndpointAddress}=="00"
    ATTR{bLength}=="07"
    ATTR{dev}=="251:19"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5/5-2':
    KERNELS=="5-2"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{product}=="EPSON Scanner"
    ATTRS{manufacturer}=="EPSON"
    ATTRS{quirks}=="0x0"
    ATTRS{maxchild}=="0"
    ATTRS{version}==" 2.00"
    ATTRS{devnum}=="8"
    ATTRS{busnum}=="5"
    ATTRS{speed}=="480"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bDeviceProtocol}=="ff"
    ATTRS{bDeviceSubClass}=="ff"
    ATTRS{bDeviceClass}=="ff"
    ATTRS{bcdDevice}=="0100"
    ATTRS{idProduct}=="012a"
    ATTRS{idVendor}=="04b8"
    ATTRS{bMaxPower}=="  2mA"
    ATTRS{bmAttributes}=="c0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{configuration}==""
    ATTRS{dev}=="189:519"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5':
    KERNELS=="usb5"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{serial}=="0000:00:1d.7"
    ATTRS{product}=="EHCI Host Controller"
    ATTRS{manufacturer}=="Linux 2.6.21-1.3240.fc8 ehci_hcd"
    ATTRS{quirks}=="0x0"
    ATTRS{maxchild}=="8"
    ATTRS{version}==" 2.00"
    ATTRS{devnum}=="1"
    ATTRS{busnum}=="5"
    ATTRS{speed}=="480"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bcdDevice}=="0206"
    ATTRS{idProduct}=="0000"
    ATTRS{idVendor}=="0000"
    ATTRS{bMaxPower}=="  0mA"
    ATTRS{bmAttributes}=="e0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{configuration}==""
    ATTRS{dev}=="189:512"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7':
    KERNELS=="0000:00:1d.7"
    SUBSYSTEMS=="pci"
    DRIVERS=="ehci_hcd"
    ATTRS{msi_bus}==""
    ATTRS{broken_parity_status}=="0"
    ATTRS{enable}=="1"
    ATTRS{numa_node}=="0"
    ATTRS{modalias}=="pci:v00008086d000027CCsv00001043sd00008179bc0Csc03i20"
    ATTRS{local_cpus}=="00000000,00000003"
    ATTRS{irq}=="20"
    ATTRS{class}=="0x0c0320"
    ATTRS{subsystem_device}=="0x8179"
    ATTRS{subsystem_vendor}=="0x1043"
    ATTRS{device}=="0x27cc"
    ATTRS{vendor}=="0x8086"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{uevent}==""

[root@localhost dev]# udevinfo --attribute-walk --name usbdev5.8_ep01

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/class/usb_endpoint/usbdev5.8_ep01':
    KERNEL=="usbdev5.8_ep01"
    SUBSYSTEM=="usb_endpoint"
    DRIVER==""
    ATTR{direction}=="out"
    ATTR{type}=="Bulk"
    ATTR{interval}=="0ms"
    ATTR{wMaxPacketSize}=="0200"
    ATTR{bInterval}=="00"
    ATTR{bmAttributes}=="02"
    ATTR{bEndpointAddress}=="01"
    ATTR{bLength}=="07"
    ATTR{dev}=="251:20"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0':
    KERNELS=="5-2:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS==""
    ATTRS{modalias}=="usb:v04B8p012Ad0100dcFFdscFFdpFFicFFiscFFipFF"
    ATTRS{bInterfaceProtocol}=="ff"
    ATTRS{bInterfaceSubClass}=="ff"
    ATTRS{bInterfaceClass}=="ff"
    ATTRS{bNumEndpoints}=="02"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bInterfaceNumber}=="00"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5/5-2':
    KERNELS=="5-2"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{product}=="EPSON Scanner"
    ATTRS{manufacturer}=="EPSON"
    ATTRS{quirks}=="0x0"
    ATTRS{maxchild}=="0"
    ATTRS{version}==" 2.00"
    ATTRS{devnum}=="8"
    ATTRS{busnum}=="5"
    ATTRS{speed}=="480"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bDeviceProtocol}=="ff"
    ATTRS{bDeviceSubClass}=="ff"
    ATTRS{bDeviceClass}=="ff"
    ATTRS{bcdDevice}=="0100"
    ATTRS{idProduct}=="012a"
    ATTRS{idVendor}=="04b8"
    ATTRS{bMaxPower}=="  2mA"
    ATTRS{bmAttributes}=="c0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{configuration}==""
    ATTRS{dev}=="189:519"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5':
    KERNELS=="usb5"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{serial}=="0000:00:1d.7"
    ATTRS{product}=="EHCI Host Controller"
    ATTRS{manufacturer}=="Linux 2.6.21-1.3240.fc8 ehci_hcd"
    ATTRS{quirks}=="0x0"
    ATTRS{maxchild}=="8"
    ATTRS{version}==" 2.00"
    ATTRS{devnum}=="1"
    ATTRS{busnum}=="5"
    ATTRS{speed}=="480"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bcdDevice}=="0206"
    ATTRS{idProduct}=="0000"
    ATTRS{idVendor}=="0000"
    ATTRS{bMaxPower}=="  0mA"
    ATTRS{bmAttributes}=="e0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{configuration}==""
    ATTRS{dev}=="189:512"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7':
    KERNELS=="0000:00:1d.7"
    SUBSYSTEMS=="pci"
    DRIVERS=="ehci_hcd"
    ATTRS{msi_bus}==""
    ATTRS{broken_parity_status}=="0"
    ATTRS{enable}=="1"
    ATTRS{numa_node}=="0"
    ATTRS{modalias}=="pci:v00008086d000027CCsv00001043sd00008179bc0Csc03i20"
    ATTRS{local_cpus}=="00000000,00000003"
    ATTRS{irq}=="20"
    ATTRS{class}=="0x0c0320"
    ATTRS{subsystem_device}=="0x8179"
    ATTRS{subsystem_vendor}=="0x1043"
    ATTRS{device}=="0x27cc"
    ATTRS{vendor}=="0x8086"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{uevent}==""

[root@localhost dev]# udevinfo --attribute-walk --name usbdev5.8_ep82

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/class/usb_endpoint/usbdev5.8_ep82':
    KERNEL=="usbdev5.8_ep82"
    SUBSYSTEM=="usb_endpoint"
    DRIVER==""
    ATTR{direction}=="in"
    ATTR{type}=="Bulk"
    ATTR{interval}=="0ms"
    ATTR{wMaxPacketSize}=="0200"
    ATTR{bInterval}=="00"
    ATTR{bmAttributes}=="02"
    ATTR{bEndpointAddress}=="82"
    ATTR{bLength}=="07"
    ATTR{dev}=="251:21"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0':
    KERNELS=="5-2:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS==""
    ATTRS{modalias}=="usb:v04B8p012Ad0100dcFFdscFFdpFFicFFiscFFipFF"
    ATTRS{bInterfaceProtocol}=="ff"
    ATTRS{bInterfaceSubClass}=="ff"
    ATTRS{bInterfaceClass}=="ff"
    ATTRS{bNumEndpoints}=="02"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bInterfaceNumber}=="00"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5/5-2':
    KERNELS=="5-2"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{product}=="EPSON Scanner"
    ATTRS{manufacturer}=="EPSON"
    ATTRS{quirks}=="0x0"
    ATTRS{maxchild}=="0"
    ATTRS{version}==" 2.00"
    ATTRS{devnum}=="8"
    ATTRS{busnum}=="5"
    ATTRS{speed}=="480"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bDeviceProtocol}=="ff"
    ATTRS{bDeviceSubClass}=="ff"
    ATTRS{bDeviceClass}=="ff"
    ATTRS{bcdDevice}=="0100"
    ATTRS{idProduct}=="012a"
    ATTRS{idVendor}=="04b8"
    ATTRS{bMaxPower}=="  2mA"
    ATTRS{bmAttributes}=="c0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{configuration}==""
    ATTRS{dev}=="189:519"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5':
    KERNELS=="usb5"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{serial}=="0000:00:1d.7"
    ATTRS{product}=="EHCI Host Controller"
    ATTRS{manufacturer}=="Linux 2.6.21-1.3240.fc8 ehci_hcd"
    ATTRS{quirks}=="0x0"
    ATTRS{maxchild}=="8"
    ATTRS{version}==" 2.00"
    ATTRS{devnum}=="1"
    ATTRS{busnum}=="5"
    ATTRS{speed}=="480"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bcdDevice}=="0206"
    ATTRS{idProduct}=="0000"
    ATTRS{idVendor}=="0000"
    ATTRS{bMaxPower}=="  0mA"
    ATTRS{bmAttributes}=="e0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{configuration}==""
    ATTRS{dev}=="189:512"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7':
    KERNELS=="0000:00:1d.7"
    SUBSYSTEMS=="pci"
    DRIVERS=="ehci_hcd"
    ATTRS{msi_bus}==""
    ATTRS{broken_parity_status}=="0"
    ATTRS{enable}=="1"
    ATTRS{numa_node}=="0"
    ATTRS{modalias}=="pci:v00008086d000027CCsv00001043sd00008179bc0Csc03i20"
    ATTRS{local_cpus}=="00000000,00000003"
    ATTRS{irq}=="20"
    ATTRS{class}=="0x0c0320"
    ATTRS{subsystem_device}=="0x8179"
    ATTRS{subsystem_vendor}=="0x1043"
    ATTRS{device}=="0x27cc"
    ATTRS{vendor}=="0x8086"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{uevent}==""

[root@localhost dev]# 

[root@localhost dev]# ls -ld usbd*
crw------- 1 root root 251, 19 29. Jun 16:40 usbdev5.8_ep00
crw------- 1 root root 251, 20 29. Jun 16:40 usbdev5.8_ep01
crw------- 1 root root 251, 21 29. Jun 16:40 usbdev5.8_ep82
crw------- 1 root root 251, 10 29. Jun 16:41 usbdev5.9_ep00
crw------- 1 root root 251, 11 29. Jun 16:41 usbdev5.9_ep01
crw------- 1 root root 251, 12 29. Jun 16:41 usbdev5.9_ep82
crw------- 1 root root 251, 18 29. Jun 16:41 usbdev5.9_ep83
[root@localhost dev]# 

Comment 15 Nils Philippsen 2007-06-29 10:53:54 EDT
Harald, since when is it ATTRS{} rather than SYSFS{}?
Comment 16 Harald Hoyer 2007-06-29 11:15:34 EDT
udev 098
Comment 17 Jonathan Kamens 2007-07-19 21:33:52 EDT
I have this same problem with an Epson Perfection 2480 Photo scanner.  It seems
that this problem has come and gone several times over the last couple of years.
 One wishes that it would go and not come back :-).
Comment 18 Nils Philippsen 2007-07-20 12:25:43 EDT
*** Bug 249030 has been marked as a duplicate of this bug. ***
Comment 19 Nils Philippsen 2007-07-20 12:29:54 EDT
sane-backends-1.0.18-9 should hit updates-testing shortly, it contains udev
rules that can cope with SUBSYSTEM=="usb" (used in newer kernels) instead of
only SUBSYSTEM=="usb_device" (used in older kernels). Please test once it
becomes available.
Comment 20 Fedora Update System 2007-07-20 15:31:04 EDT
sane-backends-1.0.18-9.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 21 mail@romal.de 2007-07-22 12:14:38 EDT
I did a yum update and the new sane-backends installed, but no change.
Non-root-users does not have the rights to access usb-scanners.
Comment 22 Nils Philippsen 2007-07-22 17:10:06 EDT
Hmm, somehow the patch seems to have gotten unapplied during build. I'm building
-10 right now which hopefully doesn't do this.
Comment 23 Nils Philippsen 2007-07-22 17:35:54 EDT
Gah, the whole rules file is generated during build thusly unapplying all the
patches. Re-spinning -10 which patches the generator, not the file. 
Comment 24 Nils Philippsen 2007-07-22 17:49:04 EDT
sane-backends-1.0.18-10.fc7 should hit updates-testing soon. Please test it. Thanks.
Comment 25 Nils Philippsen 2007-07-23 06:39:27 EDT
*** Bug 249249 has been marked as a duplicate of this bug. ***
Comment 26 Fedora Update System 2007-07-23 11:45:34 EDT
sane-backends-1.0.18-10.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 27 mail@romal.de 2007-07-23 15:35:30 EDT
Cool, works :-)
Thanks four your help.
cu romal
Comment 28 antonio montagnani 2007-07-24 08:59:36 EDT
Not working here (working as root...):

Bus 001 Device 004: ID 04b8:010b Seiko Epson Corp. Perfection 1240

RPM Group    : System Environment/Libraries
Source       : sane-backends-1.0.18-10.fc7.src.rpm
Build Time   : Sun Jul 22 23:36:26 2007
Install Time : Tue Jul 24 14:42:12 2007
License      : GPL (programs), relaxed LGPL (libraries), and public domain (docs)

RPM Group    : System Environment/Libraries
Source       : sane-backends-1.0.18-10.fc7.src.rpm
Build Time   : Sun Jul 22 23:36:26 2007
Install Time : Tue Jul 24 14:42:12 2007
License      : GPL (programs), relaxed LGPL (libraries), and public domain (docs)
Comment 29 Nils Philippsen 2007-07-24 10:50:22 EDT
Antonio, please check whether the relevant lines in
/etc/udev/rules.d/60-libsane.rules are the same as here (they should be):

[...]
# EPSON GT-7700U | EPSON Perfection 1240U | Epson Perfection 1240
ATTR{idVendor}=="04b8", ATTR{idProduct}=="010b", SYMLINK+="scanner-%k"
[...]

Furthermore, please check if the generated device files (/dev/scanner-..., the
/dev/usb... file to which it points) have the correct permissions.
Comment 30 antonio montagnani 2007-07-24 11:00:16 EDT
# EPSON GT-7700U | EPSON Perfection 1240U | Epson Perfection 1240
ATTR{idVendor}=="04b8", ATTR{idProduct}=="010b", SYMLINK+="scanner-%k"

I have no /dev/scanner- and also no /dev/usb!!!
Comment 31 Harald Hoyer 2007-07-24 12:14:18 EDT
udevinfo/udevtest may provide more debugging information.
also:
# udevcontrol log_priority=debug
and replug your usb scanner and watch /var/log/messages...
Comment 32 Nils Philippsen 2007-07-24 12:44:51 EDT
hmm, udev doesn't use regexes as I understand them... stay tuned for -11
Comment 33 Nils Philippsen 2007-07-24 12:56:10 EDT
building sane-backends-1.0.18-11.fc7
Comment 34 Nils Philippsen 2007-07-24 14:01:46 EDT
Respun, built sane-backends-1.0.18-12.fc7 which should hit updates-testing
shortly. Please test. Thanks.
Comment 35 Fedora Update System 2007-07-25 01:12:58 EDT
sane-backends-1.0.18-12.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 36 Frode Tennebø 2007-07-25 13:59:31 EDT
During investigation of Bug 242485 and Bug 244096, I upgraded with the latest 
F7 updates and now, this also happens for me:

[ft@luke upload]$ scanimage > /tmp/a
scanimage: no SANE devices found
[root@luke yum.repos.d]# scanimage > /tmp/a
[snapscan] Scanner warming up - waiting 14 seconds.
[snapscan] Scanner warming up - waiting 14 seconds.
[snapscan] Scanner warming up - waiting 1 seconds.

This is an AGFA SnapScan 1212U.  I tried installing sane-backends from testing:

[root@luke etc]# rpm -q sane-backends
sane-backends-1.0.18-12.fc7

[root@luke etc]# fgrep -r scanner /etc/security/console.*
/etc/security/console.perms.d/50-default.perms:<scanner>=/dev/scanner* /dev/usb/
scanner*
/etc/security/console.perms.d/50-default.perms:<console>  0600 <scanner>    
0600 root
[root@luke etc]# lshal -t
computer
  acpi_FN0
  acpi_FN1
  acpi_FN2
  acpi_FN3
  acpi_FN4
  acpi_FN5
  acpi_FN6
  acpi_FN7
  acpi_FN8
  acpi_FN9
  acpi_CPU0
  acpi_CPU1
  computer_alsa_timer
  computer_oss_sequencer_0
  computer_oss_sequencer
  computer_alsa_sequencer
  computer_logicaldev_input_1
  computer_logicaldev_input_0
  computer_logicaldev_input
  pnp_PNP0003
  pnp_PNP0c01
  pnp_PNP0c02_0
  pnp_PNP0c02
  pnp_INT0800
  pnp_PNP0700
  pnp_PNP0501_0
    pnp_PNP0501_0_serial_platform_1
  pnp_PNP0501
    pnp_PNP0501_serial_platform_0
  pnp_PNP0401
  pnp_PNP0303
  pnp_PNP0f13
  pnp_PNP0800
  pnp_PNP0b00
  pnp_PNP0200
  pnp_PNP0c04
  pnp_PNP0a03
  platform_vesafb_0
  platform_serial8250
  platform_pcspkr
  platform_iTCO_wdt
  platform_i8042
    platform_i8042_i8042_AUX_port
      platform_i8042_i8042_AUX_port_logicaldev_input
    platform_i8042_i8042_KBD_port
      platform_i8042_i8042_KBD_port_logicaldev_input
  platform_floppy_0
    platform_floppy_0_storage
  pci_8086_2415
    pci_8086_2415_alsa_capture_1
    pci_8086_2415_alsa_playback_0
    pci_8086_2415_alsa_capture_0
    pci_8086_2415_oss_mixer__1
    pci_8086_2415_oss_pcm_0_0
    pci_8086_2415_alsa_control__1
    pci_8086_2415_oss_pcm_0
    pci_8086_2415_oss_pcm_1
  pci_8086_2413
  pci_8086_2412
    usb_device_0_0_0000_00_1f_2
      usb_device_6bd_1_noserial
        usb_device_6bd_1_noserial_if0
      usb_device_0_0_0000_00_1f_2_if0
  pci_8086_2411
  pci_8086_2410
  pci_8086_2418
    pci_9004_6178
    pci_9005_8f
      pci_9005_8f_scsi_host
        pci_9005_8f_scsi_host_scsi_device_lun0_0
          storage_serial_1COMPAQPC111008941292
            volume_label_SWAP_sdb3
            volume_uuid_c7d9ce8b_ae79_1785_fb29_efb4d00c8c94_0
            volume_uuid_57a168bd_bfb6_4530_1f18_7e749ea10b78_0
          pci_9005_8f_scsi_host_scsi_device_lun0_0_scsi_generic
        pci_9005_8f_scsi_host_scsi_device_lun0
          storage_serial_1COMPAQPC111007443177
            volume_label_SWAP_sda3
            volume_uuid_c7d9ce8b_ae79_1785_fb29_efb4d00c8c94
            volume_uuid_57a168bd_bfb6_4530_1f18_7e749ea10b78
          pci_9005_8f_scsi_host_scsi_device_lun0_scsi_generic
    pci_8086_1229
      net_00_50_8b_a0_c7_57
  pci_8086_1a23
    pci_10de_28
  pci_8086_1a21
[root@luke etc]#
[root@luke etc]# dmesg | grep usb
usb 1-1: new full speed USB device using uhci_hcd and address 2
usb 1-1: configuration #1 chosen from 1 choice
usb 1-1: reset full speed USB device using uhci_hcd and address 2
usb 1-1: reset full speed USB device using uhci_hcd and address 2
usb 1-1: reset full speed USB device using uhci_hcd and address 2
usb 1-1: reset full speed USB device using uhci_hcd and address 2
usb 1-1: reset full speed USB device using uhci_hcd and address 2
usb 1-1: reset full speed USB device using uhci_hcd and address 2
[root@luke etc]# ls -ld /dev/1*
crw------- 1 root root 189, 1 2007-07-25 12:59 /dev/1-1
[root@luke etc]# cat /etc/udev/rules.d/60-libsane.rules
:
# AGFA SnapScan 1212U
ATTR{idVendor}=="06bd", ATTR{idProduct}=="0001", SYMLINK+="scanner-%k"
:
[root@luke etc]# lsusb
Bus 001 Device 002: ID 06bd:0001 AGFA-Gevaert NV SnapScan 1212U
Bus 001 Device 001: ID 0000:0000
[root@luke etc]# ls -l /dev/scanner*
ls: cannot access /dev/scanner*: No such file or directory
[root@luke etc]# lsusb -t
Bus#  1
`-Dev#   1 Vendor 0x0000 Product 0x0000
  `-Dev#   2 Vendor 0x06bd Product 0x0001
[root@luke etc]# udevinfo --attribute-walk --name /dev/1-1

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pci0000:00/0000:00:1f.2/usb1/1-1':
    KERNEL=="1-1"
    SUBSYSTEM=="usb"
    DRIVER=="usb"
    ATTR{product}=="SNAPSCAN 1212U"
    ATTR{manufacturer}=="AGFA"
    ATTR{quirks}=="0x0"
    ATTR{maxchild}=="0"
    ATTR{version}==" 1.00"
    ATTR{devnum}=="2"
    ATTR{busnum}=="1"
    ATTR{speed}=="12"
    ATTR{bMaxPacketSize0}=="8"
    ATTR{bNumConfigurations}=="1"
    ATTR{bDeviceProtocol}=="ff"
    ATTR{bDeviceSubClass}=="ff"
    ATTR{bDeviceClass}=="ff"
    ATTR{bcdDevice}=="0200"
    ATTR{idProduct}=="0001"
    ATTR{idVendor}=="06bd"
    ATTR{bMaxPower}=="100mA"
    ATTR{bmAttributes}=="40"
    ATTR{bConfigurationValue}=="1"
    ATTR{bNumInterfaces}==" 1"
    ATTR{configuration}==""
    ATTR{dev}=="189:1"

  looking at parent device '/devices/pci0000:00/0000:00:1f.2/usb1':
    KERNELS=="usb1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{serial}=="0000:00:1f.2"
    ATTRS{product}=="UHCI Host Controller"
    ATTRS{manufacturer}=="Linux 2.6.22.1-27.fc7 uhci_hcd"
    ATTRS{quirks}=="0x0"
    ATTRS{maxchild}=="2"
    ATTRS{version}==" 1.10"
    ATTRS{devnum}=="1"
    ATTRS{busnum}=="1"
    ATTRS{speed}=="12"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bcdDevice}=="0206"
    ATTRS{idProduct}=="0000"
    ATTRS{idVendor}=="0000"
    ATTRS{bMaxPower}=="  0mA"
    ATTRS{bmAttributes}=="e0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{configuration}==""
    ATTRS{dev}=="189:0"

  looking at parent device '/devices/pci0000:00/0000:00:1f.2':
    KERNELS=="0000:00:1f.2"
    SUBSYSTEMS=="pci"
    DRIVERS=="uhci_hcd"
    ATTRS{msi_bus}==""
    ATTRS{broken_parity_status}=="0"
    ATTRS{enable}=="1"
    ATTRS{modalias}=="pci:v00008086d00002412sv00008086sd00002412bc0Csc03i00"
    ATTRS{local_cpus}=="ffffffff"
    ATTRS{irq}=="16"
    ATTRS{class}=="0x0c0300"
    ATTRS{subsystem_device}=="0x2412"
    ATTRS{subsystem_vendor}=="0x8086"
    ATTRS{device}=="0x2412"
    ATTRS{vendor}=="0x8086"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{uevent}==""
Comment 37 Nils Philippsen 2007-07-26 04:19:12 EDT
(In reply to comment #36)
> During investigation of Bug 242485 and Bug 244096, I upgraded with the latest 
> F7 updates and now, this also happens for me:

With which version of the kernel do you try this? There are some USB related
bugs that may interfere here...
Comment 38 Nils Philippsen 2007-08-08 09:53:56 EDT
Unfortunately the way how the kernel addresses the devices in udev has changed
again. I've just built sane-backends-1.0.18-14.fc7 which contains udev rules
that should be able to cope with both flavours. Please test once it reaches
updates-testing.
Comment 39 Joachim Backes 2007-08-09 04:36:29 EDT
Problem solved with sane-backends-1.0.18-8.fc7 and kernel-2.6.22.1-41.fc7.
Comment 40 Joachim Backes 2007-08-09 04:41:41 EDT
and udev-113-8.fc7 (I forgot to say).
Comment 41 Nils Philippsen 2007-08-09 04:54:25 EDT
(In reply to comment #39)
> Problem solved with sane-backends-1.0.18-8.fc7 and kernel-2.6.22.1-41.fc7.

Please check that sane-backends-1.0.18-14.fc7 from updates-testing works as
well. I see that they haven't been pushed yet, but you can download them from 
http://koji.fedoraproject.org/koji/buildinfo?buildID=13092 in the meantime. When
you've updated the package, unplug and replug your scanner so that the new rules
contained in the package apply. Thanks.
Comment 42 Fedora Update System 2007-08-09 12:48:26 EDT
sane-backends-1.0.18-14.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 43 Fedora Update System 2007-08-15 15:48:42 EDT
sane-backends-1.0.18-15.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.