Hey everyone,
I'm trying to set up an SMB mount in an unprivileged LXC container on Proxmox, but I’m struggling to understand how UID and GID work in this context. I've read multiple guides, including this one: Proxmox: Bind SMB Mount to Unprivileged LXC Container the Easy Way, and searched various forums, but I keep running into the same problem.
which is the same as on my Proxmox host. However, from what I’ve read, in unprivileged containers, the UIDs and GIDs should be mapped to 10000+ values. But in my case, they’re not.
I'm trying to set up an SMB mount in an unprivileged LXC container on Proxmox, but I’m struggling to understand how UID and GID work in this context. I've read multiple guides, including this one: Proxmox: Bind SMB Mount to Unprivileged LXC Container the Easy Way, and searched various forums, but I keep running into the same problem.
The Issue:
When I run the id command inside my unprivileged LXC container, I get:
Code:
uid=0(root) gid=0(root)
which is the same as on my Proxmox host. However, from what I’ve read, in unprivileged containers, the UIDs and GIDs should be mapped to 10000+ values. But in my case, they’re not.
What I Know So Far:
- UID = User ID, GID = Group ID
- Normally, uid=0 and gid=0 correspond to the root user and group.
- In unprivileged LXC containers, these should be mapped to higher values (e.g., 100000+).
- I can’t find where these IDs are mapped or why my container isn’t showing the expected values.
What I Achieved So Far
I was able to pass through a mount to the LXC container successfully using /etc/fstab on the Proxmox host and the pct bindmount command. However, I only have read permissions.My Questions:
- Where exactly can I find the mapped UID/GID for an unprivileged LXC container?
- What are /etc/subuid and /etc/subgid on the Proxmox host for?
- Is my setup broken, or am I missing a crucial step?