Making LXC UID mapping modifies container user's home folder ownership - why?

poisonborz

Member
May 8, 2020
25
2
23
55
Like so many here, my usecase is to have a number of containers share some common NFS bind mounts. However, when I do this - the container user's folder is suddenly owned by uid 65534.

I don't understand why - I though UID maps only have an effect outside the container? (=files in the bind mount).

I'm pasting here the config, although it is pretty simple (999->5000) - generated by the known python help utility.

Code:
lxc.idmap: u 0 100000 999
lxc.idmap: g 0 100000 999
lxc.idmap: u 999 999 1
lxc.idmap: g 999 999 1
lxc.idmap: u 1000 101000 4000
lxc.idmap: g 1000 101000 4000
lxc.idmap: u 5000 5000 1
lxc.idmap: g 5000 5000 1
lxc.idmap: u 5001 105001 60535
lxc.idmap: g 5001 105001 60535