NFS with Mac (High Sierra) Server and TrueOS Box As Client


AHA !!!

A PC-BSD user in 2014 had similar experiences to me and mentions some things
I didn’t know about like zfs sharenfs = “on” !!

Did you mention that ? Probably, and it went in one eye and out the other.

Will try it this afternoon.

Whatson: But Holmes, how can it be done ?
Sharelocked Holmes: Persistence, my dear Whatson, a crazily associative


Whoops, sorry, here’s the LINK:


OK, I just installed a cool little tool called nmap on the Mac and it clearly shows everything is being blocked by TrueOS.

In the other direction, if I share some folders on the Fedora 23 laptop, TrueOS sees that immediately.
Locally on the TrueOS Box a showmount clearly shows the correct folders being exported.

I’ve uncommented the “ALL” selection at the begining of hosts.allow
so EVERYTHING should be going through !

How, exactly, does one shut off the firewall in TrueOS ?

And WHICH is the firewall, PF, or IPFW ?

I tried (in rc.conf) FIREWALL_ENABLE = “YES” and FIREWALL_TYPE = “OPEN” which is supposed to allow everything,
and I also tried

and still all the traffic from the Mac appears blocked.

The ONLY thing that seems to get through is a ping .
No Telnet, showmount, or rpcinfo -p gets through
(host not seen) nil, nada, NOTHING !!

I’m tempted to install some other bsd distro just to see if they do it too.

??? !!!


open SysAdm --> firewall

turn firewall off and try it

personally I use gftp to transfers from my macbook to trueos laptop


Thanks but I made up mind to slay the NFS dragon once and for all.

I believe I may be running into a IPFW bug in which the rules are bing loaded even if user SHUTS OFF the firewall.

Here are the details, though I would have thought it was fixed long ago:

(this link is from a freenas site, but is talking about a bug in earlier version of TrueOS)

TrueOS Bug 9894 from May 21,2015


"Upon upgrading an installation of TrueOS 10.1.1 to 10.1.2, I found I was no longer able to connect to the server and all services were blocked. I eventually tracked this down to the ipfw service running automatically and blocking all ports."
End quote from bug report.

I will try the suggested entries in rc.conf suggested by the person that fixed the bug and see if that makes a difference.

I’ll let everyone know what happened.



OK, the Telnet to the trueos box, port 2049 is working now from the Mac.

I had to go into Firewall and open the 2049 port by selecting the nfs service.

That might seem obvious but my thinking was
that when you activate that in the Service manager, I would expect
it to open it right then and there. I’ve got NFS active on boot
and it shows true true (running now and started at boot)
in the Service manager.

So I’ve got to go into the firewall manager and open up a bunch of ports manually ?

Thanks again,


Initial Signs Favorable:

Our excursion into unknown NFS territories continues with some things now working…

I can now run rpcinfo -p 192.x.x.x on the Mac side and see various ports open
on the TrueOS box side.

Here is what the Mac sees from a rpcinfo -p 192.x.x.x (TrueOS addr)
program vers proto port
100000 4 tcp 111 rpcbind
100000 3 tcp 111 rpcbind
100000 2 tcp 111 rpcbind
100000 4 udp 111 rpcbind
100000 3 udp 111 rpcbind
100000 2 udp 111 rpcbind
100000 4 7 111 rpcbind
100000 3 7 111 rpcbind
100000 2 7 111 rpcbind
100024 1 udp 995 status
100024 1 tcp 995 status
100021 0 udp 934 nlockmgr
100021 0 tcp 845 nlockmgr
100021 1 udp 934 nlockmgr
100021 1 tcp 845 nlockmgr
100021 3 udp 934 nlockmgr
100021 3 tcp 845 nlockmgr
100021 4 udp 934 nlockmgr
100021 4 tcp 845 nlockmgr
100005 1 udp 969 mountd
100005 3 udp 969 mountd
100005 1 tcp 969 mountd
100005 3 tcp 969 mountd
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs

In a bind but answer found:
Opening the port for rpcbind was a little tricky, I looked in the Firewall manager for (what else ?) “rpcbind” but it wasn’t there but some searching soon found that it was under “sunrpc” so I selected that.

One curious thing:
trying to do a sudo showmount -e 192.x.x.x (addr of TrueOS box) from the Mac (OSX) side fails. I suspect it really wants the host name here rather than an explicit IP address, which in my case is trueos-8341 but that fails too
sudo showmount -e trueos-8351
with the error message: showmount: can’t resolve host: trueos-8351

I must need some other port hope to resolve this because it should work before I actually try to mount the shared folder.

I do have the host name explicitly in both the /etc/host file at the very bottom:
192.x.x.x MacName-iMac.local

AND in the /etc/rc.conf file:

Perhaps some port must be opened.

OK, let’s tackle that one next.

For reference: (my own, or anyone interested)
Here is the current trueos box /etc/rc.cong file

Auto-Enabled NICs from pc-sysinstall

ifconfig_wlan0=“WPA SYNCDHCP”

Auto-Enabled NICs from pc-sysinstall

ifconfig_em0_ipv6="inet6 accept_rtadv"
ifconfig_wlan0_ipv6="inet6 accept_rtadv"
ifconfig_wlan0_ipv6="inet6 accept_rtadv"
zfs sharenfs="OFF"
nfs_server_flags=”-u -t -n 4"

and here is the current

(all on one line, might show as two here)
Note: should be no spaces between end of ip address and the left parenthesis with the options…

/home/jimserac/TestFolder 192.x.x.x(rw,sync,no_root_squash,no_subtree_check,insecure)



OK, I has the server address wrong by 1 number in the hosts file on the Mac so after fixing that I can see that the sudo showmount -e is actually getting over to the server.
(Yes, you actually have to type the correct address !!)

Still the showmount AND the mount commands are not quite working but I think I’m close.

sudo showmount -e hostname
gives the error:
Cannot retrieve info from host, RPC failed; RPC Unable to send; errno = Bad File Descriptor

The attempt to mount the shared directory from the TrueOS box
sudo mount -t nfs -o resvport 192.x.x.x:/usr/home/jimserac /mnt/TestFolder
also fails with
the enticingly mysterious message:
mount_nfs: can’t mount /usr/home/jimserac from 192.x.x.x onto /mnt/TestFolder: Resource temporarily unavailable
(really, what happened ? disk manager had to go take a leak or something ?)

Now I recall warnings that the UID and GID should match on the shared and target folders
so the next step will be to try that while checking all the TrueOS box for the n_teenth time.

But, there are benefits - I found another spectacular network tool called dtrace built right into osx that I didn’t even know about.

Stay tuned as this epic struggle continues. It kind of reminds me of playing the Dragon Sicilian against the Levenfish attack…or something.

Will post current rc.conf and exports after next few tests.

OH…almost forgot - suddenly lost contact with host (TrueOS box) a few tests ago. Wireless icon showed “Associated” but no Internet and could not ping the TrueOS box. Don’t know what caused that but I just restarted the network and all seemed well again.


Seems you are learning a lot from your investigation. Remember that dtrace is built into TrueOS as well.

Good luck!


Ha ha ha, thanks !!

I’m supposed to be writing a book on MesoAmerican Herbs !!!

But…I want a solid reliable filesystem and TrueOS has it.

So…back to spelunking.



What kind of book, cooking book or medicinal uses?


Ha ! The cook book would probably sell better, but it’s about the medicinal uses.

I don’t suppose you’d know what causes an RPC failed; RPC: Unable to send; errno = Bad file descriptor message after I do sudo showmount -e trueos-server-hostname ?

Obviously if that can’t work, I don’t think any attempts to mount an NFS share from that server is going to either. The client is OSX High Sierra.

The “fun” continues !!!

Thank goodness for great documentation everywhere explaining everything !

I do wish there was a doc somewhere explaining exactly which ports you should open in the firewall manager if you want the trueos box to act as an NFS server.



I did a little testing, myself. Maybe, this helps.

NFS Server: FreeBSD 11.1-RELEASE-p1
NFS Client: OpenBSD 6.2 running in VirtualBox

In OpenBSD, all mounting has to be done as root-user.

1/2) On FreeBSD:
zfs set sharenfs=“maproot=root,” zroot/usr/locally_exported_nfs

2/2) On OpenBSD:

On OpenBSD client:

Check server’s offer:

showmount -e

Exports list on

Mount it on the client:

mount_nfs mnt

Check result on client:

mount | grep nfs on /root/mnt type nfs (v3, udp, timeo=100, retrans=101)


ls -l mnt

total 2
-rw-r–r-- 1 root wheel 0 Oct 10 18:59 this_is_on_freebsd_nfs.txt
-rw-r–r-- 1 root su1 0 Oct 13 21:39 xxx


touch mnt/yyy

ls -l mnt

total 3
-rw-r–r-- 1 root wheel 0 Oct 10 18:59 this_is_on_freebsd_nfs.txt
-rw-r–r-- 1 root su1 0 Oct 13 21:39 xxx
-rw-r–r-- 1 root su1 0 Oct 13 22:04 yyy


Thanks !

Different servers, different clients (I use a Mac for the client) and to
give an example of the tricks, I’ve read that sudo showmount -e 192.x.x.x
won’t work on Macs and you have to do it with the server host name
sudo showmount -e TrueOS_Hostnme

But sudo rpcinfo -p 192.x.x.x works so I can see that and it works locally.
By comparing the various things running ie mountd, nfs, rpcbind on the
server vs on the Mac,
I found that the only thing not running on the server but was running on
the Mac
was something called rquotad which works with inetd. I tried activating
this by uncommenting it
in /etc/inetd.conf so it shows up now on the TrueOS rpcinfo -p but it made
no difference.

One odd thing was on the TrueOS, rquotdad was using port # 63386 whereas on
the Mac there are 4 rquotad’s running and they use 923 and 999. I have no
idea what the crazy thing does,something about watching for limits in the
number of files (quotas ?).

But some fundamental thing I’m not doing on TrueOS or missing…OR …
there’s a problem in High Sierra.
I can ping and rpcinfo -p the server box from the client so if I could get
the showmount -e to work I’d probably be there.

So I’ll leave it there, but thanks again !!



In the server’s “rc.conf.local”, I’m using:

# NFS exports: rpcbind -> mountd -> nfsd
rpcbind_flags="-i -l -s"

mountd_flags="-n -r -S"


Interesting !

I have no “weak_mountd_authentication” entry and my mountd flags and rpcbind flags are different.

I shall try these forthwith.



Use “maproot=root” on TrueOS’s NFS-share.

Do mounting from Mac as MacOS-‘root’-user (UID:0).


UID testing with: “id”

User account changing with “su -l bash” or “sudo bash”


NO change. Here is my share command on the trueos box:
sudo zfs set sharenfs=" -alldirs -maproot=root -network=192.x.x.x" tank/usr/home/jimserac
where 192.x.x.x is the IP of the client Mac box

On the Mac side,here is what I get:

from bash as root:
#showmount -e trueosHostname
showmount: Cannot retrieve info from host: trueos-8351: RPC failed:: RPC: Unable to send; errno = Bad file descriptor

#mount -t nfs 192.x.x.x (IP adr of trueos nfs server box):/usr/home/jimserac /mnt/TestFolder
mount_nfs: can’t mount /usr/home/jimserac from 192.x.x.x onto /mnt/TestFolder: Resource temporarily unavailable

Only rpcinfo -p 192.x.x.x (adr of trueos box) in a terminal from the Mac works, correclty showing ports on the trueos box.

I’m thinking maybe I should re-install in case all this testing messed something up.

The ONLY thing I haven’t checkd is this stuff about getting the UID and GID’s the same from server to client. am not too sure how to do that, will do some reading.

As far as the ZFS goes, it is really starting to become familiar, everything works, snapshots, whatever. Very pleasing.

Thanks again,


showmount -e on the trueosbox works fine, correctly shows the exported share /usr/home/jimserac 192.x.x.x (addr of Mac box)


“-network=192.x.x.x” looks suspicious.

If it’s 192.168.x.x then the auto netmask will be: /16.
That’s most probably wrong.

If it’s Your AppleMac’s HostAddress, then it’s no “network”, and probably wrong, too.