Commit 137b3dc
fix(caddy): restore SELinux context on /usr/local/bin/caddy
The Caddy binary is downloaded to a mktemp file under /tmp (tmp_t
context) and then moved to /usr/local/bin/caddy. The move preserves
the source label, so systemd refused to exec the binary with status
203/EXEC and "Permission denied" on SELinux-enforcing hosts even
though the file is mode 755.
Switch from `mv` to `install` (which writes a new inode under the
destination's context) and add an explicit `restorecon` for belt-
and-braces. No-op when SELinux is disabled or restorecon is missing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent cd08a45 commit 137b3dc
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
| |||
0 commit comments