Write Prometheus textfile and Gitea bundles world-readable

node-exporter runs as nobody:65534 inside its container and was
hitting node_textfile_scrape_error 1 on homelab.prom, because the
file was 0600 root:root (mktemp default). Set it to 0644 right
before the atomic mv. Bundle inhaltsidentisch zum Git-Repo, ohne
Secrets (.gitignore-abgedeckt) und nicht sensibler als die
uebrigen /mnt/user/backups/borg/dumps/latest/*.dump-Files, die
ebenfalls 0644 sind. So funktioniert auch der Nearline-Pull-Workflow
ueber SMB (docs/H_DRIVE_NEARLINE_PULL.md).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-27 20:41:07 +02:00
parent 0723eccca1
commit 0ae44bd797
2 changed files with 13 additions and 4 deletions
@@ -104,6 +104,9 @@ PY
fi
} > "$tmp"
# 0644 statt mktemp-default 0600, damit der node-exporter-Textfile-Collector
# (laeuft als nobody:65534) die Datei lesen kann.
chmod 644 "$tmp"
mv "$tmp" "$OUTPUT_FILE"
trap - EXIT