Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

File Services

Direct answer

Linux file services share directories over the network: NFS for Linux/Unix clients and SMB/CIFS (served by Samba) for Windows and mixed environments.

When to use this

Use it as the entry point when setting up or troubleshooting file shares.

First 30 seconds

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.

Operational verification

share defined on the server → port reachable → client authenticated → mounted → permissions allow access

Evidence · next step

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
Platform / version applicability
linux
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.

Platformlinux
Scope / prerequisiteUse it as the entry point when setting up or troubleshooting file shares.
What next?3 suggested next steps
Child topics (this level)6
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.

5 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 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 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
Drill down

Subtopics

Go one level deeper into this subject.

Key points

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=).

Key checks
  • showmount -e <server> / exportfs -v — NFS exports
  • findmnt -t nfs,nfs4,cifs — mounted network shares
  • smbclient -L //<server> -U <user> — SMB shares
  • testparm -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_squash and no_subtree_check are the defaults, and sec= selects sys or Kerberos.
  • exportfs -ra applies changes.

Samba provides SMB, configured through shares in smb.conf.

NFS and SMB compared

NFS (v4.x)SMB (v3.x, Samba)
Native clientsLinux, Unix, macOSWindows, macOS, Linux (cifs)
PortTCP 2049 (NFSv4)TCP 445
IdentityUIDs and GIDs (sec=sys), or Kerberos principalsUsers authenticated by the server (local, AD)
Access controlUnix permissions, ACLs, export optionsShare permissions + file system permissions
Encryptionsec=krb5pSMB3 encryption
Typical useLinux servers, home directories, VM and container storageWindows clients, mixed offices

Choosing

SituationChoice
Linux clients in one administrative domainNFSv4
Windows clientsSMB with Samba
BothSamba for Windows; NFS for Linux; avoid sharing one tree over both unless locking is understood
Encryption without KerberosSMB3

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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches 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
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 doclinux current

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%
Technical changelog & impact

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.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
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
linux file servicesnetwork file sharing linuxnfs samba services
Embedded reference data

Quick lookup tables

File Services operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for File Services.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateLinux 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 verificationPin 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 chainshare/export config → service/listener → network/firewall → protocol negotiation → authentication/identity mapping → export/share policy → filesystem path + permissions → client mount/session → file operationTrace requested/configured state through effective state to the observed workload result.
Failure boundaryFile 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 evidenceCorrelated 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 operationUse this observation only for the specific claim it actually supports.
Evidence limitIt 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 checkContinue 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 boundaryFile Services
Topic pathFile Services
Runtime stateLinux 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 chainshare/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 boundaryFile 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 ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?