From 053b6388e8976af8c5644b2359b92a9d473cff8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 2 Sep 2024 21:30:21 +0200 Subject: [PATCH] Fix permissions --- scripts/_common.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index eb2fd9f..67d58c2 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -47,8 +47,10 @@ install_source() { } set_permission() { + chown "$app:$app" "$install_dir" + chmod u=rwx,g=rx,o= "$install_dir" chown -R "$app:$app" "$install_dir"/{conf,ccnet} - chmod -R u+rwX,g-w,o= "$install_dir"/{conf,ccnet} + chmod -R u+rwX,g+rX-w,o= "$install_dir"/{conf,ccnet} chown -R "$app:$app" "$install_dir"/seafile_image/opt/seafile chmod -R u+rwX,g-w,o= "$install_dir"/seafile_image/opt/seafile @@ -67,6 +69,7 @@ set_permission() { test -e "$install_dir"/seahub-data && setfacl -m user:www-data:rX "$data_dir" test -e "$install_dir"/seahub-data && setfacl -R -m user:www-data:rX "$data_dir"/seahub-data + chmod u=rwx,g=rx,o= "$data_dir" find "$data_dir" \( \! -perm -o= \ -o \! -user "$app" \ -o \! -group "$app" \) \