From 3c0a75cbeb22e604222305c7d8fb6d640bb780f9 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 1 Feb 2019 08:36:45 +0100 Subject: [PATCH 1/3] Fix user create folder --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 444ea45..a64fa62 100644 --- a/scripts/install +++ b/scripts/install @@ -146,7 +146,7 @@ ynh_add_nginx_config #================================================= # Create a system user -ynh_system_user_create $app +ynh_system_user_create $app $final_path #================================================= # PHP-FPM CONFIGURATION From dee0e2c799c2138ca91fe918c26e4a73b7616616 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 1 Feb 2019 08:43:05 +0100 Subject: [PATCH 2/3] 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 a64fa62..bff128e 100644 --- a/scripts/install +++ b/scripts/install @@ -146,7 +146,7 @@ ynh_add_nginx_config #================================================= # Create a system user -ynh_system_user_create $app $final_path +ynh_system_user_create "$app" "$final_path" #================================================= # PHP-FPM CONFIGURATION diff --git a/scripts/restore b/scripts/restore index 2216b13..3734919 100644 --- a/scripts/restore +++ b/scripts/restore @@ -69,7 +69,7 @@ ynh_psql_execute_file_as_root ./db.sql "$db_name" #================================================= # 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 cd3c8ab..2f42e4a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -98,7 +98,7 @@ ynh_install_nodejs 10 #================================================= # Create a dedicated user (if not existing) -ynh_system_user_create $app +ynh_system_user_create "$app" "$final_path" #================================================= # PHP-FPM CONFIGURATION From f154ae89458b0327012a1ff7453781ddbbe4940b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 1 Feb 2019 08:55:16 +0100 Subject: [PATCH 3/3] Fix chown --- scripts/install | 4 ++-- scripts/restore | 2 +- scripts/upgrade | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index bff128e..c45ea91 100644 --- a/scripts/install +++ b/scripts/install @@ -172,7 +172,7 @@ ynh_system_user_create "$app" "$final_path" # ... #================================================= -chown -R $app: $final_path +chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs @@ -270,7 +270,7 @@ ynh_store_file_checksum "$final_path/config.yml" ### 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 3734919..b6fb475 100644 --- a/scripts/restore +++ b/scripts/restore @@ -76,7 +76,7 @@ ynh_system_user_create "$app" "$final_path" #================================================= # Restore permissions on app files -chown -R $app: $final_path +chown -R "$app":"$app" "$final_path" #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 2f42e4a..d304d57 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -113,7 +113,7 @@ ynh_system_user_create "$app" "$final_path" # ... #================================================= -chown -R $app: $final_path +chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs @@ -154,7 +154,7 @@ ynh_add_systemd_config #================================================= # Set permissions on app files -chown -R $app: $final_path +chown -R "$app":"$app" "$final_path" #================================================= # SETUP SSOWAT