[ntp:questions] Re: drift file

John DeDourek dedourek at unb.ca
Sat Oct 8 11:55:11 UTC 2005


A guess that he is running one of the RedHat linux versions
that run ntpd as user "ntp".  A number of these had an
install error that installed the directory /etc/ntp as belonging
to root.  I suppose "chown ntp.ntp /etc/ntp" might work.
Later versions from ntp moved the drift file to /var/lib/ntp/
might be a better place for a writeable status file
as opposed to /etc/ntp; the latter is then left for true
"configuration"

As stated, if the original poster could provide some additional
information, this might enable a more exact response.

If this is a linux system, also helpful would be the output from
    ls -ld /etc/ntp
and the output from
     ps -ef | grep ntp
although the latter is somewhat sensitive to the version of "ps"
installed.

Richard B. Gilbert wrote:

> 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