podman in production: unpriviliged user vs. --userns=auto
Tipsad 2025-08-26 på Anders Ytterströms webblogg
Köra podman-containers som root är ibland säkrare
Rootless är väl alltid att föredra, väl? Inte riktigt! Köra som root är inte alls dumt, med --userns auto.
It is actually more secure. If you run two containers as a rootless user, they run in the same user namespace so they can attack each other from a User Namespace point of view.
If you run two containers as root with podman run --userns auto, then they run in unigue user namespace and are isolated.
Rootless containers are great for containers run by users on a system, but if you are just running containers on a server, then --userns=auto is a more secure solution.
Jag har kört rootless i många år utan att ifrågasätta det, så det var uppfriskande att få litet perspektiv.