Skip to content

How runc write uid_map/gid_map and makes /proc/sys/net/ipv4/ping_group_range works ? #4366

Answered by cyphar
comicfans asked this question in Q&A
Discussion options

You must be logged in to vote
  1. Your regular docker run is actually spawning a container without user namespaces (docker run is run as an unprivileged user but the Docker daemon runs as root). Docker also sets up the network namespace to allow for unprivileged pings automatically.
  2. linux-sandbox is using unprivileged user namespaces (rootless containers), which means that only one user is mapped. You cannot change /proc/self/uid_map or /proc/self/gid_map after they have been set, and in this case the container process is unprivileged so it wouldn't be able to change the maps to anything else even if it wanted to.

The simplest solution is probably to just run linux-sandbox as root. User namespaces result in more secure …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@comicfans
Comment options

@comicfans
Comment options

@cyphar
Comment options

@comicfans
Comment options

Answer selected by comicfans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants