package cups 1.3.9-17ubuntu3.6 failed to install/upgrade: subprocess post-installation script returned error exit status 1 - chown: changing ownership of `/etc/cups/printers.conf': Operation not permitted

Bug #532053 reported by Robin
84
This bug affects 9 people
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: cups

The problem occurred during an update and I got this far into the bug reporting process from that failure so I haven't had a chance to investigate more. I'll do so and report back any further information.

ProblemType: Package
Architecture: i386
CupsErrorLog:

CurrentDmesg:
 [ 24.050652] eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
 [ 34.716009] eth0: no IPv6 routers present
DistroRelease: Ubuntu 9.04
ErrorMessage: subprocess post-installation script returned error exit status 1
Lpstat: Error: command ['lpstat', '-v'] failed with exit code 1: lpstat: Unable to connect to server
MachineType: To Be Filled By O.E.M. To Be Filled By O.E.M.
NonfreeKernelModules: nvidia
Package: cups 1.3.9-17ubuntu3.6
Papersize: letter
PpdFiles:
 Canon-SELPHY-CP-740: Canon SELPHY-CP-740 - CUPS+Gutenprint v5.2.3
 LaserJet_5P: HP LaserJet 5P Foomatic/ljet4 (recommended)
ProcCmdLine: root=UUID=a16f7981-4849-4092-b7bc-c4969bd072b7 ro quiet splash
ProcVersionSignature: Ubuntu 2.6.28-18.59-generic
SourcePackage: cups
Title: package cups 1.3.9-17ubuntu3.6 failed to install/upgrade: subprocess post-installation script returned error exit status 1

Revision history for this message
Robin (robinkinney) wrote :
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for your report.

The relevant error is :
---
Setting up cups (1.3.9-17ubuntu3.6) ...
chown: changing ownership of `/etc/cups/printers.conf': Operation not permitted
dpkg: error processing cups (--configure):
 subprocess post-installation script returned error exit status 1

summary: package cups 1.3.9-17ubuntu3.6 failed to install/upgrade: subprocess
- post-installation script returned error exit status 1
+ post-installation script returned error exit status 1 - chown: changing
+ ownership of `/etc/cups/printers.conf': Operation not permitted
tags: added: jaunty
Revision history for this message
Robin (robinkinney) wrote :

I can't see why changing ownership should be a problem for Update Manager. Update Manager runs as root and I can change
 ' /etc/cups/printers.conf' as root. I am curious about one line in this .conf file. The line 'AuthInfoRequired username,password' is commented out and I don't remember why. It's not like me to make a change in a file and not provide a comment and it would have been done some time ago under Hardy Heron.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

apparmor may protect the file even against root.
could you please attach the file /etc/apparmor.d/usr.sbin.cupsd and the output of the command:
$ sudo grep audit\( /var/log/kern.log

Thanks.

Revision history for this message
Robin (robinkinney) wrote : Re: [Bug 532053] Re: package cups 1.3.9-17ubuntu3.6 failed to install/upgrade: subprocess post-installation script returned error exit status 1 - chown: changing ownership of `/etc/cups/printers.conf': Operation not permitted

Jean-Baptiste,

Yes, I'll do so tomorrow. I've had several glasses of a very fine but
everyday wine and alcohol and software engineering don't mix.

Thank you for your kind attention to this issue and have a great
weekend.

Robin

On Fri, 2010-03-05 at 22:32 +0000, Jean-Baptiste Lallement wrote:
> apparmor may protect the file even against root.
> could you please attach the file /etc/apparmor.d/usr.sbin.cupsd and the output of the command:
> $ sudo grep audit\( /var/log/kern.log
>
> Thanks.
>

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

setting status to 'confirmed' due to duplicate reports.

Changed in cups (Ubuntu):
status: New → Confirmed
Revision history for this message
Robin (robinkinney) wrote :

Jean-Baptiste,

Attached are two files. 1) /etc/apparmor.d/usr.sbin.cupsd
2) results of "sudo grep audit/( /var/log/kern.log" piped to file
bug_532053. The first was last modified 6/18/2009.

Thank you for your help.

Robin

On Fri, 2010-03-05 at 22:32 +0000, Jean-Baptiste Lallement wrote:
> apparmor may protect the file even against root.
> could you please attach the file /etc/apparmor.d/usr.sbin.cupsd and the output of the command:
> $ sudo grep audit\( /var/log/kern.log
>
> Thanks.
>

Revision history for this message
Rebecca Yates (rebecca) wrote :

I recently followed the instructions at http://brainextender.blogspot.com/2009/01/ubuntu-intrepid-too-many-failed.html to fix a printing issue, and now I have this upgrade problem. Has making printers.conf immutable caused it?

Revision history for this message
Andrew Voumard (andrewv) wrote :

Hi,

I have seen some posts which say to execute (as root):

chattr -i /etc/cups/printers.conf

after commenting out the password line, to stop the automatic cups authentication from incorrectly changing it (due to some other cups authentication problem). If you have in fact done that at some time, you will get:

lsattr /etc/cups/printers.conf
----i-------------- /etc/cups/printers.conf

If you have the i flag set, the file cannot be deleted - even by root.
To fix it, execute:

chattr -i /etc/cups/printers.conf

You should then get:

lsattr /etc/cups/printers.conf
------------------- /etc/cups/printers.conf

HTH
Andrew

Revision history for this message
Robin (robinkinney) wrote :

Andrew,

Thank you and everyone for your kind attention.

Andrew, you hit exactly the problem. You as well, Rebecca, but I didn't realize it. The problem described in the brainexterder blog is quite different from the printing problem I was experiencing so I failed to make the connection.

Therefore what I reported was not a bug: error status 1 is correctly reported from the upgrade subprocess when it is unable to change ownership of printers.conf. Of course there is the underlying problem with cups authentication but I'll leave that to the bug administration to decide the fate of bug 532053.

Robin

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.