From 1c8a1ba2c8ee6ff20fd23fe4c788617fae305846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Richter?= <2268851+x3rAx@users.noreply.github.com> Date: Wed, 14 Aug 2024 00:27:37 +0200 Subject: [PATCH 1/3] Fix removing ACL permissions on uninstall According to `man setfacl`, for the `--remove` option "[o]nly ACL entries without the perms field are accepted as parameters". --- scripts/remove | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index c39ac68..664e4a0 100755 --- a/scripts/remove +++ b/scripts/remove @@ -30,7 +30,7 @@ ynh_secure_remove --file="/etc/cron.d/$app" for i in $(ls /home); do # Clean ACL in every directories in /home, except those which start with 'yunohost.' [[ ! $i == yunohost.* ]] \ - && setfacl --remove g:$app:rwx 2>&1 + && setfacl --remove g:$app 2>&1 done #================================================= From aae9736b4337cf6b2b09c0162f0f6f35621849c4 Mon Sep 17 00:00:00 2001 From: ^x3ro Date: Wed, 14 Aug 2024 00:56:32 +0200 Subject: [PATCH 2/3] Fix: Add missing `file` argument to `setfacl` --- scripts/remove | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index 664e4a0..78490fc 100755 --- a/scripts/remove +++ b/scripts/remove @@ -30,7 +30,7 @@ ynh_secure_remove --file="/etc/cron.d/$app" for i in $(ls /home); do # Clean ACL in every directories in /home, except those which start with 'yunohost.' [[ ! $i == yunohost.* ]] \ - && setfacl --remove g:$app 2>&1 + && setfacl --remove g:$app -- "$i" 2>&1 done #================================================= From abfb04de912770b4ac07ca3dc5a453294c5c3df1 Mon Sep 17 00:00:00 2001 From: ^x3ro Date: Wed, 14 Aug 2024 01:15:44 +0200 Subject: [PATCH 3/3] Fix: Use absolute path for removing ACL permissions --- scripts/remove | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/remove b/scripts/remove index 78490fc..1682dfc 100755 --- a/scripts/remove +++ b/scripts/remove @@ -27,10 +27,10 @@ ynh_remove_fail2ban_config ynh_secure_remove --file="/etc/cron.d/$app" # Cleaning ACL in home directories -for i in $(ls /home); do +for path in /home/*; do # Clean ACL in every directories in /home, except those which start with 'yunohost.' - [[ ! $i == yunohost.* ]] \ - && setfacl --remove g:$app -- "$i" 2>&1 + [[ ! $path == /home/yunohost.* ]] \ + && setfacl --remove g:$app -- "$path" 2>&1 done #=================================================