From 7231f9e7bae5c6dc0c1d4181d79eaa4f59b8ea2b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 16 May 2021 21:58:24 +0200 Subject: [PATCH] Fix --- scripts/install | 5 +++-- scripts/restore | 5 +++-- scripts/upgrade | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 54ec3fe..830c6fa 100644 --- a/scripts/install +++ b/scripts/install @@ -171,8 +171,9 @@ ynh_add_config --template="../conf/credentials.json" --destination="$final_path/ #================================================= # Set permissions to app files -chown -R $app: $final_path -chmod o-rwx $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" chmod 600 $final_path/credentials.json #================================================= diff --git a/scripts/restore b/scripts/restore index 3da0a65..0b24928 100644 --- a/scripts/restore +++ b/scripts/restore @@ -98,8 +98,9 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name #================================================= # Restore permissions on app files -chown -R $app: $final_path -chmod o-rwx $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" chmod 600 $final_path/credentials.json #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 01a8af1..895752c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -149,8 +149,9 @@ popd || ynh_die #================================================= # Set permissions on app files -chown -R $app: $final_path -chmod o-rwx $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" chmod 600 $final_path/credentials.json #=================================================