From 3e21c990b5fbb4b6eed2d3a8efac1e8b8a649ad2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 19 Jul 2021 14:18:46 +0200 Subject: [PATCH] Fix --- scripts/install | 3 ++- scripts/upgrade | 13 +++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index 3ebf579..809194b 100644 --- a/scripts/install +++ b/scripts/install @@ -76,8 +76,9 @@ ynh_setup_source --dest_dir="$final_path" # Set permissions to app files chmod 755 $final_path -chown -R $app:www-data $final_path chmod -R o-rwx $final_path +chown -R $app:www-data $final_path +chmod 775 $final_path/{storage bootstrap/cache public/uploads} #================================================= # NGINX CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index a693c39..2cea4a7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -80,6 +80,13 @@ then ynh_secure_remove --file="$tmpdir" fi +# Set permissions on app files +chmod 755 $final_path +chmod -R o-rwx $final_path +chown -R $app:www-data $final_path +chmod 775 $final_path/{storage bootstrap/cache public/uploads} +chmod 600 $final_path/.env + #================================================= # NGINX CONFIGURATION #================================================= @@ -115,12 +122,6 @@ pushd $final_path && php$phpversion artisan view:clear --no-interaction popd -# Set permissions on app files -chmod 755 $final_path -chown -R $app:www-data $final_path -chmod -R o-rwx $final_path -chmod 600 $final_path/.env - #================================================= # RELOAD NGINX #=================================================