Solved: ntpd[]: frequency file /etc/ntp/ntp.drift.TEMP: Permission denied.
Today in this post, we will see how to resolve one of the common NTP error message.
I. Error Message
Feb 27 19:50:08 ngelinux001 ntpd[4504]: frequency file /etc/ntp/ntp.drift.TEMP: Permission denied Feb 27 20:50:29 ngelinux001 puppet-agent[41422]: Applied catalog in 0.16 seconds Feb 27 22:50:07 ngelinux001 ntpd[4504]: frequency file /etc/ntp/ntp.drift.TEMP: Permission denied Feb 27 22:50:29 ngelinux001 puppet-agent[39222]: Applied catalog in 0.13 seconds Feb 28 00:50:08 ngelinux001 ntpd[4504]: frequency file /etc/ntp/ntp.drift.TEMP: Permission denied Feb 28 00:50:29 ngelinux001 puppet-agent[67597]: Applied catalog in 0.18 seconds Feb 28 01:50:08 ngelinux001 ntpd[4504]: frequency file /etc/ntp/ntp.drift.TEMP: Permission denied Feb 28 02:50:08 ngelinux001 ntpd[4504]: frequency file /etc/ntp/ntp.drift.TEMP: Permission denied
II. Description
This error is caused by an incorrect configuration in /etc/ntp.conf file.
In previous versions of Red Hat Enterprise Linux, the drift file was located in the /etc/ntp directory, which is owned by root.
If a configuration file from an older version of ntpd is reused on later versions of Red Hat Enterprise Linux this will cause an error, as the ntp daemon does not run as root and it cannot create a new drift file
III. Solution
Just verify the NTP drift file, and its permissions.
[root@ngelinux001 log]# cat /etc/ntp.conf | grep -i driftfile driftfile /etc/ntp/ntp.drift [root@ngelinux001 log]# ls -ld /var/lib/ntp/drift -rw-r--r-- 1 root root 0 Feb 28 02:54 /var/lib/ntp/drift [root@ngelinux001 log]# chown ntp:ntp /var/lib/ntp/drift [root@ngelinux001 log]# service ntpd status ntpd (pid 4504) is running... [root@ngelinux001 log]# service ntpd restart Shutting down ntpd: [ OK ] Starting ntpd: [ OK ] [root@ngelinux001 log]#