NFS vs SMB
Compare the two common network file-sharing protocols.
| Dimension | NFS | SMB | What it means in practice |
|---|---|---|---|
| Typical clients | Linux and Unix; VMware datastores. | Windows; also macOS and Linux. | Choose by the clients that will mount the share. |
| Identity | UID/GID numbers (NFSv3) or Kerberos principals (NFSv4 with sec=krb5). | User accounts, usually Active Directory with Kerberos. | Mismatched UIDs cause permission problems on NFS. |
| Ports | TCP 2049 (NFSv4); NFSv3 also needs rpcbind and helper ports. | TCP 445. | NFSv4 is easier through firewalls than v3. |
| Locking and state | NFSv4 is stateful with leases; v3 uses a separate lock manager. | Stateful sessions with oplocks/leases. | Client crashes can leave locks until leases expire. |
| Permissions | POSIX mode bits; NFSv4 ACLs. | NTFS ACLs plus share permissions. | Effective access is the most restrictive of share and file permissions on SMB. |
| Verification | showmount -e (v3) or mount -t nfs4; nfsstat -m | smbclient -L //server -U user; Get-SmbConnection | Check the negotiated protocol version on both. |