Home ยท Volume 1 ยท Chapter 05

๐Ÿ“– Chapter 05 โ€” SMB Shares

How Windows and Mac actually see your data. Datasets are a ZFS concept; SMB is the bridge.

v0.1 ยท draft Vol 1 ยท Ch 05
~10 min

Learning Objectives

Introduction

Your datasets exist inside the pool. The pool lives inside the TrueNAS server. None of this is visible to your laptop until you create an SMB share โ€” the protocol that exposes ZFS datasets to the rest of the network.

This chapter covers what SMB is, the two ways to lay out your shares, and how to actually connect.

What SMB is

SMB stands for "Server Message Block." It's a network file-sharing protocol that has been around since the 1980s and is now maintained by Microsoft. It is the default file-sharing protocol for both Windows and macOS โ€” no client software required on either.

When you open File Explorer on Windows and type \\NAS\Photos, you're using SMB. When you open Finder on Mac and click "Connect to Server" with smb://NAS/Photos, you're using SMB. Same protocol, same data, same speed.

Linux can also use SMB (via the cifs-utils package) and most NAS appliances (Synology, QNAP, Unraid) also use SMB as their primary file-sharing protocol. It's the lingua franca of network file sharing.

SMB versions

SMB has gone through many versions. The current one to use is SMB3 (also called SMBv3). Modern TrueNAS uses SMB3 by default. Older versions (SMB1, SMB2) have known security issues and should be disabled.

In the TrueNAS web UI, the SMB service settings let you set the minimum and maximum SMB protocol versions. The right answer is: minimum SMB3, maximum SMB3. Don't allow anything older.

Common mistake

Leaving SMB1 enabled for "compatibility with old devices." SMB1 was deprecated by Microsoft in 2013 and disabled by default in Windows 10. The only devices that need SMB1 are ancient printers and old NAS units. If you have one, isolate it on its own VLAN. Don't expose SMB1 to your whole network.

Two strategies for share layout

You have a choice when you set up shares. Both are valid. The conversation recommends one, with reasons.

Option A: One share per dataset (recommended)

Each top-level dataset gets its own SMB share. The family sees them as separate network drives:

\\NAS\Family \\NAS\Photos \\NAS\Videos \\NAS\Documents \\NAS\Private \\NAS\PhoneUploads \\NAS\Apps \\NAS\Media

When TK logs in, he sees all of them. When Mimi logs in, she sees all of them. When Lai logs in, he sees only the ones his permissions allow. The user experience is clean: each share is a top-level thing in File Explorer / Finder.

Option B: One share, many folders

One SMB share, with all the datasets accessible as folders inside it:

\\NAS\Home โ”œโ”€โ”€ Family โ”œโ”€โ”€ Photos โ”œโ”€โ”€ Videos โ”œโ”€โ”€ Documents โ”œโ”€โ”€ Private โ”œโ”€โ”€ PhoneUploads โ”œโ”€โ”€ Apps โ””โ”€โ”€ Media

The user sees one network drive. Inside it, they navigate to find what they want. Permissions still work (you can't enter a folder you don't have access to), but the navigation is one level deeper.

Which to pick

For TK's family NAS, Option A: one share per dataset. Three reasons from the conversation:

  1. Visibility maps cleanly to permissions. If you don't have access to `Private`, you don't even see `\\NAS\Private` in your network list. With Option B, the user sees `\\NAS\Home` and only finds out about access denial when they try to open `Private`. That's worse UX.
  2. Mounting is easier. Most modern operating systems can auto-mount network shares at login. Mounting 8 shares at login is no harder than mounting 1, and gives you 8 network drives instead of 1 with 8 folders.
  3. Permission debugging is easier. If Mimi can't see Photos, you check the Photos share's permissions. If Mimi can't see a folder inside `\\NAS\Home\Photos`, you check both the share's permissions and the folder's permissions and the dataset's permissions. Three places to look instead of one.

Creating a share in TrueNAS

In the TrueNAS web UI, the path is Shares โ†’ SMB โ†’ Add. The required fields are:

That's the minimum. The advanced options let you tune:

Connecting from each OS

From Windows

Open File Explorer. In the address bar, type \\NAS\Photos (replace `NAS` with your TrueNAS hostname or IP). Windows will prompt for credentials. Enter your TrueNAS username and password. Check "Remember my credentials" so you don't have to enter them every time.

To make the share persistent across reboots, right-click it in File Explorer โ†’ "Map network drive" โ†’ choose a drive letter โ†’ check "Reconnect at sign-in".

From macOS

Open Finder โ†’ Go โ†’ Connect to Server (or press Cmd+K). Type smb://NAS/Photos. Enter your credentials. To make it persistent, add it to your Login Items in System Settings โ†’ General โ†’ Login Items.

For Time Machine backups to a dedicated share, use the "Multi-User Time Machine" purpose in the share config. macOS will offer the share as a Time Machine destination automatically.

From Linux

Mount via cifs in fstab:

//NAS/Photos /mnt/photos cifs credentials=/etc/samba/creds,uid=1000,gid=1000 0 0

with /etc/samba/creds containing:

username=tk
password=yourpassword

And chmod 600 /etc/samba/creds so only root can read it.

Hidden shares and time machine

Two share types worth knowing about:

Share permissions vs dataset permissions

This is the part that confuses people. There are two layers of permissions between a user and a file:

  1. Share permissions: can the user even see the share? Can they connect to \\NAS\Private?
  2. Dataset permissions: once connected, can they read or write files inside?

Both have to allow the operation, or it's denied. So if Mimi can see `\\NAS\Private` (share permissions say yes) but the dataset says "Mimi has no access" (dataset permissions say no), she'll get "Access Denied" when she tries to open it.

Use Access Based Share Enumeration on sensitive shares to hide them entirely from users who can't access them. Then there's no "Access Denied" surprise โ€” the share just doesn't appear in the first place.

Engineering Note

The share is the boundary between "the data exists" and "the data is reachable." The dataset layer says "this is what's allowed if you reach the data." The share layer says "this is who's allowed to try." Two questions, two answers. Both need to be right.

When debugging "I can't see my files," start at the share layer (can I see the share at all?), then check the dataset layer (can I read files in the dataset the share points to?). Most permission issues are one of these two layers, not both.

Summary

SMB is the protocol that exposes your ZFS datasets to the rest of the network. One share per dataset is the cleaner pattern for a home NAS. Use SMB3 only. Enable Access Based Share Enumeration on private shares. The share layer and the dataset layer both enforce permissions โ€” both have to allow the operation, or it's denied.

Checklist

Looking Ahead

Chapter 06 covers users and groups โ€” the accounts that authenticate against SMB and the permission model that determines who can see what. The dataset-and-share design from Chapters 4 and 5 only works if the user model is right.

Ch 05 ยท v0.1 ยท drafted from the original ChatGPT conversation, July 2026