/dev/bus/usb/*/* files (device nodes for libusb) of printers must be readble and writable for user "lp"

Bug #318262 reported by Till Kamppeter
2
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Invalid
High
Unassigned
hplip (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: hal

All print jobs CUPS executes as the user "lp". The CUPS backends in /usr/lib/cups/backend/ send the data to be printed to the printer, usually also as the user "lp". Some CUPS backends (like the "hp" backend of HPLIP or the "usb" backend of CUPS 1.4 (will be released soon) access the printers via libusb, which means that they send the data through /dev/bus/usb/*/*. Therefore these device nodes need to be accessible for reading and writing by the user "lp". So they must be owned by the user "lp" or must have group ownership "lp" and must be group read/writable.

In current Jaunty, one can scan, fax, clean printheads, and see ink levels on HP's printers and multi-function devices but not print.

I am on Jaunty, updated today.

Changed in hal:
importance: Undecided → High
Changed in udev:
importance: Undecided → High
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

This is probably caused by the recent changes in HAL ad UDEV. I am not sure which of the two is now responsible for setting these ownerships/permissions.

Manually setting the group owenership with

sudo chgrp lp /dev/bus/usb/002/008

makes printing on my HP printer working again as long as I keep it connected and turned on (the two correct numbers you find via "lsusb").

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

For /dev/usb/lp* the ownerships and permissions are set correctly only for /dev/bus/usb/*/* not:

till@till-laptop:~/ubuntu/hplip/svn/pkg-hpijs/hplip/build-area/hplip-2.8.12$ ll /dev/usb/lp*
crw-rw---- 1 root lp 180, 0 2009-01-17 20:54 /dev/usb/lp0
crw-rw---- 1 root lp 180, 1 2009-01-17 20:54 /dev/usb/lp1
till@till-laptop:~/ubuntu/hplip/svn/pkg-hpijs/hplip/build-area/hplip-2.8.12$ ll /dev/bus/usb/*/*
crw-rw-r-- 1 root root 189, 0 2009-01-10 19:06 /dev/bus/usb/001/001
crw-rw-r-- 1 root root 189, 128 2009-01-10 19:06 /dev/bus/usb/002/001
crw-rw-r-- 1 root root 189, 136 2009-01-17 20:35 /dev/bus/usb/002/009
crw-rw-r--+ 1 root root 189, 137 2009-01-17 20:54 /dev/bus/usb/002/010
crw-rw-r--+ 1 root root 189, 138 2009-01-17 20:54 /dev/bus/usb/002/011
crw-rw-r-- 1 root root 189, 256 2009-01-10 19:06 /dev/bus/usb/003/001
crw-rw-r-- 1 root root 189, 257 2009-01-10 19:06 /dev/bus/usb/003/002
crw-rw-r-- 1 root root 189, 384 2009-01-10 19:06 /dev/bus/usb/004/001
crw-rw-r-- 1 root root 189, 385 2009-01-10 19:06 /dev/bus/usb/004/002
crw-rw-r-- 1 root root 189, 512 2009-01-10 19:06 /dev/bus/usb/005/001
crw-rw-r-- 1 root root 189, 514 2009-01-10 19:06 /dev/bus/usb/005/003
crw-rw-r-- 1 root root 189, 516 2009-01-10 19:06 /dev/bus/usb/005/005
till@till-laptop:~/ubuntu/hplip/svn/pkg-hpijs/hplip/build-area/hplip-2.8.12$

Changed in hal:
status: New → Invalid
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Hmm, that's odd

The only 3 rules we have in Intrepid for assigning the lp group are:

40-permissions.rules:SUBSYSTEM=="printer", GROUP="lp"
40-permissions.rules:SUBSYSTEM=="ppdev", GROUP="lp"
40-permissions.rules:SUBSYSTEM=="usb", KERNEL=="lp[0-9]*", GROUP="lp"

These three rules are all present in Jaunty.

Could you plug the printer into intrepid and do the ll on /dev/bus/usb there to prove it's in group "lp" and run udevadm info -qall -n /dev/bus/XXX/YYY on that to show which rule is picking it up

Changed in udev:
status: New → Incomplete
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Here are the results on my Intrepid box:

till@till-desktop:~$ lsusb
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 004: ID 058f:6362 Alcor Micro Corp. Hi-Speed 21-in-1 Flash Card Reader/Writer (Internal/External)
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 004: ID 03f0:bd02 Hewlett-Packard Photosmart Pro B9100 series
Bus 006 Device 003: ID 03f0:3517 Hewlett-Packard LaserJet 3390
Bus 006 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 010: ID 046a:0011 Cherry GmbH
Bus 005 Device 005: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
till@till-desktop:~$ ll /dev/bus/usb/*/*
crw-rw-r-- 1 root root 189, 0 2009-01-02 20:50 /dev/bus/usb/001/001
crw-rw-r-- 1 root root 189, 128 2009-01-02 20:50 /dev/bus/usb/002/001
crw-rw-r-- 1 root root 189, 256 2009-01-02 20:50 /dev/bus/usb/003/001
crw-rw-r-- 1 root root 189, 384 2009-01-02 20:50 /dev/bus/usb/004/001
crw-rw-r-- 1 root root 189, 512 2009-01-02 20:50 /dev/bus/usb/005/001
crw-rw-r-- 1 root root 189, 516 2009-01-02 20:50 /dev/bus/usb/005/005
crw-rw-r-- 1 root root 189, 521 2009-01-16 12:20 /dev/bus/usb/005/010
crw-rw-r-- 1 root root 189, 640 2009-01-02 20:50 /dev/bus/usb/006/001
crw-rw-r-- 1 root root 189, 641 2009-01-18 01:25 /dev/bus/usb/006/002
crw-rw-r--+ 1 lp scanner 189, 642 2009-01-18 01:25 /dev/bus/usb/006/003
crw-rw-r--+ 1 lp scanner 189, 643 2009-01-18 01:25 /dev/bus/usb/006/004
crw-rw-r-- 1 root root 189, 768 2009-01-02 20:50 /dev/bus/usb/007/001
crw-rw-r-- 1 root root 189, 771 2009-01-02 20:50 /dev/bus/usb/007/004
till@till-desktop:~$ udevadm info -qall -n /dev/bus/usb/006/003
P: /devices/pci0000:00/0000:00:1d.2/usb6/6-2/6-2.1
N: bus/usb/006/003
S: char/189:642
till@till-desktop:~$ udevadm info -qall -n /dev/bus/usb/006/004
P: /devices/pci0000:00/0000:00:1d.2/usb6/6-2/6-2.4
N: bus/usb/006/004
S: char/189:643
till@till-desktop:~$

In Intrepid HP devices get assigned lp.scanner. In Jaunty the scanner group does not exist anymore (or is at least not used any more). In Jaunty ALL (not only HP) printers should get these files assigned to lp.lp with 664 permissions.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Could you also run:

 udevadm test /dev/bus/usb/006/003
and
 udevadm test /dev/bus/usb/006/004

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :
Download full text (7.7 KiB)

Here we go (I have unplugged the printers in the mean time, so the addresses have changed. See the lsusb outout):

till@till-desktop:~$ lsusb
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 004: ID 058f:6362 Alcor Micro Corp. Hi-Speed 21-in-1 Flash Card Reader/Writer (Internal/External)
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 007: ID 03f0:3517 Hewlett-Packard LaserJet 3390
Bus 006 Device 006: ID 03f0:bd02 Hewlett-Packard Photosmart Pro B9100 series
Bus 006 Device 005: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 011: ID 046a:0011 Cherry GmbH
Bus 005 Device 005: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
till@till-desktop:~$ udevadm test /dev/bus/usb/006/006
This program is for debugging only, it does not run any program,
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

parse_file: reading '/etc/udev/rules.d/024_hpmud.rules' as rules file
parse_file: reading '/etc/udev/rules.d/025_logitechmouse.rules' as rules file
parse_file: reading '/etc/udev/rules.d/05-options.rules' as rules file
parse_file: reading '/etc/udev/rules.d/05-udev-early.rules' as rules file
parse_file: reading '/etc/udev/rules.d/20-names.rules' as rules file
parse_file: reading '/etc/udev/rules.d/30-cdrom_id.rules' as rules file
parse_file: reading '/etc/udev/rules.d/40-basic-permissions.rules' as rules file
parse_file: reading '/etc/udev/rules.d/40-permissions.rules' as rules file
parse_file: reading '/etc/udev/rules.d/45-fuse.rules' as rules file
parse_file: reading '/etc/udev/rules.d/45-hplip.rules' as rules file
parse_file: reading '/etc/udev/rules.d/45-libmtp7.rules' as rules file
parse_file: reading '/etc/udev/rules.d/45-libmtp8.rules' as rules file
parse_file: reading '/etc/udev/rules.d/45-libnjb.rules' as rules file
parse_file: reading '/etc/udev/rules.d/50-libpisock9.rules' as rules file
parse_file: reading '/etc/udev/rules.d/50-xserver-xorg-input-wacom.rules' as rules file
parse_file: reading '/etc/udev/rules.d/52_nut-usbups.rules' as rules file
parse_file: reading '/etc/udev/rules.d/55-hpmud.rules' as rules file
parse_file: reading '/etc/udev/rules.d/60-persistent-input.rules' as rules file
parse_file: reading '/etc/udev/rules.d/60-persistent-storage-tape.rules' as rules file
parse_file: reading '/etc/udev/rules.d/60-persistent-storage.rules' as rules file
parse_file: reading '/etc/udev/rules.d/60-symlinks.rules' as rules file
parse_file: reading '/etc/udev/rules.d/61-persistent-storage-edd.rules' as rules file
parse_file: reading '/etc/udev/rules.d/62-bluez-hid2hci.rules' as rules file
parse_file: reading '/etc/udev/rules.d/65-dmsetup.rules' as rules file
parse_file: reading '/etc/udev/rules.d/65-id-type.rules' as rules file
parse_file: reading '/etc/udev/rules.d/65-libmtp.rules'...

Read more...

Changed in udev:
status: Incomplete → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hplip - 2.8.12-1ubuntu3

---------------
hplip (2.8.12-1ubuntu3) jaunty; urgency=low

  * Restore udev rules thate assign the lp group to /dev/bus/usb devices
    for certain printers. LP: #318262.

 -- Scott James Remnant <email address hidden> Wed, 21 Jan 2009 12:59:43 +0000

Changed in hplip:
status: New → Fix Released
Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) wrote :

I can confirm this is fixed with the latest updates.

Aaron

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.