From b7d95f5e9519535c783bdf0cf07bbd52625a8e99 Mon Sep 17 00:00:00 2001 From: librelad Date: Thu, 28 May 2026 13:46:16 +0100 Subject: [PATCH] fix(webui): app-log removal uses runFileOp rm -f so uninstall can't hang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The uninstall branch of webuiUpdateAppLog removed the per-app WebUI log with a bare `rm`. The log lives in the container data plane and is owned by the container user, often without a write bit. A bare rm (run as root via `sudo init.sh uninstall`) prompts interactively for write-protected files — which hangs an otherwise-unattended deploy: the uninstall phase of a `full` redeploy stopped dead at "rm: remove write-protected regular file '.../frontend/logs/apps/.log'?". Route it through runFileOp rm -f (as the container-data owner, force) to match the neighbouring uninstall_app.sh and the install branch's owner-aware createTouch/runFileWrite helpers. No prompt, correct owner. Signed-off-by: librelad --- scripts/webui/data/utils/webui_app_log.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/webui/data/utils/webui_app_log.sh b/scripts/webui/data/utils/webui_app_log.sh index 921fb63..ed0682f 100755 --- a/scripts/webui/data/utils/webui_app_log.sh +++ b/scripts/webui/data/utils/webui_app_log.sh @@ -22,9 +22,12 @@ webuiUpdateAppLog() echo "=== LibrePortal Installation Started at $(date) ===" | runFileWrite "${log_file}" > /dev/null fi elif [[ "$type" == "uninstall" ]]; then - # Remove app log file + # Remove app log file via runFileOp (as the container-data owner) with + # -f: the log can be write-protected, and a bare rm prompts + # interactively for write-protected files, which hangs an unattended + # deploy (the uninstall phase of a 'full' redeploy). if [ -f "${log_file}" ]; then - local result=$(rm "${log_file}") + local result=$(runFileOp rm -f "${log_file}") checkSuccess "Removed ${app_name}.log" fi fi