mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-03 20:03:25 +01:00
fix(build): fix Debian 13 root ownership from host before customization
This commit is contained in:
@@ -3878,6 +3878,17 @@ EOF
|
||||
|
||||
fix_gpu_gids
|
||||
|
||||
# Fix Debian 13 LXC template bug where / is owned by nobody:nogroup
|
||||
# This must be done from the host as unprivileged containers cannot chown /
|
||||
local rootfs
|
||||
rootfs=$(pct config "$CTID" | grep -E '^rootfs:' | sed 's/rootfs: //' | cut -d',' -f1)
|
||||
if [[ -n "$rootfs" ]]; then
|
||||
local mount_point="/var/lib/lxc/${CTID}/rootfs"
|
||||
if [[ -d "$mount_point" ]] && [[ "$(stat -c '%U' "$mount_point")" != "root" ]]; then
|
||||
chown root:root "$mount_point" 2>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
|
||||
# Continue with standard container setup
|
||||
msg_info "Customizing LXC Container"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user