1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00
This commit is contained in:
Kayou 2024-09-03 15:00:37 +02:00 committed by GitHub
commit c813633bdd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 5 additions and 6 deletions

View file

@ -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

View file

@ -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

View file

@ -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
#=================================================

View file

@ -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
#=================================================

View file

@ -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