Closed pseyfert closed 4 years ago
I set up a CentOS VM recently for another issue, so I finally made some time to look into this.
The minimum steps to reproduce are: unshare --user --map-root-user --mount -- whoami
Indeed, it looks like the control surface for whether user namespaces are permitted is different between distributions:
I think we should:
kernel.unprivileged_userns_clone
and user.max_user_namespaces
, then adjust its error message accordingly.
I failed to run
distri build
in a distri docker container (privileged docker, running on a CentOS7 machine).The build fails with the message
The
sysctl
command does not work in the docker container (sysctl: command not found
) and doesn't work on the host either (sysctl: cannot stat /proc/sys/kernel/unprivileged_userns_clone: No such file or directory
). NB: the suggestion doesn't indicate if this should happen on the host or in the container.Unsure how to address the
sysctl
error message, a web search led me to this to runas root on the host system. After that,
distri build
runs successfully for the packages I tried. So this might be another hint to give.