# Chrony doesn't change rtc

## holgi1789

Hi,

I've set up chrony to change my drifting time. Chronyd is started and my cron script is configured correct. The same settings work on a debian webserver. The log files are empty and I activated port 123 in my firewall (no rejection in log file).

The script returns "200 OK" so it seems that it is working but it doesn't set time.

chrony.conf

```
root@percy:/etc/chrony# cat chrony.conf

# /etc/chrony/chrony.conf

server          pool.ntp.org

server          pool.ntp.org

keyfile         /etc/chrony/chrony.keys

commandkey      1

rtcfile         /var/lib/chrony/chrony.rtc

rtcfile         /var/lib/chrony/chrony.rtc

driftfile       /var/lib/chrony/chrony.drift

dumpdir         /var/lib/chrony

logdir          /var/log/chrony

log             measurements statistics tracking rtc

rtconutc

rtcdevice       /dev/misc/rtc

allow

dumponexit

```

Cron-Script:

```

#! /bin/sh

# /etc/cron.daily/setrtc

PASSWORD=`awk '$1 ~ /^1$/ {print $2; exit}' /etc/chrony/chrony.keys`

cat << EOF | /usr/bin/chronyc

password $PASSWORD

trimrtc

writertc

dump

EOF

```

Kernel-Config (reduced to rtc parameters)

```

root@percy:/etc/chrony# cat /usr/src/linux/.config |grep RTC

CONFIG_HPET_EMULATE_RTC=y

CONFIG_APM_RTC_IS_GMT=y

CONFIG_RTC=y

# CONFIG_SND_RTCTIMER is not set

```

Does anybody know about this problem for I don't find anything in this forum.

Thanks,

Holgi

----------

## holgi1789

I now see some errors. But I'm root, so why should any operation be permitted?

```

Sep 11 01:16:41 percy chronyd[11954]: chronyd version V1_20 starting

Sep 11 01:16:41 percy chronyd[11954]: Could not open RTC file /var/lib/chrony/chrony.rtc for reading

Sep 11 01:16:41 percy chronyd[11954]: Initial txc.tick=10000 txc.freq=0 (0.00000000) txc.offset=0 => hz=100 shift_hz=7

Sep 11 01:16:41 percy chronyd[11954]: set_config_hz=0 hz=100 shift_hz=7 basic_freq_scale=1.28000000 nominal_tick=10000 slew_delta_tick=833 max_tick_bias=1000

Sep 11 01:16:41 percy chronyd[11954]: Linux kernel major=2 minor=6 patch=8

Sep 11 01:16:41 percy chronyd[11954]: calculated_freq_scale=0.99902439 freq_scale=0.99902439

Sep 11 01:16:48 percy chronyd[11954]: No valid file coefficients, cannot trim system time

Sep 11 01:16:48 percy chronyd[11954]: Could not open dump file /var/lib/chrony/66.33.206.5.dat

Sep 11 01:16:48 percy chronyd[11954]: Could not open dump file /var/lib/chrony/193.120.10.3.dat

Sep 11 01:16:50 percy chronyd[11954]: Could not send to :66.33.206.5123 : Operation not permitted

Sep 11 01:16:52 percy chronyd[11954]: Could not send to :193.120.10.3123 : Operation not permitted

```

----------

