web-dev-qa-db-fra.com

systemd-tmpfiles ne démarre pas

Après la dernière mise à jour, il y a un problème: les fichiers systemd-tmp ne démarrent pas (il n'y a donc aucun répertoire temporaire et certains services ne peuvent pas être démarrés).

root@myserver:/# journalctl -b 0 -u systemd-tmpfiles-setup.service
-- Logs begin at Ср 2018-11-21 01:00:51 MSK, end at Ср 2018-11-21 11:45:01 MSK. --
ноя 21 01:01:04 myserver systemd[1]: Starting Create Volatile Files and Directories...
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/log, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/lib, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/sendsigs.omit.d, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/lock/subsys, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/lock/lvm, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/lvm, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/cache, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/cache/man, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/php, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/rpcbind, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/rpcbind/rpcbind.xdr, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/rpcbind/portmap.xdr, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/samba, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/run/screen, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/run/sshd, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/run/Sudo, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/run/Sudo/ts, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/nologin, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/user, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/utmp, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/ask-password, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/seats, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/sessions, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/users, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/machines, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/shutdown, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/netif, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/netif/links, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/netif/leases, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/log, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/lib/systemd, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/lib/systemd/coredump, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/log/wtmp, refusing.
ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/log/btmp, refusing.
ноя 21 01:01:04 myserver systemd[1]: systemd-tmpfiles-setup.service: Main process exited, code=exited, status=1/FAILURE
ноя 21 01:01:04 myserver systemd[1]: Failed to start Create Volatile Files and Directories.
ноя 21 01:01:04 myserver systemd[1]: systemd-tmpfiles-setup.service: Unit entered failed state.
ноя 21 01:01:04 myserver systemd[1]: systemd-tmpfiles-setup.service: Failed with result 'exit-code'.

J'essayais d'exécuter des fichiers de configuration séparés

root@myserver:/# systemd-tmpfiles --create /usr/lib/tmpfiles.d/sshd.conf
Unsafe symlinks encountered in /var/run/sshd, refusing.

/ var/run/sshd est vide. Il n'y a pas de liens symboliques du tout.

Je n'ai aucune idée de ce que cela signifie et comment y remédier. Tous les conseils sont les bienvenus.

root@myserver:/# uname -a
Linux myserver 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
4
Loki

J'ai eu exactement le même problème aujourd'hui sur mon poste de travail - Ubuntu 18.04.1. Enfin (recherche dans le code source de systemd), j’ai pensé que mon dossier racine =/property avait été changé pour moi - le seul utilisateur. chown root.root / a résolu le problème :) ... après environ 2 heures de recherche.

12
ivop

Rencontré ce problème aussi.

Pour ajouter à la réponse ci-dessus, vous devez vous assurer que le chemin d'accès complet appartient à root, et pas seulement /. D'une manière ou d'une autre, mon dossier /var a eu le propriétaire de mysql (bon travail, mysql), et sshd essayait de créer /var/run/sshd, ce qui a échoué.

2
Michael Kim

Il semble que ce soit un bogue: systemd-tmpfiles-setup.service échoue sur btrfs

1
Gannet