Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[CTP] Permission access prevents a write action to create ntp file called drift.temp

0

0

Article ID: KB34857 KB Last Updated: 17 Oct 2019Version: 1.0
Summary:

When CTP systems are upgraded to version 9.0r1, a NTP (Network Time Protocol) error message is seen.
A permission access issue prevents a write action to create a file called drift.temp. Update attempts occurred hourly.

Symptoms:

The log file shows the following error:

Jun 26 19:36:28 10.30.220.214 Jun 26 19:36:28 lab-ctp ntpd[1128]: frequency file /var/lib/ntp/drift.TEMP: 
Permission denied

ctp_cmd@lab-ctp:/var/lib$ ls -la ntp
total 0
drwxr-xr-x  2 messagebus messagebus 0 Jan  8 05:03 .
drwxr-xr-x 19 root       root       0 Jun 26 21:28 ..


[ctp_cmd@lab-ctp:~ 151]# cat /etc/ntp.conf
# DO NOT OVERWRITE
# This is the most basic ntp configuration file
# The driftfile must remain in a place specific to this
# machine - it records the machine specific clock error
# This should be a server that is close (in IP terms)
# to the machine.  Add other servers as required.
# Unless you un-comment the line below ntpd will sync
# only against the local system clock.
#
# server time.server.example.com
#
# Using local hardware clock as fallback
# Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself

### ADD RESTRICTIONS HERE
restrict -4 default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1

### SOME DEFAULT TIME SETTINGS
driftfile /var/lib/ntp/drift
fudge 127.127.1.0 stratum 14
Cause:

The drift file is created in /var/lib/ntp as per ntp.conf. Due to the permission of file creation not being allowed in /var/lib/ntp the following error is seen:

ntpd[1128]: frequency file /var/lib/ntp/drift.TEMP: Permission denied


Entry in ntp.conf
-----------------------
### SOME DEFAULT TIME SETTINGS
driftfile /var/lib/ntp/drift
Solution:

The issue was resolved by changing the setting of the drift file to /etc/ntp/drift and modifying the permission and ownership of the ntp directory as per older releases.

[root@ctp_41:/etc 29]# ls -lrt | grep ntp
-rw-r--r-- 1 root    root      679 Feb  8 02:59 ntp.conf
drwxr-xr-x 2 ntp     ntp         0 Feb  8 03:59 ntp

[root@ctp_41:/etc/ntp 32]# ls -lrt
total 8
-rw------- 1 root root 3 Feb  8 01:44 keys
-rw------- 1 ntp  ntp  6 Feb  8 03:59 drift

Restart the ntp service to load the new ntp configuration.

Command to execute for restart:

==================
[root@ctp_72:/tmp 7]# /etc/init.d/ntpd restart
Stopping ntpd: [  OK  ]
Starting ntpd: [  OK  ]


Note: A fix is planned to be incorporated for the next release.

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search