From bebf990e1b6c79afe89b2dce863d75ad12b3a75e Mon Sep 17 00:00:00 2001 From: Yalh Date: Tue, 29 Jan 2019 01:59:40 +0100 Subject: [PATCH] Fix chown --- scripts/install | 6 ++++-- scripts/restore | 4 +++- scripts/upgrade | 5 ++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 85c072a..34f4628 100644 --- a/scripts/install +++ b/scripts/install @@ -170,7 +170,9 @@ ynh_system_user_create $app ynh_install_nodejs 8 -chown -R $app $final_path +chown -R $app:$app $final_path + +chown -R $app:$app /var/log/$app pushd $final_path ynh_use_nodejs @@ -264,7 +266,7 @@ ynh_add_systemd_config ### that really need such authorization. # Set permissions to app files -chown -R root: $final_path +#chown -R root: $final_path #================================================= # SETUP LOGROTATE diff --git a/scripts/restore b/scripts/restore index 7ba7015..5269115 100644 --- a/scripts/restore +++ b/scripts/restore @@ -74,7 +74,9 @@ ynh_system_user_create $app #================================================= # Restore permissions on app files -chown -R root: $final_path +chown -R $app:$app $final_path + +chown -R $app:$app /var/log/$app #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 7a3c5db..45a85a5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -142,7 +142,10 @@ ynh_add_systemd_config #================================================= # Set permissions on app files -chown -R root: $final_path +#chown -R root: $final_path +chown -R $app:$app $final_path + +chown -R $app:$app /var/log/$app #================================================= # SETUP SSOWAT