needs to be fixed to work with cupsd running as non-root

Bug #36093 reported by Carthik Sharma
46
Affects Status Importance Assigned to Milestone
cups-pdf (Ubuntu)
Fix Released
Medium
Martin-Éric Racine

Bug Description

I installed cups-pdf using apt.

I expected to be able to set up and use a pdf printer without having to manually edit the cupsd.conf file.

However, to make the pdf printing work, I had to edit cupsd.conf to change "RunAsUser Yes" to "RunAsUser No".

The README.Debian file for cups-pdf insists that the package has been modified to save files as lpadmin, but that does not make sense to me.

To fix this, either the package has to be modified to work as a user, as cups is suggested to be executed, or, the cupsd.conf file should be edited automatically when the package is installed, to avoid issues for the user. A third, but least preferred fix would be to add a note regarding having to edit the cupsd.conf file in the README.Debian documentation file.

Thank you!

Revision history for this message
Christian Göbel (christiangoebel) wrote :

The following bug-report is on a similar subject:
https://launchpad.net/distros/ubuntu/+bug/33127

Revision history for this message
Martin Pitt (pitti) wrote :

cups-pdf needs to be fixed to not run as root. It probably requires a small suid root helper to save the PDF file in the user's home directory.

Gnome, OO.o, and probably other applications can generate PDF natively nowadays, so it does not hurt that much any more luckily.

Changed in cups-pdf:
status: Unconfirmed → Confirmed
Revision history for this message
wannes (wannes) wrote :

In Dapper (CUPS 1,2) it is no longer possible to use "RunAsUser No". This option has been removed upstream.

Is there any other way to make this package work?
Not al application's can print PDF's natively. Eg: MS Word under Crossover Office (maybe not such a great example)

Revision history for this message
Martin Pitt (pitti) wrote :

Fixing cups-pdf is not that trivial, sorry. One workaround would be to create a directory in your home directory that group lp can write to:

  cd
  mkdir cups-pdf
  chmod 775 cups-pdf
  sudo chgrp lp cups-pdf

(Not tested, though). The other option is to print into a file (which will generate PostScript) and convert it to PDF with ps2pdf.

Revision history for this message
wannes (wannes) wrote :

Since I cannot install the cups-pdf-printer (Bug #42147) i cannot test this possible solution.

Revision history for this message
wannes (wannes) wrote :

Is sead in Bug #42147. The fix is:
sudo chmod +s /usr/lib/cups/backend/cups-pdf

Please add this to the README.Debian.

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Fixed in Debian as of 2.4.1-2
Upload pending.
Should be available for synchronisation to Ubuntu in a few hours.

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Uploaded to Debian as of Tue, 19 Sep 2006 12:00:38 -0700 and ready for synchronisation to Ubuntu.

Changed in cups-pdf:
assignee: nobody → q-funk
status: Confirmed → Fix Committed
Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Accepted:
 OK: cups-pdf_2.4.1-2.diff.gz
 OK: cups-pdf_2.4.1-2.dsc
     -> Component: universe Section: graphics

Origin: Debian/unstable
Format: 1.7
Date: Thu, 28 Sep 2006 10:48:29 +0100
Source: cups-pdf
Binary: cups-pdf
Architecture: source
Version: 2.4.1-2
Distribution: edgy
Urgency: low

Changed in cups-pdf:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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