From 160fc38886f27cf9ffcea11cdb0d74863cb15839 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 24 Mar 2021 19:58:29 +0100 Subject: [PATCH] protect final_path --- scripts/install | 1 + scripts/restore | 1 + scripts/upgrade | 1 + 3 files changed, 3 insertions(+) diff --git a/scripts/install b/scripts/install index 3629704..a049c8c 100644 --- a/scripts/install +++ b/scripts/install @@ -140,6 +140,7 @@ ynh_store_file_checksum --file="$final_path/credentials.json" # Set permissions to app files chown -R $app: $final_path +chmod o-rwx $final_path chmod 600 $final_path/credentials.json #================================================= diff --git a/scripts/restore b/scripts/restore index 4535ce5..970dd1e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -92,6 +92,7 @@ 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 600 $final_path/credentials.json #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 4105b1a..0fb973a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -156,6 +156,7 @@ popd || ynh_die # Set permissions on app files chown -R $app: $final_path +chmod o-rwx $final_path chmod 600 $final_path/credentials.json #=================================================