From 6f5aece5e0eb18f399ecc538447f691de70db349 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 29 Apr 2021 22:36:48 +0200 Subject: [PATCH] Protect final_path --- scripts/install | 2 ++ scripts/restore | 2 ++ scripts/upgrade | 2 ++ 3 files changed, 6 insertions(+) diff --git a/scripts/install b/scripts/install index 37389a7..b8b1c11 100755 --- a/scripts/install +++ b/scripts/install @@ -119,6 +119,8 @@ ynh_script_progression --message="Securing files and directories..." # Set permissions to app files chown -R $app: $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index 5b97f86..b9bf1cf 100755 --- a/scripts/restore +++ b/scripts/restore @@ -72,6 +72,8 @@ ynh_script_progression --message="Restoring user rights..." # Restore permissions on app files chown -R $app:$app $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index dc54adc..5417de6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -170,6 +170,8 @@ ynh_script_progression --message="Securing files and directories..." # Set permissions on app files chown -R $app: $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" #================================================= # RELOAD NGINX