From a71fefa764ab35b68279023117b4f5451d38f8a1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 19 Nov 2021 11:15:09 +0100 Subject: [PATCH] Fix --- 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 55f6106..3a263b8 100644 --- a/scripts/install +++ b/scripts/install @@ -101,7 +101,7 @@ ynh_setup_source --dest_dir=$final_path chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chown -R $app:$app "$final_path" #================================================= # NGINX CONFIGURATION @@ -120,7 +120,7 @@ ynh_script_progression --message="Building $app... (this will take some time and pushd $final_path/programs/server ynh_use_nodejs - ynh_exec_as $app env $ynh_node_load_PATH npm install 2>/dev/null + ynh_exec_as $app env $ynh_node_load_PATH npm install --unsafe-perm 2>/dev/null popd #================================================= diff --git a/scripts/restore b/scripts/restore index 95372e4..f801460 100644 --- a/scripts/restore +++ b/scripts/restore @@ -65,7 +65,7 @@ ynh_restore_file --origin_path="$final_path" chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chown -R $app:$app "$final_path" #================================================= # SPECIFIC RESTORATION diff --git a/scripts/upgrade b/scripts/upgrade index 92452bc..40c2821 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -93,7 +93,7 @@ fi chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chown -R $app:$app "$final_path" #================================================= # NGINX CONFIGURATION @@ -119,7 +119,7 @@ ynh_script_progression --message="Building $app... (this will take some time and pushd $final_path/programs/server ynh_use_nodejs - ynh_exec_as $app env $ynh_node_load_PATH npm install 2>/dev/null + ynh_exec_as $app env $ynh_node_load_PATH npm install --unsafe-perm 2>/dev/null popd #=================================================