[Pkg-cups-devel] Bug#517461: cups: USB backend permission problem, printing fails

PELLER Zoltan zpeller+debbug at zzsoft.hu
Fri Feb 27 21:52:33 UTC 2009


Package: cups
Version: 1.3.8-1lenny4.1
Severity: important

Installed lenny a few weeks ago, system was updated daily.

After connecting a USB printer (DYMO LabelWriter 400), tried to install it
from KDE control center. The USB subsystem recognized it, the usb devices
were created. However installation didn't let me choose the "local printer"
(parallel, serial, USB), that option was disabled, greyed out. 

Also tried to install it via the web interface (localhost:631), no possibility
to choose USB printer again, but the system recognized the printer somehow, and 
allowed me to install it via some HAL device. The test page couldn't be printed, 
"Permission denied". 

Deleted the printer, tried to reinstall it, and used the special uri for the
USB interface: usb://DYMO/LabelWriter%20400?serial=06090210440126 , exactly the
same as the one on my other lenny machine (an older installation, but also updated
regularly), which works perfectly with the same printer. The printer was 
installed, but the test page couldn't be printed, "permission denied".

After checking the device permissions I've found the following (on both of
my machines):
crw-rw---- 1 root lp 180, 0 2009-02-27 12:25 /dev/usb/lp0

After changing the permission to 666, all works fine, kcontrol shows the 
local printers again. But on my older machine the whole thing works as 660.

Then I've done some process traces, and found that cupsd runs as root:root, but 
when I try to print something, it forks a process, which runs as lp:root (both 
uid:gid and euid:egid)! That process obviously has no permission to open 
/dev/usb/lp0.

Then I've tried to compare the two cupsd.conf files, but they differ quite a lot,
many options missing from the old config compared to the new one. Finally I
tried to change the "Group" parameter from "lpadmin" to "lp". cupsd restart,
and immediately all works fine with permission 660. kcontrol printer installer
shows the local printer, and printing is possible. This "Group" parameter 
doesn't appear in the old config file, and don't know what its default value is.

So, there you have a workaround, or fix, but I'm not sure, and don't have the
knowledge to tell, what other things might this parameter change break (the
description of the Group parameter in the manpage of cupsd.conf is not clear). 

Regards,
Zoltan

-- System Information:
Debian Release: 5.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages cups depends on:
ii  adduser            3.110                 add and remove users and groups
ii  cups-common        1.3.8-1lenny4.1       Common UNIX Printing System(tm) - 
ii  debconf [debconf-2 1.5.24                Debian configuration management sy
ii  ghostscript        8.62.dfsg.1-3.2lenny0 The GPL Ghostscript PostScript/PDF
ii  libavahi-compat-li 0.6.23-3lenny1        Avahi Apple Bonjour compatibility 
ii  libc6              2.7-18                GNU C Library: Shared libraries
ii  libcups2           1.3.8-1lenny4.1       Common UNIX Printing System(tm) - 
ii  libcupsimage2      1.3.8-1lenny4.1       Common UNIX Printing System(tm) - 
ii  libdbus-1-3        1.2.1-5               simple interprocess messaging syst
ii  libgnutls26        2.4.2-6               the GNU TLS library - runtime libr
ii  libkrb53           1.6.dfsg.4~beta1-5    MIT Kerberos runtime libraries
ii  libldap-2.4-2      2.4.11-1              OpenLDAP libraries
ii  libpam0g           1.0.1-5               Pluggable Authentication Modules l
ii  libpaper1          1.1.23+nmu1           library for handling paper charact
ii  libslp1            1.2.1-7.5             OpenSLP libraries
ii  lsb-base           3.2-20                Linux Standard Base 3.2 init scrip
ii  perl-modules       5.10.0-19             Core Perl modules
ii  poppler-utils [xpd 0.8.7-1               PDF utilitites (based on libpopple
ii  procps             1:3.2.7-11            /proc file system utilities
ii  ssl-cert           1.0.23                simple debconf wrapper for OpenSSL

Versions of packages cups recommends:
ii  avahi-utils           0.6.23-3lenny1     Avahi browsing, publishing and dis
ii  cups-client           1.3.8-1lenny4.1    Common UNIX Printing System(tm) - 
ii  foomatic-filters      3.0.2-20080211-3.2 OpenPrinting printer support - fil
ii  smbclient             2:3.2.5-4          a LanManager-like simple client fo

Versions of packages cups suggests:
ii  cups-bsd                1.3.8-1lenny4.1  Common UNIX Printing System(tm) - 
ii  cups-driver-gutenprint  5.0.2-4          printer drivers for CUPS
pn  cups-pdf                <none>           (no description available)
ii  foomatic-db             20080211-2+nmu1  OpenPrinting printer support - dat
ii  foomatic-db-engine      3.0.2-20080211-1 OpenPrinting printer support - pro
ii  hplip                   2.8.6.b-4        HP Linux Printing and Imaging Syst
pn  xpdf-korean | xpdf-japa <none>           (no description available)

-- debconf information:
* cupsys/raw-print: true
* cupsys/backend: ipp, lpd, parallel, scsi, serial, socket, usb, snmp, dnssd





More information about the Pkg-cups-devel mailing list