From 03053cf8c6765351d3fdcd5e3250d64e0d142c15 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 10 Apr 2021 23:45:42 +0200 Subject: [PATCH] Apply example_ynh --- scripts/install | 3 +++ scripts/upgrade | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/scripts/install b/scripts/install index c2b3ac1..2e130d0 100644 --- a/scripts/install +++ b/scripts/install @@ -196,6 +196,9 @@ ynh_script_progression --message="Storing the config file checksum..." # Calculate and store the config file checksum into the app settings ynh_store_file_checksum --file="$final_path/$app/sites/default/settings.php" +chmod 400 "$final_path/$app/sites/default/settings.php" +chown $app:$app "$final_path/$app/sites/default/settings.php" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 6bb9013..2494968 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -135,6 +135,10 @@ ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app variable-set --exact update-alternatives --set php /usr/bin/php${YNH_DEFAULT_PHP_VERSION} +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R root:$app "$final_path" + #================================================= # STORE THE CONFIG FILE CHECKSUM #=================================================