From 6c1d892f00e9dc5133ea31716beda68d508664a4 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 17 May 2021 22:07:08 +0200 Subject: [PATCH] Fix rights on $final_path/inc/config.php require(/var/www/dotclear2/inc/config.php): failed to open stream --- scripts/change_url | 3 +++ scripts/install | 3 +++ scripts/upgrade | 3 +++ 3 files changed, 9 insertions(+) diff --git a/scripts/change_url b/scripts/change_url index d53de44..c81dd88 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -126,6 +126,9 @@ ynh_replace_string --match_string="'DC_ADMIN_URL', 'https://$old_domain$old_admi ynh_store_file_checksum --file="$php_config" +chmod 400 "$php_config" +chown $app:$app "$php_config" + #================================================= # GENERIC FINALISATION #================================================= diff --git a/scripts/install b/scripts/install index 4b585f7..6cef892 100755 --- a/scripts/install +++ b/scripts/install @@ -140,6 +140,9 @@ EOF ynh_store_file_checksum --file=$php_config +chmod 400 "$php_config" +chown $app:$app "$php_config" + #================================================= # SETUP APPLICATION WITH CURL #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index dc48fef..091448a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -168,6 +168,9 @@ EOF # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum --file=$php_config +chmod 400 "$php_config" +chown $app:$app "$php_config" + #================================================= # UPDATING DATABASE #=================================================