mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
Avoid to set whole permission on data dir when change-url and config
This commit is contained in:
parent
f7a9ef38fc
commit
42b6143104
4 changed files with 10 additions and 8 deletions
|
@ -148,11 +148,13 @@ set_permissions() {
|
|||
chmod 700 $code_dir/update_synapse_for_appservice.sh
|
||||
chmod 700 $code_dir/set_admin_user.sh
|
||||
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue