I have mounted a CIFs share in my proxmox host that presents files as owned by foo:users. Foo's id is 1002.
I want to present this share to a unprivileged container, I'm assuming using a bind mount.
The user in the container has id 1000:1000, and creates files like so.
I have added the following to my config:
=====
unprivileged: 1
mp0: /mnt/container-data/test-ct,mp=/appdata
#map ids to NAS proxmox sid/gid
lxc.id_map = u 0 100000 1000
lxc.id_map = g 0 100000 1000
lxc.id_map = u 1000 1002 1
lxc.id_map = g 1000 100 1
lxc.id_map = u 1001 101001 64530
lxc.id_map = g 1001 101001 64530
=====
and the following to subuid and subgid resp:
subuid: root:1002:1
subgid: root:100:1
This appears to do the job, and when entering the container using pct I can read and write to the mounted directory perfectly.
However I can no longer SSH, and can only enter via the host. Something has broken. Removing the 6 mappings brings it back again.
Is there something obvious I'm missing? Is the above approach the correct one?
I want to present this share to a unprivileged container, I'm assuming using a bind mount.
The user in the container has id 1000:1000, and creates files like so.
I have added the following to my config:
=====
unprivileged: 1
mp0: /mnt/container-data/test-ct,mp=/appdata
#map ids to NAS proxmox sid/gid
lxc.id_map = u 0 100000 1000
lxc.id_map = g 0 100000 1000
lxc.id_map = u 1000 1002 1
lxc.id_map = g 1000 100 1
lxc.id_map = u 1001 101001 64530
lxc.id_map = g 1001 101001 64530
=====
and the following to subuid and subgid resp:
subuid: root:1002:1
subgid: root:100:1
This appears to do the job, and when entering the container using pct I can read and write to the mounted directory perfectly.
However I can no longer SSH, and can only enter via the host. Something has broken. Removing the 6 mappings brings it back again.
Is there something obvious I'm missing? Is the above approach the correct one?