From a2020f7f440496674c353a2bc1dc6744c03da72c Mon Sep 17 00:00:00 2001 From: Jules Bertholet Date: Wed, 31 Mar 2021 11:02:15 -0400 Subject: [PATCH] Tweak permissions --- scripts/install | 3 +-- scripts/restore | 3 +-- scripts/upgrade | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index d1bf523..71b539d 100755 --- a/scripts/install +++ b/scripts/install @@ -190,8 +190,7 @@ systemctl daemon-reload --quiet #================================================= # Set permissions to app files chown -R root:$app $final_path -chmod -R o-rwx $final_path -chmod -R g-w $final_path +chmod -R g=u,g-w,o-rwx $final_path setfacl -n -R -m user:www-data:rx -m default:user:www-data:rx $final_path setfacl -n -R -m user:www-data:- -m default:user:www-data:- $final_path/envs diff --git a/scripts/restore b/scripts/restore index abb0f9a..eeaf8c8 100755 --- a/scripts/restore +++ b/scripts/restore @@ -84,8 +84,7 @@ ynh_install_app_dependencies $pkg_dependencies #================================================= # Restore permissions on app files chown -R root:$app $final_path -chmod -R o-rwx $final_path -chmod -R g-w $final_path +chmod -R g=u,g-w,o-rwx $final_path setfacl -n -R -m user:www-data:rx -m default:user:www-data:rx $final_path setfacl -n -R -m user:www-data:- -m default:user:www-data:- $final_path/envs chown -R $app:$app $datadir diff --git a/scripts/upgrade b/scripts/upgrade index bf442ab..b343b24 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -144,8 +144,7 @@ systemctl daemon-reload --quiet # Set permissions on app files chown -R root:$app $final_path -chmod -R o-rwx $final_path -chmod -R g-w $final_path +chmod -R g=u,g-w,o-rwx $final_path setfacl -n -R -m user:www-data:rx -m default:user:www-data:rx $final_path setfacl -n -R -m user:www-data:- -m default:user:www-data:- $final_path/envs chown -R $app:$app $datadir