From 1f930cca746536c1ffa4e8e6c3f785febb3f149e Mon Sep 17 00:00:00 2001 From: librelad Date: Tue, 26 May 2026 17:36:51 +0100 Subject: [PATCH] fix(install): route the early .env tag substitutions through runFileOp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit configFileSetupData runs as the manager (libreportal user) during install, but writes into /libreportal-containers//, which is owned by the container user (dockerinstall) under the three-root layout. The six bare `sed -i` calls in this function were missing the `runFileOp` wrapper that every other in-tree sed-on-app-files call already uses (e.g. setup_dns.sh's WG_DEFAULT_DNS edits), so on first run `sed -i` failed to create its temp file in the live dir: sed: couldn't open temporary file /libreportal-containers/linkding/sedaCaUNU: Permission denied ✗ Error Updated DOMAINSUBNAMEHERE with: bookmark. ! Notice Non-interactive mode: aborting on error. …which aborted the install at step 3 of every per-app config setup. Replace `result=$(sed -i ...)` with `result=$(runFileOp sed -i ...)` so each substitution runs as the owner of the target file (via the bin-install helper). All six call sites use the same pattern — done as a single `replace_all` over the unique prefix. Tags fixed: DOMAINSUBNAMEHERE, APPADDRESSHERE, DOMAINSUBNAME_DATA, TIMEZONE_DATA, EMAILHERE, HOSTIPHERE. Verified live on a fresh install: `libreportal app install linkding` now completes cleanly through all 10 install steps and lands the container. Co-Authored-By: Claude Opus 4.7 Signed-off-by: librelad --- scripts/config/core/config_file_setup_data.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/config/core/config_file_setup_data.sh b/scripts/config/core/config_file_setup_data.sh index dcdbb41..a4bddf1 100755 --- a/scripts/config/core/config_file_setup_data.sh +++ b/scripts/config/core/config_file_setup_data.sh @@ -18,22 +18,22 @@ configSetupFileWithData() local full_file_path="$file_path/$file_name" - result=$(sed -i "s|DOMAINSUBNAMEHERE|$host_setup|g" "$full_file_path") + result=$(runFileOp sed -i "s|DOMAINSUBNAMEHERE|$host_setup|g" "$full_file_path") checkSuccess "Updated DOMAINSUBNAMEHERE with: $host_setup" - result=$(sed -i "s|APPADDRESSHERE|$app_address|g" "$full_file_path") + result=$(runFileOp sed -i "s|APPADDRESSHERE|$app_address|g" "$full_file_path") checkSuccess "Updated APPADDRESSHERE with: $app_address" - result=$(sed -i "s|DOMAINSUBNAME_DATA|$host_setup|g" "$full_file_path") + result=$(runFileOp sed -i "s|DOMAINSUBNAME_DATA|$host_setup|g" "$full_file_path") checkSuccess "Updated DOMAINSUBNAME_DATA with: $host_setup" - result=$(sed -i "s|TIMEZONE_DATA|$CFG_TIMEZONE|g" "$full_file_path") + result=$(runFileOp sed -i "s|TIMEZONE_DATA|$CFG_TIMEZONE|g" "$full_file_path") checkSuccess "Updated TIMEZONE_DATA with: $CFG_TIMEZONE" - result=$(sed -i "s|EMAILHERE|$CFG_TRAEFIK_EMAIL|g" "$full_file_path") + result=$(runFileOp sed -i "s|EMAILHERE|$CFG_TRAEFIK_EMAIL|g" "$full_file_path") checkSuccess "Updated EMAILHERE with: $CFG_TRAEFIK_EMAIL" - result=$(sed -i "s|HOSTIPHERE|$public_ip_v4|g" "$full_file_path") + result=$(runFileOp sed -i "s|HOSTIPHERE|$public_ip_v4|g" "$full_file_path") checkSuccess "Updated HOSTIPHERE with: $public_ip_v4" scanFileForRandomPasswordKeysUsers "$full_file_path"