package openntpd 3.9p1+debian-9 failed to install/upgrade due to apparmor: /etc/openntpd/ntpd.conf: Permission denied

Bug #1011998 reported by anaklupa
36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
openntpd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

package openntpd 3.9p1+debian-9 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: openntpd 3.9p1+debian-9
ProcVersionSignature: Ubuntu 3.2.0-25.40-generic 3.2.18
Uname: Linux 3.2.0-25-generic x86_64
ApportVersion: 2.0.1-0ubuntu9
AptOrdering:
 ntp: Remove
 openntpd: Install
 openntpd: Configure
Architecture: amd64
Date: Tue Jun 12 16:29:39 2012
DuplicateSignature:
 Setting up openntpd (3.9p1+debian-9) ...
 Starting openntpd: /etc/openntpd/ntpd.conf: Permission denied
 invoke-rc.d: initscript openntpd, action "start" failed.
 dpkg: error processing openntpd (--configure):
  subprocess installed post-installation script returned error exit status 1
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: openntpd
Title: package openntpd 3.9p1+debian-9 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to precise on 2012-05-27 (16 days ago)

Revision history for this message
anaklupa (auburn218) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openntpd (Ubuntu):
status: New → Confirmed
Revision history for this message
Bedi (bedi) wrote :

Status confirmed.
Problem is related to previusly installed ntp package.

Commandline: apt-get install openntpd
Install: openntpd:amd64 (3.9p1+debian-9)
Upgrade: aiccu:amd64 (20070115-14.1ubuntu3, 20070115-14.1ubuntu3)
Remove: ntp:amd64 (4.2.6.p3+dfsg-1ubuntu3.1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Sub-process /usr/bin/dpkg returned an error code (2)

Syslog:
type=1400 audit(1339489779.835:36): apparmor="DENIED" operation="open" parent=4844 profile="/usr/sbin/ntpd" name="/etc/openntpd/ntpd.conf" pid=4846 comm="ntpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

During instalation of ntp package in apparmor is instaled profile for ntpd from ntp package daemon.
During openntp package instalation files related to ntp package are removed (including profile file in apparmor) but this profile is not removed from apparmor daemon.
As workaround for installation openntp if ntp has been previusly installed
1 - remove ntp package with installation
2 - reload system
3 - install openntp

Revision history for this message
Justi (justifiably-l) wrote :

I hit this bug and got in a nasty loop with a package that requires openntpd or ntp (resulting in broken install when attempting to switch between them). This is the mythtv-backend-master package.

And I can't get this workaround to work, removing both packages then rebooting and trying to install openntpd again gave the permission denied error. I needed to delete /etc/apparmour.d/usr.sbin.ntpd manually.

Revision history for this message
AlberT (dralbert) wrote :

I needed to remove /etc/apparmor.d/cache/usr.sbin.ntpd

Revision history for this message
Thorsten Glaser (mirabilos) wrote :

@dralbert that plus “sudo /etc/init.d/apparmor reload” did the trick for me. Thanks!

I’ll put that into openntpd.preinst in my own OpenNTPD packages.

summary: - package openntpd 3.9p1+debian-9 failed to install/upgrade: subprocess
- installed post-installation script returned error exit status 1
+ package openntpd 3.9p1+debian-9 failed to install/upgrade due to
+ apparmor: /etc/openntpd/ntpd.conf: Permission denied
Revision history for this message
Ulises Vitulli (dererk-debian-org) wrote :

Fixed on Debian a long time before. Should already be present in Ubuntu by now

Changed in openntpd (Ubuntu):
status: Confirmed → 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.