Unpriviledged LXC access on mount points

carsten2

Renowned Member
Mar 25, 2017
277
29
68
55
I have a unprivileged container and mounted a second dxu unter /MYDISK

On the Proxmox side it got the access 100000:100000 but under LXC it shoes up as root:nogroup. Why is it not shown as root:root as other directories which have 100000:100000? Is this a bug?

I also tried to change the group to something else (101001) to give only certain users on the container access to this disk, but this does not work, as the group is shown as nogroup no matter what is set on the proxmox host. The only way is to allow access for everyone, if I want users with group 101001 to access this disk .How can I now limit access to this disk to the 101001 group?
 
Last edited:
hi,

please check the outputs of:
Code:
root@pve:~# ls -aln /MYDISK

and also inside the container:
Code:
root@pve:~# pct enter CTID
root@CT:~# ls -aln /MYDISK

with the -n flag you should see the numerical output instead of root:nogroup
 
Promox current directory is container disk:
chown 100000:101001 DISK
chown 100000:101001 y

Then ls -ln. Output:
drwxr-xr-x 2 100000 101001 2 Jan 5 2020 DISK
drwxr-xr-x 2 100000 101001 2 Apr 1 14:40 y

Then pct enter <CTID>, ls -ln in root directory. OUtput:
drwxr-xr-x 11 0 65534 11 Jan 14 12:02 DISK
drwxr-xr-x 2 0 1001 2 Apr 1 14:40 y
 
can you post the container configuration as well? pct config CTID

maybe your uid mappings aren't correct
 
can you post the container configuration as well? pct config CTID

maybe your uid mappings aren't correct
Code:
arch: amd64
cores: 2
hostname: xxxx
memory: 2048
mp0: vmdata1zfs:subvol-103-disk-2,mp=/DXUSWP,backup=1
net0: name=eth0,bridge=vmbr0,gw=192.xx.xx.xx,hwaddr=yyyyyy,ip=xxxxxxxxx/24,type=veth
onboot: 1
ostype: debian
rootfs: vmdata1zfs:subvol-103-disk-1,size=32G
startup: order=21
swap: 2048
unprivileged: 1
 
sorry for the late reply.

Then ls -ln. Output:
drwxr-xr-x 2 100000 101001 2 Jan 5 2020 DISK
drwxr-xr-x 2 100000 101001 2 Apr 1 14:40 y

Then pct enter <CTID>, ls -ln in root directory. OUtput:
drwxr-xr-x 11 0 65534 11 Jan 14 12:02 DISK
where do you add the disks mountpoints to your container? the value in your configuration doesn't match the output your previously posted.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!