Debian Bug report logs - #489975
cups: Serial backend not recognised by default

version graph

Package: cups; Maintainer for cups is Debian Printing Team <debian-printing@lists.debian.org>; Source for cups is src:cups.

Reported by: Antony Gelberg <antony.gelberg@gmail.com>

Date: Wed, 9 Jul 2008 00:09:02 UTC

Severity: normal

Found in version cups/1.3.7-7

Done: Jean Felder <jean.felder@gmail.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian CUPS Maintainers <pkg-cups-devel@lists.alioth.debian.org>:
Bug#489975; Package cups. Full text and rfc822 format available.

Acknowledgement sent to Antony Gelberg <antony@wayforth.co.uk>:
New Bug report received and forwarded. Copy sent to Debian CUPS Maintainers <pkg-cups-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Antony Gelberg <antony@wayforth.co.uk>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: cups: Serial backend not recognised by default
Date: Wed, 09 Jul 2008 01:07:44 +0100
Package: cups
Version: 1.3.7-7
Severity: normal

I have just tried connecting a serial printer to ttyS0, with default 
permissions:
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 
"/usr/lib/cups/daemon/cups-deviced" (pid=4656)
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 
"parallel:/dev/lp0"...
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"...
Content-Type: application/ipp
<snip>

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 
didn't help.

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[1], with suitable guidance 
given as to possible permission settings for the serial port.  Better 
still, it should just work.

Thanks,

Antony

[1] 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/raw-print: true
  cupsys/backend: ipp, lpd, parallel, scsi, serial, socket, usb, snmp, dnssd




Changed Bug submitter from Antony Gelberg <antony@wayforth.co.uk> to Antony Gelberg <antony.gelberg@wayforth.com>. Request was from Antony Gelberg <antony.gelberg@wayforth.com> to control@bugs.debian.org. (Mon, 06 Oct 2008 01:21:06 GMT) Full text and rfc822 format available.

Changed Bug submitter to 'Antony Gelberg <antony.gelberg@gmail.com>' from 'Antony Gelberg <antony.gelberg@wayforth.com>' Request was from Antony Gelberg <antony.gelberg@gmail.com> to control@bugs.debian.org. (Sun, 06 Jun 2010 12:18:08 GMT) Full text and rfc822 format available.

Message sent on to Antony Gelberg <antony.gelberg@gmail.com>:
Bug#489975. (Thu, 08 Jul 2010 08:21:03 GMT) Full text and rfc822 format available.

Message #12 received at 489975-submitter@bugs.debian.org (full text, mbox):

From: Jean Felder <jean.felder@gmail.com>
To: 489975-submitter@bugs.debian.org
Subject: [Debian QA] please review your old bug reports against CUPS
Date: Thu, 8 Jul 2010 10:17:18 +0200
[Message part 1 (text/plain, inline)]
Hi!

You reported a bug against the CUPS package in Debian a long time ago (#489975)
and the maintainers are wondering if you can still reproduce the bug
using version 1.4.4-1 that is currently in Debian unstable?


Thanks!

Jean
[Message part 2 (text/html, inline)]

Information stored :
Bug#489975; Package cups. (Thu, 08 Jul 2010 08:30:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Antony Gelberg <antony.gelberg@gmail.com>:
Extra info received and filed, but not forwarded. (Thu, 08 Jul 2010 08:30:10 GMT) Full text and rfc822 format available.

Message #17 received at 489975-quiet@bugs.debian.org (full text, mbox):

From: Antony Gelberg <antony.gelberg@gmail.com>
To: Jean Felder <jean.felder@gmail.com>, 489975-quiet@bugs.debian.org
Subject: Re: Bug#489975: [Debian QA] please review your old bug reports against CUPS
Date: Thu, 08 Jul 2010 11:28:59 +0300

On 08/07/10 11:17, Jean Felder wrote:
> Hi!
>
> You reported a bug against the CUPS package in Debian a long time ago (#489975)
> and the maintainers are wondering if you can still reproduce the bug
> using version 1.4.4-1 that is currently in Debian unstable?
>

I have no idea - I'm not using serial printers any more.  Sorry I can't 
be of more help.

Antony




Information stored :
Bug#489975; Package cups. (Thu, 08 Jul 2010 09:33:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jean Felder <jean.felder@gmail.com>:
Extra info received and filed, but not forwarded. (Thu, 08 Jul 2010 09:33:05 GMT) Full text and rfc822 format available.

Message #22 received at 489975-quiet@bugs.debian.org (full text, mbox):

From: Jean Felder <jean.felder@gmail.com>
To: Antony Gelberg <antony.gelberg@gmail.com>
Cc: 489975-quiet@bugs.debian.org, Martin Pitt <mpitt@debian.org>
Subject: Re: Bug#489975: [Debian QA] please review your old bug reports against CUPS
Date: Thu, 8 Jul 2010 11:30:22 +0200
[Message part 1 (text/plain, inline)]
Hi,

I did a little research and i think that this bug corrected in version
1.3.9-6.
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)


Jean

2010/7/8 Antony Gelberg <antony.gelberg@gmail.com>

>
>
> On 08/07/10 11:17, Jean Felder wrote:
>
>> Hi!
>>
>> You reported a bug against the CUPS package in Debian a long time ago
>> (#489975)
>> and the maintainers are wondering if you can still reproduce the bug
>> using version 1.4.4-1 that is currently in Debian unstable?
>>
>>
> I have no idea - I'm not using serial printers any more.  Sorry I can't be
> of more help.
>
> Antony
>
[Message part 2 (text/html, inline)]

Reply sent to Jean Felder <jean.felder@gmail.com>:
You have taken responsibility. (Thu, 08 Jul 2010 09:39:03 GMT) Full text and rfc822 format available.

Notification sent to Antony Gelberg <antony.gelberg@gmail.com>:
Bug acknowledged by developer. (Thu, 08 Jul 2010 09:39:03 GMT) Full text and rfc822 format available.

Message #27 received at 489975-done@bugs.debian.org (full text, mbox):

From: Jean Felder <jean.felder@gmail.com>
To: 489975-done@bugs.debian.org
Cc: Antony Gelberg <antony.gelberg@gmail.com>
Subject: Re: Bug#489975: [Debian QA] please review your old bug reports against CUPS
Date: Thu, 8 Jul 2010 11:35:23 +0200
[Message part 1 (text/plain, inline)]
2010/7/8 Antony Gelberg <antony.gelberg@gmail.com>

> That's great, feel free to close, thanks for your efforts.  :)
>
> Antony
>
>
> On 08/07/10 12:30, Jean Felder wrote:
>
>> Hi,
>>
>> I did a little research and i think that this bug corrected in version
>> 1.3.9-6.
>> 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)
>>
>>
>> Jean
>>
>> 2010/7/8 Antony Gelberg<antony.gelberg@gmail.com>
>>
>>
>>>
>>> On 08/07/10 11:17, Jean Felder wrote:
>>>
>>>  Hi!
>>>>
>>>> You reported a bug against the CUPS package in Debian a long time ago
>>>> (#489975)
>>>> and the maintainers are wondering if you can still reproduce the bug
>>>> using version 1.4.4-1 that is currently in Debian unstable?
>>>>
>>>>
>>>>  I have no idea - I'm not using serial printers any more.  Sorry I can't
>>> be
>>> of more help.
>>>
>>> Antony
>>>
>>>
>>
[Message part 2 (text/html, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 06 Aug 2010 07:36:26 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 24 05:23:22 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.