Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 48822 - ntp doesnt respect driftfile properly
Summary: ntp doesnt respect driftfile properly
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
: 51433 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-23 14:27 UTC by slais-sysweb
Modified: 2004-05-23 12:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description slais-sysweb 2004-04-23 14:27:30 UTC
Bugs 26259 and 27426 are not fixed properly.

This problem still occurs with ntp-4.2.0-r2. the ntp.dift file is written
to /var/lib/ntp which has correct permission. However this file is only
wriiten when ntpd exits, every hour ntpd attempts to write
/var/lib/misc/ntp.drift.TEMP and fails because /var/lib/misc is only
writable by root.
A workaound is to
touch /var/lib/misc/ntp.drift.TEMP
chgrp ntp /var/lib/misc/ntp.drift.TEMP
chmod 664 /var/lib/misc/ntp.drift.TEMP

a better solution would be to modify ntpd so as to write ntp.drift.TEMP to
the same location as ntp.drift ie /var/lib/ntp
Comment 1 SpanKY gentoo-dev 2004-04-23 19:01:54 UTC
what is your ntp.conf file ?

setting driftfile /var/lib/ntp/ntp.drift in my ntp.conf makes ntpd do what it's supposed to (write the temp file to /var/lib/ntp)
Comment 2 slais-sysweb 2004-04-24 04:40:25 UTC
My /etc/ntp.conf
# you should not need to modify the following paths
logfile         /var/log/ntpd.log
driftfile       /var/lib/misc/ntp.drift

The lines above were unchanged from the original install, emerging the latest ntp does not install a new version so no changes show up when running etc-update.
So OK if I change this line that fixes the problem, however it does pose another question. If my current /etc/ntp.conf is saying write the driftfile to /var/lib/misc why is it actually writing the file to /var/lib/ntp ? It would appear that the line in the config file is only being honoured by the ntp.drift.TEMP file.
Comment 3 SpanKY gentoo-dev 2004-05-15 23:40:50 UTC
it didnt, the ebuild did:
    dodir /var/lib/ntp
    fowners ntp:ntp /var/lib/ntp
    touch ${D}/var/lib/ntp/ntp.drift
    fowners ntp:ntp /var/lib/ntp/ntp.drift
Comment 4 SpanKY gentoo-dev 2004-05-23 12:35:23 UTC
*** Bug 51433 has been marked as a duplicate of this bug. ***