From 5a4bf8a734ee6467559a232cd6522b7f8879b05c Mon Sep 17 00:00:00 2001 From: Kay0u Date: Sat, 18 Apr 2020 00:37:11 +0200 Subject: [PATCH] secure files --- scripts/install | 8 ++++++++ scripts/restore | 3 ++- scripts/upgrade | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 382262e..76c1567 100755 --- a/scripts/install +++ b/scripts/install @@ -162,6 +162,14 @@ ynh_local_curl $installUrl "u_email=$email" "u_firstname=$firstname" "u_name=$la #================================================= # GENERIC FINALIZATION +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= + +# Set permissions to app files +chown -R root: $final_path +chown -R $app $final_path/{public,cache,themes,plugins} + #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/restore b/scripts/restore index d9634df..9c4b1ee 100755 --- a/scripts/restore +++ b/scripts/restore @@ -68,7 +68,8 @@ ynh_system_user_create --username=$app #================================================= # Restore permissions on app files -chown -R $app: $final_path +chown -R root: $final_path +chown -R $app $final_path/{public,cache,themes,plugins} #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index b1fd23b..d5d70da 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -177,7 +177,9 @@ ynh_store_file_checksum --file=$php_config #================================================= # Set permissions on app files -chown -R $app: $final_path +chown -R root: $final_path +chown -R $app $final_path/{public,cache,themes,plugins} + #================================================= # SETUP SSOWAT