diff --git a/scripts/_common.sh b/scripts/_common.sh index 9593a96..a06e0b7 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -148,11 +148,13 @@ set_permissions() { chmod 700 $code_dir/update_synapse_for_appservice.sh chmod 700 $code_dir/set_admin_user.sh - find $data_dir \( \! -perm -o= \ - -o \! -user $app \ - -o \! -group $app \) \ - -exec chown $app:$app {} \; \ - -exec chmod o= {} \; + if [ "${1:-}" == data ]; then + find $data_dir \( \! -perm -o= \ + -o \! -user $app \ + -o \! -group $app \) \ + -exec chown $app:$app {} \; \ + -exec chmod o= {} \; + fi chown $app:$app -R /etc/matrix-$app chmod u=rwX,g=rX,o= -R /etc/matrix-$app diff --git a/scripts/install b/scripts/install index 3e4a44b..2d6523d 100644 --- a/scripts/install +++ b/scripts/install @@ -274,7 +274,7 @@ ynh_replace_string __DOMAIN__ $domain ../hooks/post_cert_update #================================================= ynh_script_progression --message="Protecting directories..." --weight=3 -set_permissions +set_permissions data #================================================= # ADVERTISE SERVICE IN ADMIN PANEL diff --git a/scripts/restore b/scripts/restore index cd8ca47..bd41f6f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -113,7 +113,7 @@ ynh_use_logrotate --logfile /var/log/matrix-$app #================================================= ynh_script_progression --message="Protecting directories..." --weight=3 -set_permissions +set_permissions data #================================================= # RELOAD NGINX, SYNAPSE AND COTURN diff --git a/scripts/upgrade b/scripts/upgrade index dfaee25..b24e6e5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -498,7 +498,7 @@ fi #================================================= ynh_script_progression --message="Protecting directories... (note that it could take a long time depending of your install size)" --weight=3 -set_permissions +set_permissions data #================================================= # UPDATE HOOKS