diff --git a/scripts/install b/scripts/install index 58c5750..937f27a 100644 --- a/scripts/install +++ b/scripts/install @@ -115,6 +115,10 @@ mkdir -p "$final_path/distbin-db" mkdir -p "$final_path/distbin-db/activities" mkdir -p "$final_path/distbin-db/inbox" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:$app "$final_path" + #================================================= # INSTALLING DISTBIN #================================================= @@ -124,7 +128,7 @@ pushd $final_path ynh_use_nodejs ynh_exec_warn_less sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts ynh_exec_warn_less sudo -u $app $ynh_node_load_PATH $ynh_npm run build - cp package* dist/ + sudo -u $app cp -af package* dist/ popd pushd $final_path/dist diff --git a/scripts/upgrade b/scripts/upgrade index 75fcdf5..dbb4f0e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -125,6 +125,10 @@ if [ -d "$DIRECTORY" ]; then mv "$final_path/db" "$final_path/distbin-db" fi +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:$app "$final_path" + #================================================= # MAKE UPGRADE #================================================= @@ -134,7 +138,7 @@ pushd $final_path ynh_use_nodejs ynh_exec_warn_less sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts ynh_exec_warn_less sudo -u $app $ynh_node_load_PATH $ynh_npm run build - cp package* dist/ + sudo -u $app cp -af package* dist/ popd pushd $final_path/dist