December 4, 2026

NFS vs SMB for a Home NAS: Speed, Security and Who Each Protocol Really Trusts

A four-bay home NAS beside a network switch

A home NAS almost always offers two ways to share its folders: SMB, the protocol Windows and macOS use natively, and NFS, the long-standing Unix choice. Forum advice tends to boil down to “NFS is faster for Linux, SMB is easier for everything else,” and that is roughly right about convenience. It leaves out the part that matters more on a shared network: how each protocol decides who is allowed to touch a file. To compare them directly, a small NAS was built inside a Linux machine, serving the same folder over NFSv4 (with the NFS-Ganesha server) and SMB3 (with Samba 4.19, the version in Ubuntu 24.04), to a separate client on its own virtual network.

Video: SpaceRex on YouTube

What each protocol is for

SMB

SMB is the file-sharing protocol built into Windows, and macOS and Linux speak it too. A user connects with a username and password that the server checks, and the server then acts on that user’s behalf. Samba is the open-source SMB server inside most consumer NAS boxes. On the test system, Samba’s configuration checker reported a minimum server protocol of SMB2_02 and a maximum of SMB3, so the decades-old SMB1 dialect was not offered at all.

NFS

NFS grew up on Unix networks where every machine was run by the same administrators. Linux mounts it natively, and many media players, hypervisors and backup tools support it. In its usual home configuration, NFS does not ask the user for a password at all. That design choice drives most of the differences below.

Aerial view of a freight truck lot

Speed on a fast link

Reading a 200 MB file

Each protocol’s client read the same 200 MB file of random data from the server over the virtual network link:

Protocol and client Throughput
NFSv4, libnfs nfs-cp about 750 MB/s
SMB3, smbclient about 782 MB/s
SMB3 with encryption about 657 MB/s

On this link, plain NFS and plain SMB were effectively tied. Encryption cost SMB about 16 percent, all of it processor time spent encrypting and decrypting, since the virtual link had no real bandwidth limit.

What that means for a real NAS

Both test clients ran in user space on the same machine as the server, so the figures measure the protocols and their software, not any disk or cable. These numbers are far beyond a typical home network. Gigabit Ethernet tops out near 117 MB/s and 2.5-gigabit near 290 MB/s, and both protocols in this test ran several times faster than that. On a home NAS, the disks or the network link are almost always the bottleneck long before the protocol is. The performance differences people do notice tend to come from small-file workloads, client settings and the NAS’s own processor, especially once SMB encryption is turned on on a low-power box.

Who the server trusts

SMB checks a password

A connection with the wrong password failed at the door:

session setup failed: NT_STATUS_LOGON_FAILURE

With the right password, a file uploaded over SMB landed on the server owned by nasuser, the account that had logged in, user ID 30035. The server decided who the client was.

NFS believes the client

NFS in its common sec=sys mode works the other way around. The client sends a user ID and group ID with each request, and the server uses them. The libnfs client used here lets the caller choose those numbers, so it tested exactly that:

Client claimed File created on the server as
user 1234 owned by user 1234
user 30035 owned by user 30035, the same owner as the SMB user’s files
user 0 (root), with root squash on owned by the anonymous user, 4294967294

No password was involved in any of these. Any machine that can reach the NFS server, and that is allowed by the export’s address list, can claim to be any user except root and be treated as that user. Root squash, the default in the test export, protects only the single most powerful account.

RFC 5531, which defines the remote procedure call system NFS runs on, is blunt about this: it says AUTH_SYS is known to be insecure because there is no verifier to validate the credential, and that it should not be used for services that let clients modify data. Home NAS setups use it anyway, because it is simple and it works when every machine on the network is trusted.

Making NFS safer

The practical defenses are network-level: limit each export to the specific IP addresses of the machines that use it, keep the NAS on a network segment that guests and smart TVs cannot reach, and export read-only where writing is not needed. NFS also supports Kerberos (sec=krb5, krb5i, krb5p) for real authentication and encryption, but setting up Kerberos is more than most home networks want to take on.

Access control turnstile

Who can read the traffic

The test

A file filled with a recognizable marker string was copied to the server three ways while tcpdump recorded the network traffic on the server’s interface. Then the captures were searched for the marker:

Transfer Marker visible in the captured packets?
NFSv4, sec=sys Yes
SMB3, default settings Yes
SMB3, encryption required by the client No

Both default transfers sent the file’s contents across the network in readable form. Anyone able to capture traffic on that network, such as another device on an open Wi-Fi segment, could read them. Only the encrypted SMB session hid the contents.

Turning SMB encryption on

On the client side, smbclient --client-protection=encrypt asked for it in the test. On the server, Samba’s server smb encrypt = required setting makes it mandatory for every connection; the smb.conf manual for Ubuntu 24.04 describes the matching client setting the same way, noting that peers without encryption support are refused. Windows 8 and later, macOS and current Linux clients support SMB3 encryption, and the test showed the cost on a fast link: about 16 percent of throughput.

Which one to choose

Use SMB when

  • Windows or Mac computers need access, which is most homes.
  • Different people should see different folders, with real passwords.
  • The NAS serves a network that includes guests, IoT gadgets or devices the owner does not fully control.
  • Traffic might cross Wi-Fi where encryption is worth its cost.

Use NFS when

  • The clients are Linux machines, hypervisors or media players on a trusted wired network.
  • The export can be restricted to a short list of fixed IP addresses.
  • Unix permissions and ownership need to pass through exactly, which NFS does natively.
  • The goal is a simple, low-overhead mount for a backup server or a virtualization host.

Using both

Most NAS systems can share the same folder over both protocols at once. A common home arrangement is SMB for people and NFS, restricted by IP address, for one or two Linux servers. The two still need consistent user IDs on every machine, or files written over one protocol show up with the wrong owner over the other.

The ownership puzzle that shows up first

The very first listing of the NFS share in the test showed a file the server’s root account had created as owned by user 65534, the conventional “nobody” ID, rather than by root. NFS version 4 sends owners as names in the form user@domain rather than raw numbers, and when the two ends do not agree on the domain or cannot match a name, the owner falls back to nobody. On a real home setup, the same symptom appears as a NAS folder where every file seems to belong to nobody on the Linux client. Matching the NFSv4 ID-mapping domain on the NAS and the clients, or falling back to numeric IDs where the NAS allows it, usually clears it up. SMB avoids the problem from the other direction: everything written over a session belongs to the account that logged in, whatever user ID the client machine happens to use locally.

Cardboard box

A short setup checklist

For either protocol

  1. Turn off SMB1 if the NAS still offers it. The test server’s defaults already excluded it.
  2. Give each person a separate NAS account rather than one shared login.
  3. For NFS, list client IP addresses in every export instead of whole subnets, and keep root squash on.
  4. For anything private on Wi-Fi, use SMB with encryption required, or reach the NAS through a VPN.
  5. Test from a second machine: try a wrong password over SMB, and try mounting the NFS export from an address that should not be allowed.

Speed is the question people ask, and on a home network it barely separates the two. Trust is the question they rarely ask. One protocol asks every visitor for a password; the other takes them at their word.

Sources

  • RFC 5531, RPC: Remote Procedure Call Protocol Specification Version 2: https://www.rfc-editor.org/rfc/rfc5531.html
  • smb.conf(5), Ubuntu 24.04 manual page: https://manpages.ubuntu.com/manpages/noble/man5/smb.conf.5.html

719 Posts

Peter Kalafatis writes and edits X9M8. He holds a bachelor's degree from LIU Post and a master's in Media Studies from The New School, with academic work in the philosophy of science, human behavior, AI, and memetics.

View All Posts

Leave a Reply

Your email address will not be published. Required fields are marked *