[ntp:questions] Re: drift file

Richard B. Gilbert rgilbert88 at comcast.net
Sat Oct 8 10:46:39 UTC 2005


Jarrar Jaffari jjaffari wrote:

>Hello gang,
> 
>I am running into real weird problem:
> 
>here is the line from /etc/ntp.conf
> 
># Drift file.  Put this in a directory which the daemon can write to.
>driftfile /etc/ntp/drift
> 
>After I run ntpd (ntpd -n -g -U ntp -N high -p /var/run/ntpd.pid -l
>/var/log/active/syslog/ntpd.log)
>after some time I see following lines in my log file:
> 
> 6 Oct 23:31:45 ntpd[25541]: can't open /etc/ntp/drift.TEMP: Permission
>denied
> 7 Oct 00:31:44 ntpd[25541]: can't open /etc/ntp/drift.TEMP: Permission
>denied
> 7 Oct 01:31:44 ntpd[25541]: can't open /etc/ntp/drift.TEMP: Permission
>denied
> 7 Oct 02:31:44 ntpd[25541]: can't open /etc/ntp/drift.TEMP: Permission
>denied
> 7 Oct 03:31:44 ntpd[25541]: can't open /etc/ntp/drift.TEMP: Permission
>denied
> 7 Oct 04:31:44 ntpd[25541]: can't open /etc/ntp/drift.TEMP: Permission
>denied
> 7 Oct 05:31:44 ntpd[25541]: can't open /etc/ntp/drift.TEMP: Permission
>denied
> 7 Oct 06:31:44 ntpd[25541]: can't open /etc/ntp/drift.TEMP: Permission
>denied
> 7 Oct 07:31:44 ntpd[25541]: can't open /etc/ntp/drift.TEMP: Permission
>denied
> 7 Oct 08:31:44 ntpd[25541]: can't open /etc/ntp/drift.TEMP: Permission
>denied
> 7 Oct 09:31:43 ntpd[25541]: can't open /etc/ntp/drift.TEMP: Permission
>denied
> 7 Oct 10:31:43 ntpd[25541]: can't open /etc/ntp/drift.TEMP: Permission
>denied
> 7 Oct 11:31:43 ntpd[25541]: can't open /etc/ntp/drift.TEMP: Permission
>denied
> 7 Oct 12:31:43 ntpd[25541]: can't open /etc/ntp/drift.TEMP: Permission
>denied
>
>and in my /etc/ntp directory I have no drift file created.
> 
>I am confused, shouldnt drift file be created ? When is it created ?
>What is it used for ?
>What happens if the the file is not there ?
> 
>Jarrar 
>_______________________________________________
>questions mailing list
>questions at lists.ntp.isc.org
>https://lists.ntp.isc.org/mailman/listinfo/questions
>
>  
>

What operating system are you running?  What version?   What version of 
ntpd are you running?   What account are you using to run ntpd?   What 
are the permissions on /etc?

Basically, nptd is telling you that it does not have the necessary 
access rights to create the drift file.  If ntpd is not running as root, 
and apparently it is not, you need to alter the permissions on /etc to 
allow ntpd to write to it or you need to run ntpd as root.

Ntpd can run without a drift file but every restart will be a cold 
start.   If it were able to create the file it would write the current 
frequency correction to the file once per hour.   When ntpd restarts it 
will read the file and use the value found there as the initial estimate 
to the frequency correction.  This speeds up synchronization.




More information about the questions mailing list