diff --git a/hooks/post_user_create b/hooks/post_user_create index c6717ef..123de57 100644 --- a/hooks/post_user_create +++ b/hooks/post_user_create @@ -3,4 +3,4 @@ user="$1" app="$(basename $0 | cut -d- -f 2-)" # Extract the app name from the script name, which is supposed to be something like "50-app_id" -setfacl --modify g:$app:rwx /home/$user +setfacl --recursive --modify g:$app:rwX,d:g:$app:rwX /home/$user diff --git a/scripts/install b/scripts/install index a4ef70a..495404c 100755 --- a/scripts/install +++ b/scripts/install @@ -155,7 +155,7 @@ then create_external_storage "/home/\$user" "Home" # Iterate over users to extend their home folder permissions for u in $(ynh_user_list); do - setfacl --modify g:$app:rwx "/home/$u" || true + setfacl --recursive --modify g:$app:rwX,d:g:$app:rwX "/home/$u" || true done fi diff --git a/scripts/remove b/scripts/remove index 4bf6421..7d4af58 100755 --- a/scripts/remove +++ b/scripts/remove @@ -37,7 +37,7 @@ ynh_secure_remove --file="/etc/cron.d/$app" for path in /home/*; do # Clean ACL in every directories in /home, except those which start with 'yunohost.' [[ ! $path == /home/yunohost.* ]] \ - && setfacl --remove g:$app -- "$path" 2>&1 + && setfacl --recursive --remove g:$app,d:g:$app -- "$path" 2>&1 done #================================================= diff --git a/scripts/restore b/scripts/restore index d954430..cd6bdf3 100755 --- a/scripts/restore +++ b/scripts/restore @@ -93,8 +93,7 @@ chmod 750 $install_dir # Iterate over users to extend their home folder permissions - for the external # storage plugin usage - and create relevant Nextcloud directories for u in $(ynh_user_list); do - mkdir -p "$data_dir/$u" - setfacl --modify g:$app:rwx "/home/$u" || true + setfacl --recursive --modify g:$app:rwX,d:g:$app:rwX "/home/$u" || true done #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 5313109..62d36d1 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -311,7 +311,7 @@ then || create_external_storage "/home/\$user" "Home" # Iterate over users to extend their home folder permissions for u in $(ynh_user_list); do - setfacl --modify g:$app:rwx "/home/$u" || true + setfacl --recursive --modify g:$app:rwX,d:g:$app:rwX "/home/$u" || true done fi