Pcornel
Storage · NFS

UID / GID Mapping

Cheat sheet · https://pcornel.dk/topic.php?topic=4141

Back to the Topic

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/GID
  • cat /etc/idmapd.conf | grep Domain — NFSv4 ID domain
  • ls -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 boundaryWhat to verifyProof limit
Endpoint / namespaceCorrect client, server, export/share, path and negotiated protocol versionReachability or namespace visibility does not prove authorization or backend health
Identity / securityEffective identity, protocol security state and export/share/filesystem authorizationAuthentication or one permission layer does not prove complete file access
Failure boundaryCorrect 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
AcceptanceHealthy 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

Confirmation

Confirm action

Continue?