NFS /etc/exports syntax
- Reply: Marek Zarychta : "Re: NFS /etc/exports syntax"
- Reply: Rick Macklem : "Re: NFS /etc/exports syntax"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 20 Jan 2026 05:30:19 UTC
There appear to be some inconsistencies in exports(5) man page, or at least a couple things which have me wondering a bit. :-) In particular I'm looking at the use of "=" (or not) between some flags and their args. E.g. the man page text has descriptions like: The third case is specified by the flag -network=netname[/prefixlength] and optionally -mask=netmask. but down in EXAMPLES the "=" is not used with those flags, like so: /cdrom -alldirs,quiet,ro -network 192.168.33.0 -mask 255.255.255.0 I've been using -network=1.2.3.4/24 syntax in my own exports and it seems to do the right thing, fwiw. Others like -maproot seem to more consistently use "=" in the man page, and I don't see instances with " " instead; I'm guessing it would work that way too, but haven't tried it. In general, are exports flags intended to work with either "=" or " " between the flag and its arg? As an aside, the 'zfs set sharenfs' syntax examples from Handbook seem to use the "=" between flags and their args pretty consistently. Different but related, is there a syntax rule for "chaining" flags together after a leading "-"? E.g. is something like this valid: /foo -maproot=root,ro,alldirs -network=1.2.3.4/24 From a readability standpoint, this seems clearer to me: /foo -maproot=root -ro -alldirs -network=1.2.3.4/24 but I'm curious if there is a formal syntax definition for this stuff. Thanks, sr.