Use it as the entry point when setting up or troubleshooting file shares.
File Services
Linux file services share directories over the network: NFS for Linux/Unix clients and SMB/CIFS (served by Samba) for Windows and mixed environments.
1. Server reachable on the protocol ports (NFS 2049, SMB 445)?
2. Share/export defined and visible to the client?
3. Client mount options and errors (dmesg, journalctl).
4. Permissions/ownership on the server path.
5. Test read and write as the real user.
share defined on the server → port reachable → client authenticated → mounted → permissions allow access
For File Services, continue with the first unproven Topic check: Pin server/client, protocol, share/export path, client identity, mount/session options and exact file operation. If that boundary is healthy, advance to the adjacent check: Read back effective service/export/share configuration and listener/session state. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
share/export config → service/listener → network/firewall → protocol negotiation → authentication/identity mapping → export/share policy → filesystem path + permissions → client mount/session → file operation
Healthy evidence: intended clients reach the service, negotiate the expected protocol, map identity correctly, access the intended backend and complete required file operations
Step 2 Verification and output interpretation Verify boundary
Verification path. Show server listener/service and exported/share namespace, then client name/IP reachability, protocol negotiation, mount/session state and one controlled read/write under the real identity. Inspect client/server counters/logs around the same operation. For stale/hung behavior, determine whether the issue is network, server state, lock/cache recovery or backing filesystem. A mount listed locally is not enough; verify an actual operation and expected ownership semantics.
Existing fast checks for this Topic. - Pin server/client, protocol, share/export path, client identity, mount/session options and exact file operation.
- Read back effective service/export/share configuration and listener/session state.
- Trace one operation through protocol authentication/identity mapping to backend filesystem evidence.
- Apply the smallest persistent fix, reconnect/remount only as required, then repeat original read/write and regression checks.
Verification chain. share/export config → service/listener → network/firewall → protocol negotiation → authentication/identity mapping → export/share policy → filesystem path + permissions → client mount/session → file operation
Step 3 Commands Verify boundary
showmount -e nfs01
smbclient -L //fs01 -U user
mount | grep -E 'nfs|cifs'
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: daemon is active but wrong export/share/path is used, identity mapping differs, server-local access works while network access fails, stale mounts hide failure, or permissions/SELinux block the service identity
Step 5 Common mistakes Narrow the fault
- UID/GID mismatches between NFS clients and server.
- SMB1 still enabled.
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.
Subtopics
Go one level deeper into this subject.
NFS provides remote filesystem semantics through exports, RPC/NFS services, client mount options, identity mapping and server-side filesystem authorization; protocol version materially changes behavior.
Subtopic NFS ServerNFS Server operation is the authoritative export and backend side: export configuration, effective export table, NFS service endpoints, client matching, squashing/identity semantics and filesystem access.
Subtopic NFS ClientNFS Client operation spans name/path reachability, protocol negotiation, mount options, kernel NFS session state, local mount namespace and the application I/O performed through the mount.
Subtopic SambaSamba implements SMB file services on Linux using smb.conf-derived service definitions, smbd-related runtime state, authentication/identity mapping and Unix filesystem permissions beneath share policy.
Subtopic SMBSMB is the network file-sharing protocol boundary covering dialect negotiation, session setup, authentication, tree connect/share authorization, file handles, locking and client-visible operations.
Subtopic File Share TroubleshootingFile Share Troubleshooting isolates NFS/SMB failures from client resolution and transport through protocol/session, authentication/identity mapping, export/share policy, backend mount/permissions and fresh application I/O.
Check in order: network and firewall ports, the export/share definition, authentication and ID mapping, then file permissions on the server. Client-side mount options matter (vers=, sec=).
showmount -e <server> / exportfs -v— NFS exportsfindmnt -t nfs,nfs4,cifs— mounted network sharessmbclient -L //<server> -U <user>— SMB sharestestparm -s— Samba configuration check
ReferenceHow it works1 section · depth on demand
How it works
Anchor the exact process namespace, credentials/cgroup and kernel-owned resource because host-global state can differ from the workload context.
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
File service health is confirmed only when the real client identity performs the intended read/write/metadata operation through the network share, not merely when the server daemon or mount exists.
In depth
File services on Linux: NFS and SMB side by side
Linux servers share files over two main protocols. NFS is native to Unix and Linux clients, and SMB is native to Windows, though both work across platforms. The exports(5) manual page shows NFS's model:
- The server exports paths to named clients, with options per client.
ro,sync,root_squashandno_subtree_checkare the defaults, andsec=selectssysor Kerberos.exportfs -raapplies changes.
Samba provides SMB, configured through shares in smb.conf.
NFS and SMB compared
| NFS (v4.x) | SMB (v3.x, Samba) | |
|---|---|---|
| Native clients | Linux, Unix, macOS | Windows, macOS, Linux (cifs) |
| Port | TCP 2049 (NFSv4) | TCP 445 |
| Identity | UIDs and GIDs (sec=sys), or Kerberos principals | Users authenticated by the server (local, AD) |
| Access control | Unix permissions, ACLs, export options | Share permissions + file system permissions |
| Encryption | sec=krb5p | SMB3 encryption |
| Typical use | Linux servers, home directories, VM and container storage | Windows clients, mixed offices |
Choosing
| Situation | Choice |
|---|---|
| Linux clients in one administrative domain | NFSv4 |
| Windows clients | SMB with Samba |
| Both | Samba for Windows; NFS for Linux; avoid sharing one tree over both unless locking is understood |
| Encryption without Kerberos | SMB3 |
Discovering what's shared
host$ sudo exportfs -v
/srv/nfs/home 10.110.0.0/16(sync,wdelay,hide,no_subtree_check,sec=sys,rw,secure,root_squash,no_all_squash)
host$ showmount -e nas1.example.net
Export list for nas1.example.net:
/srv/nfs/home 10.110.0.0/16
host$ smbclient -L //nas1.example.net -U alice
Sharename Type Comment
--------- ---- -------
projects Disk Project share
host$ findmnt -t nfs4,cifs -o TARGET,SOURCE,FSTYPE,OPTIONS
host$ ss -tlnp | grep -E ":2049 |:445 "
Identity is the main design question
With NFS sec=sys, the server trusts the UID the client sends. Every client must therefore use the same UIDs, for example through a directory service. SMB authenticates users at the server, so the client's own UIDs don't matter. That difference decides most designs.
Documented example, not captured output.
How it works at runtime
File Services is part of File Services. Linux File Services covers network file sharing from server export/share configuration through listener/session negotiation, identity mapping, filesystem permissions and the client-visible file operation.
Runtime state ownership and mechanics. NFS and SMB expose remote filesystems through distinct protocol, authentication, caching and locking semantics. NFS depends on export policy, client identity and RPC/NFS version behavior; SMB adds session authentication, share policy and dialect/security negotiation. The Linux VFS and mount layer present both as filesystems, but remote server state, network path, credential mapping and client caches can fail independently.
Topic-specific state model. Linux File Services covers network file sharing from server export/share configuration through listener/session negotiation, identity mapping, filesystem permissions and the client-visible file operation.
Interpretation rule. - Service active ≠ share/export is reachable or authorized.
- A mounted share ≠ new I/O succeeds.
- Server-local filesystem access ≠ remote protocol identity has equivalent access.
- Network reachability ≠ export/share policy and filesystem permissions allow the operation.
Quick reference
Linux file services: NFS (kernel nfsd) for Unix/Linux clients and hypervisors, Samba for SMB clients (Windows, macOS), plus SFTP for simple user access.
Choose NFSv4.2 with Kerberos or at least restricted exports for Linux-to-Linux, Samba as AD domain member for Windows clients, and avoid exporting the same directory over both protocols unless identity mapping and locking are designed for it.
Limits and how it fails
Primary failure point. File service health is confirmed only when the real client identity performs the intended read/write/metadata operation through the network share, not merely when the server daemon or mount exists.
Model. Local mount state does not show the remote server or backing storage is healthy. NFS root squashing/UID mapping and SMB account/share ACLs can deny access even when Unix mode bits appear permissive. DNS success does not show protocol reachability. Reconnecting a session can mask transient recovery behavior but does not explain it. Keep client VFS, network, protocol session, remote policy and server filesystem as separate evidence layers.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Configuration intent and lifecycle. Define server export/share scope, identity mapping, protocol versions/security and filesystem permissions explicitly. Client mounts should use stable server/share identity and mount options suited to failure/recovery requirements. Avoid treating local chmod alone as the authority when server export/share ACLs or ID mapping also apply. Persistent mounts should consider boot/network ordering and failure timeouts so a remote service does not unintentionally block system boot.
Distribution/platform context. File Services owns Linux network-file-service composition; NFS and SMB/Samba Topics own protocol-specific boundaries and Storage/Permissions own backend access.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in File Services. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.samba.org/samba/docs/ · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
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.
Quick lookup tables
File Services operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for File Services.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Linux File Services covers network file sharing from server export/share configuration through listener/session negotiation, identity mapping, filesystem permissions and the client-visible file operation. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin exact client/server + time + request/file operation → identify authoritative configuration → read back effective service/listener/session state → trace protocol selection/auth/identity → verify backend/upstream boundary → correlate logs → make smallest persistent change → repeat original workload + regression check. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | share/export config → service/listener → network/firewall → protocol negotiation → authentication/identity mapping → export/share policy → filesystem path + permissions → client mount/session → file operation | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | File service health is proven only when the real client identity performs the intended read/write/metadata operation through the network share, not merely when the server daemon or mount exists. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux web/file-service evidence can establish this proof path: share/export config → service/listener → network/firewall → protocol negotiation → authentication/identity mapping → export/share policy → filesystem path + permissions → client mount/session → file operation | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove unobserved clients, names, identities, routes, sessions, backends or time periods. File service health is proven only when the real client identity performs the intended read/write/metadata operation through the network share, not merely when the server daemon or mount exists. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven service boundary, capture adjacent effective state and protocol/application evidence, make only the demonstrated persistent change, then repeat the original client workload plus a regression check. | Continue to the next unresolved boundary while preserving the original test condition. |
File Services · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | File Services |
|---|---|
| Topic path | File Services |
| Runtime state | Linux File Services covers network file sharing from server export/share configuration through listener/session negotiation, identity mapping, filesystem permissions and the client-visible file operation. |
| Fast checks | - Pin server/client, protocol, share/export path, client identity, mount/session options and exact file operation. - Read back effective service/export/share configuration and listener/session state. - Trace one operation through protocol authentication/identity mapping to backend filesystem evidence. - Apply the smallest persistent fix, reconnect/remount only as required, then repeat original read/write and regression checks. |
| Verification chain | share/export config → service/listener → network/firewall → protocol negotiation → authentication/identity mapping → export/share policy → filesystem path + permissions → client mount/session → file operation Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. |
| Failure boundary | File service health is proven only when the real client identity performs the intended read/write/metadata operation through the network share, not merely when the server daemon or mount exists. Boundary chain: unit config/drop-ins → dependency/order/condition → exec/process → readiness/active state → owned socket/file/device → dependent client/workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |