Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Fix permission denied error when updating allowed_nodes

rcourtmanc56155ff6dda
diff --git a/scripts/install-sensor-proxy.sh b/scripts/install-sensor-proxy.sh
index 28860b12b9..bf788f414b 100755
--- a/scripts/install-sensor-proxy.sh
+++ b/scripts/install-sensor-proxy.sh
@@ -120,13 +120,11 @@ update_allowed_nodes() {
}
' "$config_file" > "$tmp_config"
- # Preserve file permissions
+ # Preserve file permissions (but defer ownership change until after all writes)
chmod --reference="$config_file" "$tmp_config" 2>/dev/null || chmod 0644 "$tmp_config"
- chown --reference="$config_file" "$tmp_config" 2>/dev/null || true
else
touch "$tmp_config"
chmod 0644 "$tmp_config"
- chown pulse-sensor-proxy:pulse-sensor-proxy "$tmp_config" 2>/dev/null || true
fi
# Append new allowed_nodes section