[PATCH] foomatic-configure doesn't work on Ubuntu - owner of generated ppd files on ubuntu should be cupsys, not root

Bug #31323 reported by Mantas Kriaučiūnas
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Baltix
Fix Released
High
Mantas Kriaučiūnas
foomatic-db-engine (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

foomatic-configure doesn't work on Ubuntu - owner of generated ppd files on ubuntu should be cupsys, not root

Steps to reproduce:

1. apt-get install foomatic-db-engine
2. try to add printer with foomatic-configure command - run sudo foomatic-configure -n "HP3425" -N "TEST Printer" -L "/dev/lp0" -p "HP-DeskJet_3425" -c "parallel:/dev/lp0" -d "hpijs"

Actual results:

foomatic-configure doesn't setup new printer queue correctly (needed ppd file isn't in /etc/cups/ppd/ , also in /etc/cups/printers.conf printer's DeviceURI becomes file:/dev/null , etc.) and exits with error:
vytis@baltix-linux:~/downloads$ sudo foomatic-configure -n "HP3425" -N "TEST Printer" -L "/dev/lp0" -p "HP-DeskJet_3425" -c "parallel:/dev/lp0" -d "hpijs"
lpadmin: add-printer (set model) failed: server-error-internal-error
Could not set up/change the queue "HP3425"!

Expected results:

foomatic-configure should setup new printer queue correctly (should put needed ppd file in /etc/cups/ppd/ and set DeviceURI to specified device in /etc/cups/printers.conf , etc.) and exit without error.

I've patched foomatic-configure script to set owner of generated ppd files to cupsys if user cupsys is on the system. Patched sources and ubuntu packages (recompiled for breezy (5.10)) are at

ftp://ftp.akl.lt/Linux/Baltix/Baltix-Ubuntu_packages/foomatic-db-engine/

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote : patch to make foomatic-configure work on Ubuntu-based systems, where cupd runs not as root, but as cupsys user

patch to make foomatic-configure work on Ubuntu-based systems, where cupd runs not as root, but as cupsys user.

added new function changeowner, which changes owner of generated ppd file only if specified user exists on system.

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

Printers adding bug with foomatic-configure fixed in Baltix GNU/Linux 1.2beta

Revision history for this message
GeoffSilver (geoff+ubuntu) wrote :

Identical problem on dapper, as of 3/27/06 with both foomatic-gui and printconf:

root@bender:/etc/cups# printconf
Configuring Samsung ML-1710 on usb:/dev/usblp0 with gdi driver as queue
"ml1710_2".
lpadmin: Unable to copy PPD file - Permission denied!
Could not set up/change the queue "ml1710_2"!

 * Stopping Common Unix Printing System: cupsd [ ok ]
 * Starting Common Unix Printing System: cupsd ...done.
If printconf was unable to install all of your printers, please visit
http://www.linuxprinting.org/ for printer information and support from fellow
users.

Matt Zimmerman (mdz)
Changed in foomatic-db-engine:
assignee: nobody → pitti
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks Mantas! I'm applying your patch now. BTW, if it's already fixed in Baltix, can you please set the status to 'Fix released' for Baltix?

Changed in foomatic-db-engine:
status: Unconfirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

 foomatic-db-engine (3.0.2-20060318-1ubuntu1) dapper; urgency=low
 .
   * foomatic-configure.in: Change owner of copied PPD files to 'cupsys' if
     this user exists. This fixes operation with our cups which runs as
     non-root. Thanks a lot to Mantas Kriaučiūnas for the patch!
     Closes: LP#31323

Changed in foomatic-db-engine:
status: In Progress → Fix Released
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.