fix(deploy): provision the certs dir traversable by the nonroot gateway #238
Reference in New Issue
Block a user
Delete Branch "fix/ansible-certs-dir-traversable"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root-cause fix for the prod gateway crash-loop hit during the v1.14.0 deploy.
The Ansible base-directory loop created
/opt/scrabble/certsat 0750 (deploy:deploy), like config/dumps/images. The gateway/backend run as the distroless nonroot UID 65532 (not the deploy user), so the container can't traverse a 0750 certs dir →mtls: load server keypair: ... permission denied→ crash-loop.Latent: a long-running container holds the keypair in memory and never re-reads the file, so it only bites on a container restart. A hoster maintenance reboot restarted the gateway and exposed it (the files were 0644 all along — the memory rule — but the dir blocked traversal).
Splits
certsout of the 0750 loop → 0755 (traversable). Keys stay 0644 by design; the host is single-tenant + SSH-access-controlled. The live prod host was already hand-fixed (chmod 0755); this keeps the next provisioning run from re-tightening it.No app code; Ansible-only (applies on the next manual provisioning run).