上次更新后出现了一个问题:systemd-tmpfiles 无法启动(因此没有临时目录,某些服务无法启动)。但根文件夹“/”的所有权仍为“root”用户,而不是“user”。以下是“journalctl -xe | grep systemd-tmpfiles”的输出:
Nov 22 06:29:04 orangepizero systemd-tmpfiles[212]: Failed to validate path /dev/btrfs-control: Bad file descriptor
Nov 22 06:29:04 orangepizero systemd-tmpfiles[212]: Failed to validate path /dev/net: Bad file descriptor
Nov 22 06:29:04 orangepizero systemd-tmpfiles[212]: Failed to validate path /dev/net/tun: Bad file descriptor
-- Subject: Unit systemd-tmpfiles-setup.service has begun start-up
-- Unit systemd-tmpfiles-setup.service has begun starting up.
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: [/usr/lib/tmpfiles.d/var.conf:14] Duplicate line for path "/var/log", ignoring.
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /var: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /var/log: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /var/lib: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /run/sendsigs.omit.d: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /home: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /srv: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /run/lock/subsys: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /var/cache: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /var/cache/man: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /var/run/screen: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /var/run/sshd: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /var/run/sudo: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /var/run/sudo/ts: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /run/nologin: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /run/user: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /run/utmp: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /run/systemd/ask-password: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /run/systemd/seats: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /run/systemd/sessions: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /run/systemd/users: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /run/systemd/machines: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /run/systemd/shutdown: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /run/systemd/netif: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /run/systemd/netif/links: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /run/systemd/netif/leases: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /run/log: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /var/lib/systemd: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /var/lib/systemd/coredump: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /tmp: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /var/log/wtmp: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /var/log/btmp: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /var/spool: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /tmp/.X11-unix: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /tmp/.ICE-unix: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /tmp/.XIM-unix: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /tmp/.font-unix: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /tmp/.Test-unix: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /run/log/journal: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd-tmpfiles[419]: Failed to validate path /run/log/journal/30cc1dc4f9bb4bf38a7d997979ec8163: Bad file descriptor
Nov 22 06:29:05 orangepizero systemd[1]: systemd-tmpfiles-setup.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit systemd-tmpfiles-setup.service has failed
-- Unit systemd-tmpfiles-setup.service has failed.
Nov 22 06:29:06 orangepizero systemd[1]: systemd-tmpfiles-setup.service: Unit entered failed state.
Nov 22 06:29:06 orangepizero systemd[1]: systemd-tmpfiles-setup.service: Failed with result 'exit-code'.
-- Subject: Unit systemd-tmpfiles-clean.timer has finished start-up
-- Unit systemd-tmpfiles-clean.timer has finished starting up.
-- Subject: Unit systemd-tmpfiles-clean.service has begun start-up
-- Unit systemd-tmpfiles-clean.service has begun starting up.
Nov 22 06:44:51 orangepizero systemd-tmpfiles[3619]: [/usr/lib/tmpfiles.d/var.conf:14] Duplicate line for path "/var/log", ignoring.
-- Subject: Unit systemd-tmpfiles-clean.service has finished start-up
-- Unit systemd-tmpfiles-clean.service has finished starting up.
如何修复?
答案1
我认为它可能与这个问题有关:https://answers.launchpad.net/ubuntu/+source/systemd/+question/676237
这似乎是在 system-tmpfiles 的上次更新中引入的。