diff --git a/scripts/upgrade b/scripts/upgrade index 7f4c556..aca8f7e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -70,6 +70,10 @@ then ynh_setup_source --dest_dir="$install_dir" --keep=".config/default.yml" fi +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" + #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -135,13 +139,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="All workers started" -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" #================================================= # END OF SCRIPT