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 #=================================================