Skip to content

SMB and NFS sessions

SMB (CIFS) shares and NFS exports are mounted by macOS through NetFS, the same mechanism as Finder’s Go → Connect to Server (⌘K), without any macOS dialog. The mount point is under /Volumes. The tab is the mount console; the Files window opens the mount point like a local folder.

On Windows only SMB works, through the Windows network connection API; see Windows.

Shared fields are on the Session dialog page. Default ports: SMB 445, NFS 2049.

SMB share settings

Field Values Default What it does
Share (required) data or data/projects Empty Share name, optionally with a folder inside it.
Domain Text; empty for a local account or workgroup Empty Sent as smb://DOMAIN;user@host/share. Part of the password key.
Mount read-only (MNT_RDONLY) Checkbox Off Mounts with the MNT_RDONLY flag: macOS refuses every write, for every program.
Unmount when the tab closes Checkbox On Unmounts on tab close, only a mount that this tab made.

NFS export settings

Field Values Default What it does
Username none NFS has no login. With sec=sys (AUTH_SYS) the server trusts the uid, gid and groups this Mac sends; the console prints them.
Export path (required) /srv/data Empty Path exported by the server.
Mount read-only (MNT_RDONLY) Checkbox Off As for SMB.
Unmount when the tab closes Checkbox On As for SMB.

Traffic is unencrypted unless the export uses sec=krb5p (krb5 and krb5i only authenticate). The flavour in use is shown by info after the mount (nfsstat -m, sec=).

SMB console: mount through NetFS and the share statistics

The console of an SMB session after the mount.

NFS console: mount and the options from nfsstat -m

The console of an NFS session after the mount.

  1. Prints the URL, mounted by macOS (NetFS, as Finder ⌘K) and, for NFS, the uid/gid warning.
  2. Resolves the host and opens a TCP connection to the port. SMB stops if the port is closed; NFS continues (it may still work over UDP or through the portmapper on 111/tcp).
  3. Looks for the share in the mount table. If it is already mounted (by Finder, another tab, autofs), it is used as it is: Already mounted: … Using it; KryoDesk will not unmount it when the tab closes. A read-only session asks Use the read-write mount anyway? [y/N] when the existing mount is read-write. An SMB mount logged in as another user is reported.
  4. SMB login: without Specify username the console asks login as (empty = guest):. With a user, the saved password (password:smb://[domain;]user@host:port) is tried first, then user@host's password (empty = Kerberos ticket or none): up to 3 times. After a mount with a typed password: Save password in Keychain? [y/N]. The password goes to NetFS as a parameter, not in the URL.
  5. Mounts and prints the mount point, the file system, owner and free space.

NetFS errors are printed with their number and meaning (for example EAUTH for a wrong password). For NFS a failure adds what to check on the server: showmount -e <host>, and that Linux servers with secure (the default) need a privileged source port (insecure in the export, or nfs.client.mount.options = resvport in /etc/nfs.conf on the Mac).

Every 5 s the console checks that the share is still mounted at its path; when it is gone (ejected in Finder, umount) the session ends.

Command What it does
info Mount details: statfs, then smbutil statshares -m <path> (SMB) or the mount’s block of nfsstat -m (NFS).
unmount (or umount) Unmounts and ends the session; refused by macOS while files are open. A mount made before this session asks first, because it affects whoever uses it.
unmount force Unmounts with MNT_FORCE: open files are cut off.
help The list above.

See also the guide Mount an SMB share.

NFS sessions are refused (NFS mounting is not supported on Windows …). An SMB session is connected with WNetAddConnection2W, as net use \\host\share without a drive letter; the console prints connected by Windows (WNetAddConnection2W, as `net use`, no drive letter). The mount point is the UNC path (\\host\share\folder), which the Files window opens like a local folder.

Topic Windows behaviour
Port 445 only; another port is refused (the API has no port).
Login The saved or typed password is passed to Windows as a parameter. Without user and password the Windows sign-in credentials are used (single sign-on); guest = user Guest with an empty password.
One login per server Windows allows one account per server: with another connection to the same server under another user, the error ends with Windows allows one login per server … (Win32 error 1219).
Mount read-only Windows has no read-only connection. The connection is read-write and KryoDesk refuses writes to the share in its own Files window and editor; other programs (File Explorer, a terminal) can still write through the same connection.
Errors Win32 error code with a hint, for example — no such share on the server, — the account has no access to this share, — guest logons are blocked by policy (AllowInsecureGuestAuth / SMB signing).
info Runs %SystemRoot%\System32\net.exe use \\host\share.
unmount WNetCancelConnection2W; unmount force also with open files.

Scroll or pinch to zoom · drag to move · double-click to zoom · Esc or click outside to close