fix(install): fix Debian 13 LXC template root ownership bug

The Debian 13 LXC template has a bug where / is owned by nobody instead
of root. This causes systemd-tmpfiles to fail with exit code 73 during
package installation (e.g. authelia).

Fix by checking and correcting / ownership at container setup.
This commit is contained in:
CanbiZ (MickLesk)
2026-01-28 13:50:54 +01:00
parent 07ad467f34
commit 397baf0a2c

View File

@@ -79,6 +79,13 @@ EOF
# ------------------------------------------------------------------------------
setting_up_container() {
msg_info "Setting up Container OS"
# Fix Debian 13 LXC template bug where / is owned by nobody
# Only attempt in privileged containers (unprivileged cannot chown /)
if [[ "$(stat -c '%U' /)" != "root" ]]; then
chown root:root / 2>/dev/null || true
fi
for ((i = RETRY_NUM; i > 0; i--)); do
if [ "$(hostname -I)" != "" ]; then
break