From 59775718f396ffec52bce2c9ac2d3614e810c8ea Mon Sep 17 00:00:00 2001 From: type-two Date: Thu, 30 Jul 2026 11:31:12 +1000 Subject: [PATCH] =?UTF-8?q?fix:=20chmod=20ais=20snapshot=20644=20=E2=80=94?= =?UTF-8?q?=20mkstemp's=200600=20made=20nginx=20403=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- ais_bridge.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ais_bridge.py b/ais_bridge.py index c4fb781..e690a51 100644 --- a/ais_bridge.py +++ b/ais_bridge.py @@ -113,6 +113,7 @@ def writer(out_path): with os.fdopen(fd, "w") as f: f.write(body) os.replace(tmp, out_path) # atomic — readers never see a torn file + os.chmod(out_path, 0o644) # mkstemp births 0600 — nginx (other uid) must read it with open(os.path.join(jobs, "godsigh-ais.status"), "w") as f: f.write(json.dumps({"ts": int(now), "ships": len(rows), "msgs": stats["msgs"]})) print(f"[ais] {len(rows)} ships · {stats['msgs']} msgs", flush=True)