diff --git a/scripts/restore b/scripts/restore index 43b7310..a2d80a4 100644 --- a/scripts/restore +++ b/scripts/restore @@ -58,15 +58,16 @@ ynh_restore_file --origin_path="$final_path" ynh_script_progression --message="Recreating the dedicated system user..." --weight=3 # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # RESTORE USER RIGHTS #================================================= # Restore permissions on app files -chown -R root: $final_path -chown -R $app: "${final_path}/.env" "${final_path}/storage/" "${final_path}/bootstrap/" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" #================================================= # RESTORE THE PHP-FPM CONFIGURATION