From 2fb79b57dba05314bcee2d8d68d5658094dd4e31 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 1 Feb 2019 08:42:53 +0100 Subject: [PATCH 1/2] Fix User Path --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 651120e..d980b89 100755 --- a/scripts/install +++ b/scripts/install @@ -173,7 +173,7 @@ ynh_add_nginx_config #================================================= # Create a system user -ynh_system_user_create $app +ynh_system_user_create "$app" "$final_path" #================================================= # PHP-FPM CONFIGURATION diff --git a/scripts/restore b/scripts/restore index f4cb4f9..12c349f 100755 --- a/scripts/restore +++ b/scripts/restore @@ -67,7 +67,7 @@ ynh_mysql_connect_as $db_name $db_pwd $db_name < ./db.sql #================================================= # Create the dedicated user (if not existing) -ynh_system_user_create $app +ynh_system_user_create "$app" "$final_path" #================================================= # RESTORE USER RIGHTS diff --git a/scripts/upgrade b/scripts/upgrade index 417d0fb..18ddb49 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -99,7 +99,7 @@ ynh_add_nginx_config #================================================= # Create a dedicated user (if not existing) -ynh_system_user_create $app +ynh_system_user_create "$app" "$final_path" #================================================= # PHP-FPM CONFIGURATION From b12e47c52a712df9d7d31061bd0336989315f7d5 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 1 Feb 2019 08:54:54 +0100 Subject: [PATCH 2/2] Fix chown --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index d980b89..bca64e6 100755 --- a/scripts/install +++ b/scripts/install @@ -305,7 +305,7 @@ ynh_store_file_checksum "$final_path/config.ini" ### that really need such authorization. # Set permissions to app files -chown -R $app: $final_path +chown -R "$app":"$app" "$final_path" #================================================= # SETUP LOGROTATE diff --git a/scripts/restore b/scripts/restore index 12c349f..a427469 100755 --- a/scripts/restore +++ b/scripts/restore @@ -74,7 +74,7 @@ ynh_system_user_create "$app" "$final_path" #================================================= # Restore permissions on app files -chown -R root: $final_path +chown -R "$app":"$app" "$final_path" #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 18ddb49..ebdca4f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -155,7 +155,7 @@ ynh_add_systemd_config #================================================= # Set permissions on app files -chown -R $app: $final_path +chown -R "$app":"$app" "$final_path" #================================================= # SETUP SSOWAT