openntpd no longer installs -/etc/openntpd/ntpd.conf: Permission denied
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | openntpd (Ubuntu) |
Undecided
|
Unassigned | ||
Bug Description
OpenNTPd does not install from the package repository. ntp and ntpdate install / uninstall just fine.
The error message for openntpd:
Setting up openntpd (3.9p1+debian-2) ...
Starting openntpd: /etc/openntpd/
invoke-rc.d: initscript openntpd, action "start" failed.
dpkg: error processing openntpd (--install):
subprocess installed post-installation script returned error exit status 1
This happens even after purging:
$ apt-get purge openntpd
I would expect the package manager to be able to install openntpd without errors or else suggest a way to clear the problem out of the way.
$ sudo apt-get install openntpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
openntpd is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up openntpd (3.9p1+debian-2) ...
Starting openntpd: /etc/openntpd/
invoke-rc.d: initscript openntpd, action "start" failed.
dpkg: error processing openntpd (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
openntpd
E: Sub-process /usr/bin/dpkg returned an error code (1)
$ dpkg -i /var/cache/
(Reading database ... 136520 files and directories currently installed.)
Preparing to replace openntpd 3.9p1+debian-2 (using .../openntpd_
Stopping openntpd: ntpd.
Unpacking replacement openntpd ...
Setting up openntpd (3.9p1+debian-2) ...
Starting openntpd: /etc/openntpd/
invoke-rc.d: initscript openntpd, action "start" failed.
dpkg: error processing openntpd (--install):
subprocess installed post-installation script returned error exit status 1
Processing triggers for man-db ...
Processing triggers for sreadahead ...
Errors were encountered while processing:
openntpd
$ apt-cache policy openntpd
openntpd:
Installed: 3.9p1+debian-2
Candidate: 3.9p1+debian-2
Version table:
*** 3.9p1+debian-2 0
500 http://
100 /var/lib/
$ lsb_release -rd
Description: Ubuntu 9.10
Release: 9.10
:: DESCRIPTION ::
openntpd doesn't install due to remaining ntp apparmor profile after ntp removal (not purged)
:: HOW TO REPRODUCE ::
$ apt-get install ntp
$ invoke-rc.d apparmor restart
$ apt-get install openntpd
install fails with the error above
:: WORKAROUND ::
$ dpkg --purge ntp
$ invoke-rc.d apparmor restart
$ apt-get install openntpd
| Brian Murray (brian-murray) wrote : | #2 |
Using package version 3.9p1+debian-2 on Karmic I noticed the following:
(karmic)
Starting openntpd: invoke-rc.d: initscript openntpd, action "start" failed.
| Kamus (kamus) wrote : | #3 |
@Brian, you are right, but when while was installing this package via apt that do not show any error message so I assumed that works fine.
| Lars Noodén (larsnooden) wrote : | #4 |
@Kamus, the above report is in Karmic and is after updating the sources and after uninstalling / reinstalling. I tried to make that clear in the description..
| Artis Caune (artis.caune) wrote : | #5 |
[ 1029.725409] type=1503 audit(125647557
| Artis Caune (artis.caune) wrote : | #6 |
I think this happens when you:
- install ntp
- install openntpd (which uninstall ntp)
apparmo profiles are not updated, and /usr/sbin/ntpd is still there.
/etc/init.
| Jean-Baptiste Lallement (jibel) wrote : | #7 |
Confirmed in karmic and lucid
As Artis said this is an issue with ntp apparmor profile left after implicit uninstall of ntp.
The workaround is to purge the remaining configuration file and restart apparmor before installing openntpd.
| Changed in openntpd (Ubuntu): | |
| status: | New → Confirmed |
| description: | updated |
| David Sharnoff (launchpad-trust) wrote : | #8 |
Just running apparmor restart doesn't fix the problem.
To get openntpd installed on ubuntu 9.10, I did:
aa-complain /usr/sbin/ntpd
apt-get install -f
| David Sharnoff (launchpad-trust) wrote : | #9 |
One more issue... when you install openntpd (replacing ntpd) it leaves behind a /etc/init.d/ntpd file. That file is still run and it starts the openntpd server but doesn't do so correctly.
| sOLARiZ (mg-solariz) wrote : | #10 |
Same error here. Installed ntpd, removed it, tried to install openntpd. Failed.
/etc/init.
Restarting openntpd: /etc/openntpd/
the installer didn`t created a config file.
Richte openntpd ein (3.9p1+debian-2) ...
Starting openntpd: /etc/openntpd/
invoke-rc.d: initscript openntpd, action "start" failed.
dpkg: Fehler beim Bearbeiten von openntpd (--configure):
Unterprozess installiertes post-installati
Fehler traten auf beim Bearbeiten von:
openntpd
E: Sub-process /usr/bin/dpkg returned an error code (1)
| Jean-Baptiste Lallement (jibel) wrote : | #11 |
@solariz: you're not affected by the same bug. The original report is about a 'Permission denied' and yours is a 'No such file or directory'
Please file a new report. Thanks.
Same problem (Permission denied) on 10.04 amd64.
Restarting apparmor fixed the issue.
| Andrew Cowie (afcowie) wrote : | #13 |
Still present in lucid{,-proposed}.
AfC
| Ryan Smith-Roberts (rmsr) wrote : | #14 |
I experienced this in maverick when moving to openntpd from ntp.
I had to purge ntp and then use aptitude to reinstall the openntpd package to resolve it.
| Faldegast (faldegast) wrote : | #15 |
Still having this problem in 10.10, none of the tricks provided above works for me.
| Andreas Moog (ampelbein) wrote : | #16 |
This should be fixed by the version in natty.
| Changed in openntpd (Ubuntu): | |
| status: | Confirmed → Fix Released |
| Christian Kujau (christiank) wrote : | #17 |
Still there on 10.04.2. Disabling apparmor (boot with security="") helped. Rebooting with apparmor enabled again (security=apparmor) still allows openntpd to run. So, this looks like an apparmor related problem - openntpd can't do much about it (but its install scripts can).
| Julien (julien-t43) wrote : | #18 |
bug still happening on 11.04 if you switch between ntp & openntp packages.
| Ryan Daly (daly-ctcnet) wrote : | #19 |
I can confirm this happens when switching from ntp to openntp package on 10.04.3.
| Thomas Krennwallner (tkren) wrote : | #20 |
Still present on 11.10 oneiric. I had to "service apparmor restart" before I could "service openntpd restart".
| Peter Hoeg (peterhoeg) wrote : | #21 |
Still present on 13.04 raring. The apparmor restart workaround does the trick.
| ndsipa pomu (ndsipa-pomu) wrote : | #22 |
This is still present on Utopic (14.10) and restarting apparmor doesn't help at all.
| ndsipa pomu (ndsipa-pomu) wrote : | #23 |
I've managed to get it installed by running "apt-get purge openntpd apparmor", performing a reboot and then installing openntp.
| tim (acmeinc) wrote : | #24 |
To work around this, I had to manually "purge" ntp, and restart apparmor to allow openntpd to start.
apt-get install openntpd -y
apt-get purge ntp -y
service apparmor restart
service openntpd restart
Success!
| Ker Ruben Ramos (xdiscent) wrote : | #25 |
Still happens on Ubuntu 14.04.3.
I know that the workaround works. But the problem is still there.
| Nick Groenen (zoni) wrote : | #26 |
Despite this supposedly having been fixed, I still run into this on Ubuntu 16.04.1 LTS (xenial).
This is caused by the ntp package (which comes installed by default) placing an apparmor profile in `/etc/apparmor.
The solution is to (1) remove /etc/apparmor.
| Alexander Stohr (alexander-stohr) wrote : | #27 |
i was able to run into this "permission denied" problem with Ubuntu 14.04
i tried this:
apt-get purge openntpd apparmor
apt-get install openntpd apparmor
and i even tried to set "rw" file rights for everybody...
let's do a wild guess some service has opened and locked (exclusive access) the file in question.
and this service is not neccessarily having the char sequence "ntp" in its body.
"ps fax | grep ntp" did not return anything that might be a server to me.
trying:
sudo lsof /etc/openntpd/
this line returned only a fuse-warning of probable incompletness to me - nothing else.
even no report at all when using fuser instead of lsof.
running "openntpd" with sudo from the command line creates the very well known permission error.
checking this:
sudo ls -l `which openntpd`
return this:
lrwxrwxrwx 1 root root 4 Dez 24 2013 /usr/sbin/openntpd -> ntpd
deleting the symlink and retrying the partial installation suddenly seems to succeed.
is the uninstall/install having a problem with a leftover symlink pointing to ntpd?
doing a re-install from that state... failed again! and the symlink got recreated.
stopping here - feeling puzzled... but it looks like the openntpd package itself is the problem.
| Alexander Stohr (alexander-stohr) wrote : | #28 |
please re-open this bug!
(or tell me how to otherwise make this issue manageable again.)
| Martijn Brinkers (m-brinkers) wrote : | #29 |
I have a similar problem on Ubuntu 14.04. The only workaround that works was the one provided by "Alexander Stohr", i.e., install openntpd (which failes), then remove the symlink /usr/sbin/openntpd -> ntpd and then reinstall openntpd.


I try to reproduce this issue in Karmic up to date and works fine for me. Could you update your sources (or select another mirror) and try to reinstall openntpd package?
Regards