From aa115af9c687e6807bd7dcba3bb83cbd8980bbdc Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 14 Mar 2022 23:50:58 +0100 Subject: [PATCH] Fix permissions --- scripts/install | 5 ++++- scripts/restore | 5 ++++- scripts/upgrade | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index b5bfe77..7c6fdac 100644 --- a/scripts/install +++ b/scripts/install @@ -215,7 +215,10 @@ echo "0 0 * * 0 $app cd $final_path/backups && php script.backup.php" > /etc/cro #================================================= # Les fichiers appartiennent à root -chown -R root: $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + # Sauf certains dossiers includes, files et upload chown -R $app $final_path/{includes,files,upload} # Restreint l'accès au dossier de backup diff --git a/scripts/restore b/scripts/restore index 13d199c..93e24dd 100644 --- a/scripts/restore +++ b/scripts/restore @@ -74,7 +74,10 @@ chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" # Les fichiers appartiennent à root -chown -R root: $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + # Sauf les dossiers includes, files et upload chown -R $app $final_path/{includes,files,upload} diff --git a/scripts/upgrade b/scripts/upgrade index d54ad5d..910dd60 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -187,7 +187,10 @@ ynh_add_config --template="../conf/settings.php" --destination="$final_path/incl #================================================= # Les fichiers appartiennent à root -chown -R root: $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + # Sauf certains dossiers includes, install, files et upload chown -R $app $final_path/{includes,install,files,upload} # Restreint l'accès au dossier de backup