Pcornel
Browse topics
Options
Recent
Favorites
Storage · Technical reference

Root Squash

Direct answer

The server rewrites or maps remote UID 0 according to export policy before normal filesystem authorization. This reduces trust in client-side root but does not make an export read-only or replace filesystem permissions.

When to use this

Use it when the storage question has been narrowed to NFS → Root Squash. Start from the exact remote path and operation, then separate transport, protocol/session or mount state, identity/security, share/export authorization, filesystem authorization and backend I/O before changing configuration.

First 30 seconds

1. root_squash maps client root to nobody (default).

2. no_root_squash only for trusted hosts that need it (e.g. hypervisors).

3. all_squash for public shares.

4. anonuid/anongid set mapped IDs.

5. Review regularly.

Operational verification

client root → squashed to anon UID

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Failure and recovery traps

Root squash changes the identity used for remote root requests; it does not itself define read/write export mode, ordinary user mapping or backend health.

Suspicious evidence: workload depends on remote root semantics, anonymous UID/GID mismatches, unexpected file ownership or no_root_squash enabled as a troubleshooting shortcut.

Platform / version applicability
Network file storage
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformNetwork file storage
Scope / prerequisiteUse it when the storage question has been narrowed to NFS → Root Squash. Start from the exact remote path and operation…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

client UID 0 → export squash policy → anonymous/effective server credential → filesystem permission → operation

Healthy evidence: root requests map exactly as designed, non-root access is unaffected as expected and server-side ownership confirms the effective credential.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Root squash ≠ read-only export.
  • Client root ≠ server root when squashed.
  • no_root_squash ≠ required for normal NFS operation.
  • Root squash ≠ encryption or authentication.
Key checks
  • exportfs -v | grep -o 'root_squash\|no_root_squash' — squash setting
  • touch /mnt/nfs/testfile (as root) && ls -ln — root mapped to nobody?
  • cat /etc/exports — options
ReferenceImportant terms & boundaries2 sections · depth on demand

Namespace and identity

Root squash changes the identity used for remote root requests; it does not itself define read/write export mode, ordinary user mapping or backend health.

In depth

Root squash maps requests from client UID 0 to the anonymous user (nobody, UID 65534), so a root account on any client cannot read or change every file on the export.

OptionEffect
root_squash (default)Client root → anon
no_root_squashClient root is root on the export — only for trusted hosts such as backup servers or hypervisors
all_squashEvery user → anon (anonuid/anongid), for public or single-owner shares

Symptom of root squash: chown or sudo writes fail with Permission denied or Operation not permitted on the client while the same user works fine without sudo.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docNetwork file storage current

Authoritative/upstream documentation reviewed for bounded claims in NFS → Root Squash. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc8881 · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
root squashnfs root_squashno_root_squash
Embedded reference data

Quick lookup tables

NFS → Root Squash file-service map

Fast namespace, protocol, identity, authorization and proof boundaries for NFS → Root Squash.

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 boundaryRoot squash changes the identity used for remote root requests; it does not itself define read/write export mode, ordinary user mapping or backend health.Correlate client, network, server and filesystem evidence for the same operation/time window
AcceptanceHealthy evidence: root requests map exactly as designed, non-root access is unaffected as expected and server-side ownership confirms the effective credential.Close only after the original operation and server-side/read-back verification succeeds
Confirmation

Confirm action

Continue?