From 9494341bfdaf02c635705b6c5f24cc5344bc7a01 Mon Sep 17 00:00:00 2001 From: Salamandar <6552989+Salamandar@users.noreply.github.com> Date: Tue, 31 Oct 2023 10:02:58 +0100 Subject: [PATCH] Fix restore directory permissions User IDs might change between backup and restore. We need to chown the install_dir when restoring. --- scripts/restore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/restore b/scripts/restore index 0c9dd41..65fbe9a 100755 --- a/scripts/restore +++ b/scripts/restore @@ -16,6 +16,8 @@ source /usr/share/yunohost/helpers ynh_script_progression --message="Restoring the app main directory..." --weight=1 ynh_restore_file --origin_path="$install_dir" +chmod -R o-rwx "$install_dir" +chown -R "$app:www-data" "$install_dir" #================================================= # SPECIFIC RESTORATION