Howdy...
I just added a disk to proxmox host, making it available to a container through the following configuration (precisely through the 6 lxc.idmap lines):
Please note that user "nxt" comes on the host with UID/GID 1001 as for the container with UID/GID 1000.
This works quite well as I am now able to write on that disk as expected.
The only flaw is that the home directory inside the container appears now to be read only. Taking a closer look brings up nobody:nogroup on user's home directory:
Now how do I accomplish that home directory in CT of user nxt (1000:1000 inside the container) will be (write) available to user nxt again?
Thanks in advance - your help is appreciated!
Cheers
Dark Helmet
I just added a disk to proxmox host, making it available to a container through the following configuration (precisely through the 6 lxc.idmap lines):
Code:
arch: amd64
cores: 2
features: nesting=1
hostname: nxt
memory: 8192
mp0: /media/hdd,mp=/media/nasdisk
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=64:ED:BA:AE:79:DA,ip=dhcp,ip6=auto,ta>
ostype: debian
rootfs: local-lvm:vm-108-disk-0,size=24G
swap: 8192
unprivileged: 1
lxc.idmap: u 0 100000 1000
lxc.idmap: g 0 100000 1000
lxc.idmap: u 1000 1001 1
lxc.idmap: g 1000 1001 1
lxc.idmap: u 1001 101001 64535
lxc.idmap: g 1001 101001 64535
This works quite well as I am now able to write on that disk as expected.
Code:
/media/nasdisk$ ls -n
drwxrwxr-x 8 0 1002 4096 Dec 6 22:44 NAS
drwxr-xr-x 3 0 0 4096 Jun 30 2019 NC
drwxr-xr-x 2 1000 1000 4096 Jan 21 16:47 images
drwx------ 2 1000 1000 16384 Jan 16 20:47 lost+found
drwxr-xr-x 4 0 0 4096 Nov 17 2019 temp
Code:
/media/nasdisk$ ls -lha
drwxrwxr-x 7 root messagebus 4.0K Nov 17 2019 .
drwxr-xr-x 4 root root 4.0K Jan 22 14:57 ..
drwxrwxr-x 8 root nasshare 4.0K Dec 6 22:44 NAS
drwxr-xr-x 3 root root 4.0K Jun 30 2019 NC
drwxr-xr-x 2 nxt nxt 4.0K Jan 21 16:47 images
drwx------ 2 nxt nxt 16K Jan 16 20:47 lost+found
drwxr-xr-x 4 root root 4.0K Nov 17 2019 temp
The only flaw is that the home directory inside the container appears now to be read only. Taking a closer look brings up nobody:nogroup on user's home directory:
Code:
/home$ ls -n
drwxr-xr-x 6 65534 65534 4096 Jan 24 12:31 nxt
Code:
/home$ ls -lha
drwxr-xr-x 6 nobody nogroup 4.0K Jan 24 12:31 nxt
Now how do I accomplish that home directory in CT of user nxt (1000:1000 inside the container) will be (write) available to user nxt again?
Thanks in advance - your help is appreciated!
Cheers
Dark Helmet