chown: cannot access `/etc/nagios3/resource.cfg': No such file or directory

Bug #931859 reported by Paul Belanger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nagios3 (Ubuntu)
Fix Released
Undecided
Paul Belanger

Bug Description

If you install nagios3-common, then configure the package as you see fit (removing /etc/nagios3/resource.conf) then try to install nagios3-cgi, the package will fail to install properly.

Adding password for user nagiosadmin
chown: cannot access `/etc/nagios3/resource.cfg': No such file or directory
dpkg: error processing nagios3-cgi (--configure):
 subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)

Related branches

Changed in nagios3 (Ubuntu):
assignee: nobody → Paul Belanger (pabelanger)
status: New → Confirmed
Revision history for this message
Paul Belanger (pabelanger) wrote :
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Thanks for the debdiff.

Seems to me removing all the permission setting in the postinst is the wrong way to fix this. How are those permissions going to get setup?

How about doing something like this instead?

test -f $en/resource.cfg && setperm root nagios 0640 $en/resource.cfg

NACK on the debdiff.

I am unsubscribing ubuntu-sponsors. Please re-subscribe the group once you've submitted an updated debdiff.

Thanks!

Revision history for this message
Paul Belanger (pabelanger) wrote :

The issue is the file permission being changed are not part of this package. In fact, they are already handled in the nagios3-common.postinst script.

It should be noted this is the same fix that upstream has chosen[1] to use.

[1] http://anonscm.debian.org/gitweb/?p=pkg-nagios/pkg-nagios3.git;a=blobdiff;f=debian/nagios3-cgi.postinst;h=6bf16f841aceeac04841067406e5f3d15f5fcbd6;hp=3dcea97c06739ef788be65e2e60bda48cff44bdf;hb=54e3dffab607f9ff9f4e08ae7e6ccd378efa9d49;hpb=45b3eb939649e8c867d155f81a09ece56b345afb

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Ah! that makes sense. Thanks for the new information.

ACK on the debdiff. The only change I will do before uploading is changing the version to 3.2.3-3ubuntu1 since we now have a Ubuntu delta.

Changed in nagios3 (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Paul Belanger (pabelanger) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nagios3 - 3.2.3-3ubuntu1

---------------
nagios3 (3.2.3-3ubuntu1) precise; urgency=low

  * Don't fix permissions in cgi postinst (LP: #931859)
 -- Paul Belanger <email address hidden> Tue, 14 Feb 2012 11:54:34 -0500

Changed in nagios3 (Ubuntu):
status: Fix Committed → 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.