Commit 999d8e9
fix(newsite): broaden post-validate chown to cover global Coraza logs
The previous fix only pre-created per-site logs, but `caddy validate` (run as
root) also touches globals like /var/log/caddy/coraza-audit.log when it
provisions the WAF module. If that file doesn't yet exist (no prior request
served), validate creates it as root:root and the subsequent reload-as-caddy
fails with "permission denied". Replace the per-site enumeration with a
recursive chown of CADDY_LOG_DIR after validate — matches the pattern
10-caddy.sh already uses post-install and covers any future log file Coraza
or other modules may introduce.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b56696e commit 999d8e9
1 file changed
Lines changed: 6 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
478 | 474 | | |
479 | 475 | | |
480 | 476 | | |
| |||
0 commit comments