Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The following NFS exports file does not work on FreeBSD 9.0. How should I be specifying that I wish to share with the whole subnet?

mybox# cat /etc/exports 

Error from syslog:

mountd[1133]: bad exports list line /storage/build,no_root_squash)


share|improve this question
up vote 2 down vote accepted

Your syntax isn't compatible with the FreeBSD implementation. Try this:

/storage/build -maproot=root -network 10.10.0 -mask

The -maproot=root option has the same meaning as no_root_squash in more Linux-centric implementations (it maps root on the client side to root on the server side). By default, FreeBSD nfs mounts are read/write, so you don't need to indicate it explicitly. Together, the -network and -mask options here tell the nfs server to allow mount requests from the 10.10.0/24 network. Alternatively, you can use CIDR notation (thanks to @Craig Sanders for pointing it out) and omit the -mask option.

Take a look at the exports manpage on your FreeBSD system. It goes into quite a bit of detail, and has several examples.

share|improve this answer
CIDR works according to the man page I linked to: [...] The third case is specified by the flag -network=netname[/prefixlength] and optionally -mask=netmask. might be new to FreeBSD 9.x....dunno. – cas Sep 26 '12 at 23:33
You're right - CIDR is supported. I'd never spotted that before. I'll edit my answer accordingly. Thanks! – D_Bye Sep 27 '12 at 6:29
Thanks for the tip. I'll try it out and mark the answer. I am learning that googling for advice with FreeBSD is not the best answer, looking at the manual pages is. There are just too many keywords in common with alternate implementations. – JonnyRo Sep 28 '12 at 15:29
@JonnyRo - indeed! But it's not all bad - the FreeBSD documentation (handbook and man pages) is generally very good. – D_Bye Sep 28 '12 at 15:43

There is a documentation available for exporting folders using NFS. You can have a look at this link : http://nixdoc.net/man-pages/hp-ux/man4/exports.4.html . This may be of some help to you .

" File /etc/exports describes the directories that can be exported to NFS clients."

share|improve this answer

That looks like a Linux style /etc/exports. FreeBSD's format is significantly different.

See http://www.freebsd.org/cgi/man.cgi?query=exports&sektion=5

You probably want something like:

/storage/build -network= -maproot=0
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.