Interview Prep/Docker/Security, rootless, Podman and containerd

`operation not permitted` running `ip link add` or `sysctl -w` inside a container.

IntermediateTroubleshootingSecurity, rootless, Podman and containerd
Answer

Likely causes → Missing capability (NET_ADMIN/SYS_ADMIN), or sysctl not namespaced.

Diagnose → docker exec c capsh --print (if available) or grep Cap /proc/1/status.

Fix → --cap-add NET_ADMIN for networking tools; set namespaced sysctls with --sysctl net.ipv4.ip_forward=1; host-wide sysctls must be set on the host.

Prevent → Add only needed capabilities.

All Docker questions Roadmap: Docker & containers

More on Security, rootless, Podman and containerd