[Bug 1548685] [NEW] System hangs, because NTPD drift file is blocked by AppArmor.

Launchpad Bug Tracker 1548685 at bugs.launchpad.net
Tue Feb 23 08:47:30 UTC 2016


You have been subscribed to a public bug:

NTPD drift file is not given permission in Apparmor configuration in "/etc/apparmor.d/usr.sbin.ntpd".
Proper permission should be given to the drift file.

EXPECTED RESULT
----
No NTPD drift error print in syslog and system doesn't hang.

ACTUAL RESULT
----
At least on my development PC during heavy compilation whole system freezes and I need to do a forced shutdown.

PRINT IN SYSLOG
----
kernel: [ 3613.938660] type=1400 audit(1456152589.274:52): apparmor="DENIED" operation="mknod" profile="/usr/sbin/ntpd" name="/var/lib/ntp.drift.TEMP" pid=1832 comm="ntpd" requested_mask="c" denied_mask="c" fsuid=104 ouid=104 Feb 22 16:49:49 fid655548 ntpd[1832]: frequency file /var/lib/ntp.drift.TEMP: Permission denied

FIX
----
...
/etc/ntp.drift rwl,
/etc/ntp.drift.TEMP rwl,
/etc/ntp/drift* rwl,
/var/lib/ntp/*drift rw,
/var/lib/ntp/*drift.TEMP rw,
/var/lib/ntp.drift.TEMP rw, <-- THIS WAS MISSING
...

~$ lsb_release -rd
Description:	Ubuntu 14.04.4 LTS
Release:	14.04

$ apt-cache policy ntp
ntp:
  Installed: 1:4.2.6.p5+dfsg-3ubuntu2.14.04.8
  Candidate: 1:4.2.6.p5+dfsg-3ubuntu2.14.04.8
  Version table:
 *** 1:4.2.6.p5+dfsg-3ubuntu2.14.04.8 0
        500 http://mirrors.bit.bittium.com/ubuntu/ trusty-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1:4.2.6.p5+dfsg-3ubuntu2.14.04.5 0
        500 http://mirrors.bit.bittium.com/ubuntu//ubuntu/ trusty-security/main amd64 Packages
     1:4.2.6.p5+dfsg-3ubuntu2 0
        500 http://mirrors.bit.bittium.com/ubuntu/ trusty/main amd64 Packages

** Affects: ntp (Ubuntu)
     Importance: Undecided
         Status: New

-- 
System hangs, because NTPD drift file is blocked by AppArmor.
https://bugs.launchpad.net/bugs/1548685
You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to ntp in Ubuntu.



More information about the Ubuntu-server-bugs mailing list