From 27155e88eebc0543caae0701718a05308afdc70a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 9 Apr 2021 23:44:11 +0200 Subject: [PATCH] Fix --- scripts/install | 12 ++++-------- scripts/restore | 11 ++++------- scripts/upgrade | 9 +++------ 3 files changed, 11 insertions(+), 21 deletions(-) diff --git a/scripts/install b/scripts/install index 9a2ae63..7fa92b0 100755 --- a/scripts/install +++ b/scripts/install @@ -113,14 +113,10 @@ chmod 644 "/etc/cron.d/$app" # SECURE FILES AND DIRECTORIES #================================================= -# # Set permissions to app files -# chown -R $app:$app $final_path -# chmod 600 $final_path/.env - -chown -R $app: $final_path -chown -R $app:www-data $final_path/writable -chown -R $app:www-data $final_path/public/media -chmod 640 $final_path/.env +# Set permissions to app files +chown -R $app:$app $final_path +#chmod o-rwx $final_path +chmod 600 $final_path/.env #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index 63dec2e..72bfb17 100755 --- a/scripts/restore +++ b/scripts/restore @@ -71,13 +71,10 @@ ynh_restore_file --origin_path="$final_path" # RESTORE USER RIGHTS #================================================= -# # Set permissions to app files -# chown -R $app:$app $final_path -# chmod 600 $final_path/.env - -chown -R root:root $final_path -chown -R www-data:www-data $final_path/writable -chown -R www-data:www-data $final_path/public/media +# Set permissions to app files +chown -R $app:$app $final_path +#chmod o-rwx $final_path +chmod 600 $final_path/.env #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index add9025..9c9e238 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -107,13 +107,10 @@ ynh_add_fpm_config --package="$extra_php_dependencies" # SECURE FILES AND DIRECTORIES #================================================= -# # Set permissions to app files -# chown -R $app:$app $final_path -# chmod 600 $final_path/.env - +# Set permissions to app files chown -R $app:$app $final_path -chown -R www-data:www-data $final_path/writable -chown -R www-data:www-data $final_path/public/media +#chmod o-rwx $final_path +chmod 600 $final_path/.env #================================================= # RELOAD NGINX