Commit 400d0ff
The droplet's podman 5.6.2 rejects `--tmpfs=...:uid=1001,gid=1001` outright
(`Error: unknown mount option "uid=1001": invalid mount option`; and there is no
working `--mount type=tmpfs,tmpfs-uid=` either). This fail-closed #333's
pre-cutover BOOT_CHECK gate on the first push-to-main deploy. build+test were
green because nothing there runs podman -- and test_tmpfs_options_pinned even
pinned the rejected string, so the test agreed with the workflow but not with
reality. The gate aborted before cutover, so prod kept serving the pre-#333
image (no outage; the gate did its job).
Restore uid1001 ownership the way podman 5.6.2 supports:
- mount /home/fingpt and /app/staticfiles at mode=0755 (owner-writable once
chowned, not the tmpfs-default world-writable 1777), on both the gate and the
ExecStart podman run (flag parity preserved);
- chown both dirs to fingpt in entrypoint.sh root-init, before the setpriv drop,
while PID1 still holds CAP_CHOWN. Non-recursive is sufficient: only the tmpfs
mount point comes up root-owned; tmpcopyup content (baked ~/.cache/fontconfig)
is already fingpt-owned. This is behaviorally identical to the intended-but-
rejected uid=1001 tmpfs.
Correct the invariant that hid the bug: test_tmpfs_options_pinned now asserts no
uid=/gid= on the tmpfs (+ mode=0755), and a new
test_entrypoint_chowns_read_only_tmpfs_dirs pins the root-init chown ordering.
Verified on the droplet against the real #333 image: podman accepts the new
flags, root-init chown yields `drwxr-xr-x 1001 1001`, and a setpriv-dropped
uid1001 writes both dirs successfully.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 965d214 commit 400d0ff
3 files changed
Lines changed: 61 additions & 11 deletions
File tree
- .github/workflows
- Main/backend
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
| 290 | + | |
| 291 | + | |
291 | 292 | | |
292 | | - | |
293 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
294 | 300 | | |
295 | 301 | | |
296 | 302 | | |
| |||
307 | 313 | | |
308 | 314 | | |
309 | 315 | | |
310 | | - | |
| 316 | + | |
311 | 317 | | |
312 | 318 | | |
313 | 319 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
35 | 44 | | |
36 | 45 | | |
37 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
129 | 154 | | |
130 | 155 | | |
131 | 156 | | |
| |||
461 | 486 | | |
462 | 487 | | |
463 | 488 | | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
468 | 500 | | |
469 | 501 | | |
470 | | - | |
471 | | - | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
472 | 507 | | |
473 | 508 | | |
474 | 509 | | |
| |||
0 commit comments