From 3f7622d9e3131b5460e85cc6ecabbf356e76232f Mon Sep 17 00:00:00 2001 From: librelad Date: Sun, 24 May 2026 01:36:29 +0100 Subject: [PATCH] fix(switcher): control plane is libreportal in BOTH modes (root was never intended) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correction from the maintainer: /docker was always libreportal:libreportal; root:root only ever appeared as an artifact of un-de-sudo'd sudo commands, not by design. reconcileDockerOwnership now always assigns the control plane to the manager user regardless of mode (was wrongly root:root for rooted). The deeper implication — that the de-sudo helpers' rooted=sudo path also re-creates root-owned files — is being confirmed before realigning. Co-Authored-By: Claude Opus 4.7 Signed-off-by: librelad --- scripts/function/permission/libreportal_folders.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/function/permission/libreportal_folders.sh b/scripts/function/permission/libreportal_folders.sh index 89b01c1..ad8e586 100755 --- a/scripts/function/permission/libreportal_folders.sh +++ b/scripts/function/permission/libreportal_folders.sh @@ -22,8 +22,10 @@ reconcileDockerOwnership() local mode="${1:-$CFG_DOCKER_INSTALL_TYPE}" [[ -d "$docker_dir" ]] || return 0 - local owner="root" - [[ "$mode" == "rootless" ]] && owner="$sudo_user_name" + # The control plane is owned by the MANAGER user in BOTH modes. root:root was + # never the intended model — it only ever showed up as an artifact of + # un-de-sudo'd commands (sudo creating files as root instead of libreportal). + local owner="$sudo_user_name" # Swap ONLY the owner on our own control-plane files; never reset mode bits # (so nothing that validates its permissions gets surprised). The only two