From 20ba54c2b6a2c2f6d170f62d1695379219a10156 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 20 Jan 2022 09:09:20 +0100 Subject: [PATCH] Config file requires write access --- scripts/install | 2 +- scripts/restore | 3 +++ scripts/upgrade | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index fdabfeb..71d3b18 100755 --- a/scripts/install +++ b/scripts/install @@ -104,7 +104,7 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="../conf/config.xml.php" --destination="$final_path/config.xml.php" -chmod 400 "$final_path/config.xml.php" +chmod 660 "$final_path/config.xml.php" chown $app:$app "$final_path/config.xml.php" #================================================= diff --git a/scripts/restore b/scripts/restore index be19705..119c23e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -66,6 +66,9 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +chmod 660 "$final_path/config.xml.php" +chown $app:$app "$final_path/config.xml.php" + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 92aa0f9..2091e29 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -86,6 +86,9 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +chmod 660 "$final_path/config.xml.php" +chown $app:$app "$final_path/config.xml.php" + #================================================= # NGINX CONFIGURATION #=================================================