/etc/ntp/ntp.drift.TEMP: Permission denied in /var/log/messages

NTP is not synchronized and you get “/etc/ntp/ntp.drift.TEMP: Permission denied” in /var/log/messages. This is because ntpd which run as ntp user does not have write permission to /etc/ntp. Change driftfile location to /var/lib/ntp/drift which is preferred or any directory where ntp has read,write permission.

NTP is not synchronised

# ntpstat
unsynchronised
  time server re-starting
  polling server every 8 s

/etc/ntp is owned by root

 # ls -ld /etc/ntp/
 drwxr-xr-x. 3 root root 4096 Dec 15 13:42 /etc/ntp/

Change driftfile in /etc/ntp.conf

# cat /etc/ntp.conf
server $ntp_server
driftfile /var/lib/ntp/drift

Note /var/lib/ntp is owned by ntp

# ll -ld /var/lib/ntp/
drwxr-xr-x. 2 ntp ntp 4096 Mar 15 08:55 /var/lib/ntp/

Restart NTP

service ntpd restart

After some minutes, it should be syncronised

# ntpstat
synchronised to NTP server (198.206.246.59) at stratum 3
   time correct to within 170 ms
   polling server every 256 s
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s