systemd-timesyncd.service 无法启动

systemd-timesyncd.service 无法启动
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2019-08-17 04:32:34 PDT; 11min ago
     Docs: man:systemd-timesyncd.service(8)
  Process: 4629 ExecStart=/lib/systemd/systemd-timesyncd (code=exited, status=238/STATE_DIRECTORY)
 Main PID: 4629 (code=exited, status=238/STATE_DIRECTORY)

在我创建 /var/lib/systemd/timesync/ 之后,它仍然显示此信息。

答案1

它现在正在工作。

    # chmod 700 /var/lib/private
    # rm -r /var/lib/private/systemd
    # systemctl start systemd-timesyncd
    # timedatectl status
                      Local time: Wed 2019-08-28 17:55:15 PDT
                  Universal time: Thu 2019-08-29 00:55:15 UTC
                        RTC time: Thu 2019-08-29 00:55:15
                       Time zone: America/Los_Angeles (PDT, -0700)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no
    # ls -ld /var/lib/private/systemd/timesync
    drwxr-xr-x 2 systemd-timesync systemd-timesync 4096 Aug 28 17:51 timesync/

相关内容