Bug#489975: marked as done (cups: Serial backend not recognised by default)
Your message dated Thu, 8 Jul 2010 11:35:23 +0200
with message-id <AANLkTilyz6n3DtF713xC5yReK-4PfjJF-DqF-WEmiDMO@mail.gmail.com>
and subject line Re: Bug#489975: [Debian QA] please review your old bug reports against CUPS
has caused the Debian Bug report #489975,
regarding cups: Serial backend not recognised by default
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact firstname.lastname@example.org
Debian Bug Tracking System
Contact email@example.com with problems
--- Begin Message ---
- To: Debian Bug Tracking System <firstname.lastname@example.org>
- Subject: cups: Serial backend not recognised by default
- From: Antony Gelberg <email@example.com>
- Date: Wed, 09 Jul 2008 01:07:44 +0100
- Message-id: <20080709000744.4581.47682.reportbug@localhost>
I have just tried connecting a serial printer to ttyS0, with default
crw-rw---- 1 root dialout 4, 64 2008-07-09 00:35 /dev/ttyS0
When I tried to add it via the web UI, the serial port wasn't listed in
the Device drop-down. I turned on debug logging, and sure enough:
I [09/Jul/2008:00:51:39 +0100] Started
D [09/Jul/2008:00:51:39 +0100] [cups-deviced] Added device "http"...
D [09/Jul/2008:00:51:39 +0100] [cups-deviced] Added device "lpd"...
D [09/Jul/2008:00:51:39 +0100] [cups-deviced] Added device "ipp"...
D [09/Jul/2008:00:51:40 +0100] [cups-deviced] Added device
D [09/Jul/2008:00:51:41 +0100] [cups-deviced] Added device "scsi"...
D [09/Jul/2008:00:51:41 +0100] [cups-deviced] Added device "socket"...
D [09/Jul/2008:00:51:41 +0100] [cups-deviced] Added device "beh"...
D [09/Jul/2008:00:51:41 +0100] PID 4656
(/usr/lib/cups/daemon/cups-deviced) exited with no errors.
I noted that cups runs as root, and sure enough, running cups-deviced as
root (with arbitrary parameters) gave the same result:
# /usr/lib/cups/daemon/cups-deviced 1 10 1 all
DEBUG: [cups-deviced] Added device "http"...
DEBUG: [cups-deviced] Added device "lpd"...
DEBUG: [cups-deviced] Added device "ipp"...
DEBUG: [cups-deviced] Added device "scsi"...
DEBUG: [cups-deviced] Added device "socket"...
DEBUG: [cups-deviced] Added device "beh"...
However, the same command as a normal user worked for the serial backend
if not others (snip follows):
DEBUG: [cups-deviced] Added device "serial:/dev/ttyS0?baud=115200"...
I then tried configuring a suitable printer directly in printers.conf.
When I tried printing to it, I got:
E [09/Jul/2008:01:03:02 +0100] PID 4767 (/usr/lib/cups/backend/serial)
stopped with status 1!
E [09/Jul/2008:01:03:02 +0100] [Job 217] Unable to open device file
"/dev/ttyS0": Permission denied
This led me to suspect permissions, and sure enough, changing /dev/ttyS0
to 0666 worked. I didn't really understand this, as root had rw
permissions anyway. I had a glance at scheduler/cups-deviced.c, and
there is certainly some magic there relating to the user that it runs
the backend as. Unfortunately, I don't have time to delve deeper, but
see comments around line 204.
I don't want /dev/ttyS0 to be world readable/writeable, but I don't see
what else to do for now. NB lp is already in my dialout group, that
Anyway, this wasn't documented anywhere that I can see. I'm not sure
what you think is the best way forward, but at the very least, I think
this should be documented in README.Debian, with suitable guidance
given as to possible permission settings for the serial port. Better
still, it should just work.
 Another thing - could we please have a README.Debian in
/usr/share/doc/cups that at least points to
/usr/share/doc/libcups2/README.Debian.gz? I had to use apt-file and
grep to find it.
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.24-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages cups depends on:
ii adduser 3.108 add and remove users and groups
ii cups-common 1.3.7-7 Common UNIX Printing System(tm) -
ii debconf [debconf-2.0] 1.5.22 Debian configuration management sy
ii ghostscript 8.62.dfsg.1-2.1 The GPL Ghostscript PostScript/PDF
ii libavahi-compat-libdn 0.6.22-3 Avahi Apple Bonjour compatibility
ii libc6 2.7-10 GNU C Library: Shared libraries
ii libcups2 1.3.7-7 Common UNIX Printing System(tm) -
ii libcupsimage2 1.3.7-7 Common UNIX Printing System(tm) -
ii libdbus-1-3 1.2.1-2 simple interprocess messaging syst
ii libgnutls26 2.4.0-2 the GNU TLS library - runtime libr
ii libkrb53 1.6.dfsg.4~beta1-3 MIT Kerberos runtime libraries
ii libldap-2.4-2 2.4.9-1 OpenLDAP libraries
ii libpam0g 0.99.7.1-6 Pluggable Authentication Modules l
ii libpaper1 1.1.23+nmu1 library for handling paper charact
ii libslp1 1.2.1-7.3 OpenSLP libraries
ii lsb-base 3.2-12 Linux Standard Base 3.2 init scrip
ii perl-modules 5.10.0-11 Core Perl modules
ii procps 1:3.2.7-8 /proc file system utilities
ii ssl-cert 1.0.21 simple debconf wrapper for OpenSSL
ii xpdf-utils [poppler-u 3.02-1.3 Portable Document Format (PDF) sui
Versions of packages cups recommends:
ii avahi-utils 0.6.22-3 Avahi browsing, publishing and dis
ii cups-client 1.3.7-7 Common UNIX Printing System(tm) -
ii foomatic-filters 3.0.2-20080211-3.1 OpenPrinting printer support - fil
ii smbclient 2:3.0.30-3 a LanManager-like simple client fo
-- debconf information:
cupsys/backend: ipp, lpd, parallel, scsi, serial, socket, usb, snmp, dnssd
--- End Message ---
--- Begin Message ---
2010/7/8 Antony Gelberg <firstname.lastname@example.org>
That's great, feel free to close, thanks for your efforts. :)
On 08/07/10 12:30, Jean Felder wrote:
I did a little research and i think that this bug corrected in version
I've found it in the changelog from the cups package:
[ Martin Pitt ]
* debian/rules: Install the serial backend with 0744 permissions to make it
run as root, since /dev/ttyS* are root:dialout and thus not accessible as
user "lp". Thanks to Chanoch (Ken) Bloom. (part of #506181, LP: #154277)
2010/7/8 Antony Gelberg<email@example.com>
On 08/07/10 11:17, Jean Felder wrote:
I have no idea - I'm not using serial printers any more. Sorry I can't be
You reported a bug against the CUPS package in Debian a long time ago
and the maintainers are wondering if you can still reproduce the bug
using version 1.4.4-1 that is currently in Debian unstable?
of more help.
--- End Message ---