Systemd lightweight containers
Systemd lightweight containers
Posted Feb 7, 2013 22:20 UTC (Thu) by nybble41 (subscriber, #55106)In reply to: Systemd lightweight containers by mezcalero
Parent article: Systemd lightweight containers
You make a good point. I think that you would need to map multiple container UIDs to multiple UIDs on the host if you want a filesystem mounted outside the container to keep them separate. IIRC the UID namespace code allows each container UID to map to a different host UID.
Mapping from container to host is always well-defined, but I'm not sure what the kernel does when the reverse translation is one-to-many. Most likely it just picks the first match, so all UID 1000 files would appear to be owned by root. (However, the permissions check should be performed using UID 1000 on the host side, in the filesystem's namespace, regardless of what the processes inside the container see.)
