From 6ba8b0608c2417b6f583e98c0b5534238a50d6d5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 24 Mar 2021 12:04:53 +0100 Subject: [PATCH] Add permissions --- scripts/install | 3 ++- scripts/restore | 1 + scripts/upgrade | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index aa72600..5322536 100644 --- a/scripts/install +++ b/scripts/install @@ -206,7 +206,8 @@ ynh_add_config --template="../conf/credentials.json" --destination="$final_path/ #================================================= # Set files ownership to etherpad -chown -R $app: $final_path +chown -R $app:$app $final_path +chmod o-rwx $final_path # Restrict access to credentials.json chmod 600 $final_path/credentials.json diff --git a/scripts/restore b/scripts/restore index 7ea3d2f..80e93f4 100644 --- a/scripts/restore +++ b/scripts/restore @@ -136,6 +136,7 @@ ynh_exec_warn_less npm cache clean --force # Restore permissions on app files chown -R $app: $final_path +chmod o-rwx $final_path #================================================= # ADVERTISE SERVICE IN ADMIN PANEL diff --git a/scripts/upgrade b/scripts/upgrade index 979630f..717695a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -348,6 +348,7 @@ fi # Set files ownership to etherpad chown -R $app: $final_path +chmod o-rwx $final_path # Restrict access to credentials.json chmod 600 "$final_path/credentials.json" chown $app -R /var/log/$app/etherpad.log