I've read every post I can find and this one makes no sense to me. Not new to proxmox or linux but my first experience with unprivileged container mapping.
The problem:
I have mapped the user and group for id 1011 the same on host and guest. The goal is to have user 1011(mfiles) be the owner of all files on an NFS share.
The NFS share is maprooted to that user/group.
The user/group mfiles exists on the host as 1011.
The user/group mfiles exists on the guest as user 1011.
lxc config file has:
lxc.idmap: u 0 100000 1011
lxc.idmap: g 0 100000 1011
lxc.idmap: u 1011 1011 1
lxc.idmap: g 1011 1011 1
lxc.idmap: u 1012 101012 64524
lxc.idmap: g 1012 101012 64524
subuid and subgid have:
root:100000:65536
root:1011:1
Logged into the container as root I can see files there owned by mfiles:mfiles.
When a file is created from the host, it comes out as mfiles:mfiles - Perfect.
But when a file is create from the guest, it comes out as root:mfiles - Not Perfect.
drwxrwxrwx 2 mfiles mfiles 4 Jul 4 00:49 .
drwxr-xr-x 387 mfiles mfiles 388 Jul 3 20:22 ..
-rw-r--r-- 1 root mfiles 0 Jul 4 00:49 file.created.from.container
-rw-r--r-- 1 mfiles mfiles 0 Jul 4 00:49 file.created.from.host
How on earth can the user and group be setup identically and group works but user does not?
I feel that I am missing something obvious but I have tried everything I can think of and can only get it half right.
The problem:
I have mapped the user and group for id 1011 the same on host and guest. The goal is to have user 1011(mfiles) be the owner of all files on an NFS share.
The NFS share is maprooted to that user/group.
The user/group mfiles exists on the host as 1011.
The user/group mfiles exists on the guest as user 1011.
lxc config file has:
lxc.idmap: u 0 100000 1011
lxc.idmap: g 0 100000 1011
lxc.idmap: u 1011 1011 1
lxc.idmap: g 1011 1011 1
lxc.idmap: u 1012 101012 64524
lxc.idmap: g 1012 101012 64524
subuid and subgid have:
root:100000:65536
root:1011:1
Logged into the container as root I can see files there owned by mfiles:mfiles.
When a file is created from the host, it comes out as mfiles:mfiles - Perfect.
But when a file is create from the guest, it comes out as root:mfiles - Not Perfect.
drwxrwxrwx 2 mfiles mfiles 4 Jul 4 00:49 .
drwxr-xr-x 387 mfiles mfiles 388 Jul 3 20:22 ..
-rw-r--r-- 1 root mfiles 0 Jul 4 00:49 file.created.from.container
-rw-r--r-- 1 mfiles mfiles 0 Jul 4 00:49 file.created.from.host
How on earth can the user and group be setup identically and group works but user does not?
I feel that I am missing something obvious but I have tried everything I can think of and can only get it half right.
Last edited: