UID / GID Mapping
Cheat sheet · https://pcornel.dk/topic.php?topic=4141
Answer
With numeric AUTH_SYS-style identity, matching UID/GID values across systems is critical; other security mechanisms can use authenticated identities that are mapped server-side. The effective server credential, not the client username string alone, determines filesystem authorization.
Remember
- Same username ≠ same UID/GID.
- Client UID 1000 ≠ server user automatically.
- Identity mapping ≠ filesystem permission grant.
- NFSv4 identity strings/security ≠ simple numeric AUTH_SYS behavior in every deployment.
First checks
id <user>— local UID/GIDcat /etc/idmapd.conf | grep Domain— NFSv4 ID domainls -ln <nfs path>— numeric owners
Verify in this order
client UID → (idmap) → server UID → permissions
Where it usually breaks
First mismatch in client identity/DNS → network transport → protocol session → authentication/authorization → export/share → backend filesystem → file operation; preserve identity/pre-state before mutation.
NFS → UID / GID Mapping file-service map
| File-service boundary | What to verify | Proof limit |
|---|---|---|
| Endpoint / namespace | Correct client, server, export/share, path and negotiated protocol version | Reachability or namespace visibility does not prove authorization or backend health |
| Identity / security | Effective identity, protocol security state and export/share/filesystem authorization | Authentication or one permission layer does not prove complete file access |
| Failure boundary | Correct identity mapping proves who the server evaluates, not that permissions, export policy or application-specific ACL logic allow the requested operation. | Correlate client, network, server and filesystem evidence for the same operation/time window |
| Acceptance | Healthy evidence: client credentials map to the intended server identity/groups and newly created files show expected ownership under the selected security model. | Close only after the original operation and server-side/read-back verification succeeds |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4141