This commit is contained in:
Adam Outler
2026-01-03 01:14:10 +00:00
parent 19cc5b0406
commit 348002c3ab
5 changed files with 131 additions and 32 deletions

View File

@@ -29,4 +29,22 @@ Add the required capabilities to your container:
Docker Compose setup can be complex. We recommend starting with the default docker-compose.yml as a base and modifying it incrementally.
For detailed Docker Compose configuration guidance, see: [DOCKER_COMPOSE.md](https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md)
For detailed Docker Compose configuration guidance, see: [DOCKER_COMPOSE.md](https://github.com/jokob-sk/NetAlertX/blob/main/docs/DOCKER_COMPOSE.md)
## CAP_CHOWN required when cap_drop: [ALL]
When you start NetAlertX with `cap_drop: [ALL]`, the container loses `CAP_CHOWN`. The root priming step needs `CAP_CHOWN` to adjust ownership of `/data` and `/tmp` before dropping privileges to `PUID:PGID`. Without it, startup fails with a fatal `failed to chown` message and exits.
To fix:
- Add `CHOWN` back in `cap_add` when you also set `cap_drop: [ALL]`:
```yaml
cap_drop:
- ALL
cap_add:
- CHOWN
```
- Or pre-chown the mounted host paths to your target `PUID:PGID` so the priming step does not need the capability.
If you harden capabilities further, expect priming to fail until you restore the minimum set needed for ownership changes.