mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-28 11:50:06 +00:00
fix(build): fix Debian 13 root ownership from host before customization
This commit is contained in:
parent
032dfacce2
commit
b35437c391
1 changed files with 11 additions and 0 deletions
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue