From 2dcf735431f1d08435096ca3ee5600668bd2dd4f Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sun, 8 Nov 2020 15:29:10 +0100 Subject: [PATCH] Change ownership to $app --- scripts/install | 7 +++---- scripts/restore | 9 ++++----- scripts/upgrade | 7 +++---- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/scripts/install b/scripts/install index 03a45a3..bbbfee3 100755 --- a/scripts/install +++ b/scripts/install @@ -147,10 +147,9 @@ ynh_add_systemd_config ### that really need such authorization. # Set permissions to app files -chown -R root: $final_path -#Both folder and database file must be own by app user for domoticz to work, other files are owned by root -chown $app: $final_path -chown $app: $final_path/domoticz.db +#chown -R root: $final_path +#Both folder and database file must be own by app user for domoticz to work and allow internal upgrade +chown -R $app: $final_path #================================================= # SETUP LOGROTATE diff --git a/scripts/restore b/scripts/restore index 19f875b..190455c 100755 --- a/scripts/restore +++ b/scripts/restore @@ -82,11 +82,10 @@ ynh_restore_file --origin_path="/etc/sudoers.d/$app" # RESTORE USER RIGHTS #================================================= -# Restore permissions on app files -chown -R root: $final_path -#Both folder and database file must be own by app user for domoticz to work, other files are owned by root -chown $app: $final_path -chown $app: $final_path/domoticz.db +# Set permissions to app files +#chown -R root: $final_path +#Both folder and database file must be own by app user for domoticz to work and allow internal upgrade +chown -R $app: $final_path #================================================= # SPECIFIC RESTORATION diff --git a/scripts/upgrade b/scripts/upgrade index 2442389..17858a2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -212,10 +212,9 @@ ynh_add_systemd_config #================================================= # Set permissions to app files -chown -R root: $final_path -#Both folder and database file must be own by app user for domoticz to work, other files are owned by root -chown $app: $final_path -chown $app: $final_path/domoticz.db +#chown -R root: $final_path +#Both folder and database file must be own by app user for domoticz to work and allow internal upgrade +chown -R $app: $final_path #================================================= # SETUP LOGROTATE