mapping container uid to host clobbers uid in container?

Steve28

Member
Apr 25, 2021
5
1
8
55
I know this is yet another idmap question... but...

I have an unprivileged ubuntu container to which i bind mount a directory from the host. The user:group in the container I want to map is 999:999. I would like to map that to 1000:1000 on the host because that's the what the permissions are on the host directory. My map is set up like so:
Code:
lxc.idmap: u 0 100000 1000
lxc.idmap: g 0 100000 1000
lxc.idmap: u 999 1000 1
lxc.idmap: g 999 1000 1
lxc.idmap: u 1001 101001 64535
lxc.idmap: g 1001 101001 64535
When I do the mapping, everything in the container that was already owned by 999:999 gets changed to 65535:65535 and the container 999 user isn't able to do anything with it.

Is it because when I created the container and created user 999 in the container, everything created with that user shows as 100999 on the host? so when I then map 999 on host to 999 in container, the old 999 in the container, in effect, no longer exists?
 
Last edited:

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!