From e4eab926886fd3d6bde3005e2e43d7be2b8c40c6 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 7 May 2021 23:28:44 +0200 Subject: [PATCH] Permissions --- scripts/install | 3 ++- scripts/restore | 3 ++- scripts/upgrade | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 235d27a..55ab5a7 100644 --- a/scripts/install +++ b/scripts/install @@ -220,7 +220,8 @@ ynh_store_file_checksum --file="$final_path/config/config.inc.php" #================================================= # Set permissions to app files -chown -R root: "$final_path" +chown -R root:$app "$final_path" +chmod -R o-rwx "$final_path" mkdir -p "$final_path/plugins/enigma/home" chown -R $app: "$final_path/"{temp,logs,plugins/enigma/home} diff --git a/scripts/restore b/scripts/restore index 86386d8..5dd4faf 100644 --- a/scripts/restore +++ b/scripts/restore @@ -68,7 +68,8 @@ ynh_restore_file --origin_path="$final_path" #================================================= # Restore permissions on app files -chown -R root: "$final_path" +chown -R root:$app "$final_path" +chmod -R o-rwx "$final_path" mkdir -p "$final_path/plugins/enigma/home" chown -R $app: "$final_path/"{temp,logs,plugins/enigma/home} diff --git a/scripts/upgrade b/scripts/upgrade index a5f3381..319217f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -270,7 +270,8 @@ fi #================================================= # Set permissions to app files -chown -R root: "$final_path" +chown -R root:$app "$final_path" +chmod -R o-rwx "$final_path" mkdir -p "$final_path/plugins/enigma/home" chown -R $app: "$final_path/"{temp,logs,plugins/enigma/home}