What to paste
From the container's config, copy the part after lxc.idmap, such as u 0 100000 65536. On Proxmox the config is /etc/pve/lxc/<id>.conf. Put u lines in UID map and g lines in GID map. Leave out the lxc.idmap = or lxc.idmap: prefix.
For the grants, copy the matching lines from /etc/subuid and /etc/subgid on the host, and enter their owner. On Proxmox the owner is root, because LXC creates containers as root.
For Query ID, enter the container user or group you care about, such as 1000 for the first normal user.
How to read the result
The lead line says which host ID the container ID maps to, or that it's unmapped. The grant status is one of three:
covered: one grant for this owner covers the whole host range the ID falls in.missing: you pasted grants, but none covers that whole range.unknown: you didn't paste grants, so the tool can't check them.
Passing container user 1000 through to host user 1000
Example
UID map:
u 0 100000 1000
u 1000 1000 1
u 1001 101001 64535The result reads UID 1000 maps to host 1000. With only root:100000:65536 as a grant, the status is missing, because nothing allows host ID 1000. Add root:1000:1 and it becomes covered.
How does LXC ID mapping work?
An unprivileged container sees its own user and group IDs, but the host stores each one as a different ID. Each map line says where a block of container IDs lands on the host.
Host ID
Formula
host ID = host start + (container ID - container start)
The common default is u 0 100000 65536. Container root (0) is host 100000, and container user 1000 is host 101000. The line covers 65,536 IDs, so the last one is container 65535, host 165535. The LXC config manual defines the format.
The same idea applies to groups, with g lines. A container needs both maps, and they don't have to match.
Why do files on my bind mount show up as nobody?
Because the host's owner isn't in the container's map. Any host ID outside the map appears inside the container as the overflow ID, 65534, usually shown as nobody. The Linux user namespaces manual describes this.
It works the other way too. Files the container creates on the mount belong to high host IDs, such as 101000 for container user 1000.
You can fix this in two ways:
- Change the owner of the host folder to the mapped ID, such as
chown -R 101000:101000 /path/on/hostfor container user 1000 with the default map. - Pass one container ID straight through to the same host ID, as below.
How do I give a container access to a host user's files?
Split the map so one ID passes through unchanged, then allow that ID in the grants. The Proxmox guide to unprivileged containers walks through the same steps.
- Replace the single map line with three: the IDs below yours, your ID mapped to itself, and the IDs above it. The example above shows this for ID 1000. Do the same with
glines for the group. - Add
root:1000:1to both/etc/subuidand/etc/subgidon the host. - Make sure the host folder is owned by 1000, then restart the container.
The three lines must add up to the full 65,536 IDs. In the example, 1000 + 1 + 64535 is 65,536. If a line is short, the IDs past it stay unmapped, and if ranges overlap, the checker rejects the map.
What are /etc/subuid and /etc/subgid?
They list the ID ranges each host user may hand to containers. Each line is owner:start:count, so root:100000:65536 lets root use host IDs 100000 to 165535. See the subuid manual.
UIDs come from /etc/subuid and GIDs from /etc/subgid. The Proxmox guide adds a grant for every host range a map uses, including a single passed-through ID.
What's the difference between privileged and unprivileged containers?
In a privileged container, container root is host root. In an unprivileged one, container root is a high host ID such as 100000. If something escapes the container, it lands as that unprivileged user instead of root, as the Proxmox guide explains.
The checker only does the arithmetic and the grant check. It doesn't read the running container, so check the real owners with ls -ln on both sides. Once the IDs line up, the chmod calculator helps with the permission bits.