-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
newuidmap: write to uid_map failed: Operation not permitted #1454
Comments
What's in ~/.config/lxc/default.conf? |
What is striking is that this occurred after |
@brauner he's using a single map for all containers though so that doesn't matter. |
Right, the second option is ruled out (sort of) by the fact that |
As requested:
Tried to destroy one container to "make room" for the creation of another, but also got an error:
The contents of
Modified
Did something similar to Some more info:
|
Does lxc-start of the existing containers work fine? Is there anything interesting in syslog? Exactly which version of lxc is this? And has your uidmap package recently updated? Your kernel? Does 'lxc-usernsexec' still work for you? |
I was using 4.10.1_1 when this error occurred and restarted with 4.9.13_1. I'm not sure if containers were working with the former version, but they were working with the latter. Not anymore. Not possible do
Didn't find anything relevant in syslog/messages/dmesg... Regarding lxc packages, I have these installed:
All these packages were updated in January the 24th, and containers were running two days ago.
In
|
Some more info.
The contents of debug.out
|
Just to understand this a bit more, the problem is that the software fails to change the owner of the newly created directory from So, I'll get no other help on this? I've worked with FreeBSD's jails before (and still now) and never had a glitch. Looks like lxc containers need some polishing. |
Can you please run
and attach or copy the contents of |
Hi brauner, thanks for the help. By "your user" do you mean my lxc user? If so these were the steps:
Also tried it starting from an ordinary user (myself) and the output is the same. |
Yeah, I meant your user on the host you're trying to start containers with. Hm, I'm getting suspicious. Can you show the output of |
It outputs nothing, just modifies the prompt.
|
That should mean it works: |
What system are you on (distro, kernel version etc.)? |
Please show the contents of /etc/subuid and /etc/subgid. The fact that 'lxc-usernsexec' fails on setgid is odd. |
Also what does /proc/self/setgroups show? |
Also, what are the permissions on |
Distro: Void Linux
|
|
I'm using shadow-4.4_1. |
@lpvm, can you try setting |
Doesn't work yet.
Exited the shell, ssh again, cgm movepid ..., but:
|
Do the same for |
Works! Finally! Thank you for all your help! So, this was a problem of the |
I think so, yes. |
Can be closed, I assume. :) |
Hi! May I have your help please? When trying to create unprivileged container lxc I get this error: lxc-create -t ubuntu -n ubuntu9 The configuration file contains the following informations : GNU nano 3.2 /home/hethsron/.config/lxc/default.conf Modifié lxc.idmap = u 0 100000 65536 lxc.net.0.type = veth lxc.mount.auto = proc:mixed sys:ro cgroup:mixed /var/lib/lxc/ = ~/.local/share/lxc |
I tried everything according the documentation i found online (linuxcontainers.org) but i didn't succeed |
On Fri, Dec 28, 2018 at 12:17:50AM -0800, Hethsron wrote:
Hi! May I have your help please?
When trying to create unprivileged container lxc I get this error:
lxc-create -t ubuntu -n ubuntu9
Since you're running this unprivileged, can you try with the download
template?
lxc-create -t download -n ubuntu9 -- -d ubuntu -r bionic -a amd64
… lxc-create: ubuntu9: conf.c: chown_mapped_root: 3279 lxc-usernsexec failed: No such file or directory - Failed to open tt
lxc-create: ubuntu9: tools/lxc_create.c: main: 327 Failed to create container ubuntu9
The configuration file contains the following informations :
GNU nano 3.2 /home/hethsron/.config/lxc/default.conf Modifié
lxc.idmap = u 0 100000 65536
lxc.idmap = g 0 100000 65536
lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
lxc.net.0.flags = up
lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx
lxc.mount.auto = proc:mixed sys:ro cgroup:mixed
/var/lib/lxc/ = ~/.local/share/lxc
/var/cache/lxc = ~/.cache/lxc
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#1454 (comment)
|
@hallyn I get the same issue, here's more info: /etc/subuid
/etc/subgid
/etc/lxc/default.conf
~/.config/lxc/default.conf
Since I'm on Arch Linux, kernel.unprivileged_userns_clone (sysctl) is 1, and /etc/pam.d/system-login contains the extra line Here's what I get:
The binaries are all available:
When I replace stsch by root in the sub* files, I can create containers as root without problems. |
...and here's the output of the alternate log file with -l DEBUG:
|
I added some debug output to conf.c, before the command is run. It shows that LXC tries to run the following command:
When run manually, the output is:
I'm not experienced enough with the whole process so I have no idea what's happening. |
same here on debian buster; the id ranges are different
I instrumented conf.c like this:
the command it tries here is:
on executing that I get:
|
I described Vagrantfile at #2764 to reproduce |
Has anyone solved this? Im still seeing this problem on debian buster.
I have checked so many suggestions. Reinstalled lxc multiple times, and many other methods. The documentation on lxc website seems like it is missing something with user id setups? It looks like it might be related to this: |
For me what @brauner said here worked #1454 (comment) |
When trying to create the fifth container I get this error:
There was no change in the lxc containers directory:
As can be seen, for the old containers, owner is user 100000, but for
m1
new container it's lxc, although lxc mapping begins at 100000.What should I do?
The text was updated successfully, but these errors were encountered: