diff options
author | Steinar H. Gunderson <sesse@debian.org> | 2006-12-26 23:58:48 +0100 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-02-05 09:06:26 +1100 |
commit | b5a542ab44c4d3430cf68dcacc60f06a204b15cd (patch) | |
tree | c2f25cf34a86a74e73604853d5ba540c80eb818a /utils/exportfs | |
parent | e673ca14c730ae4ed9e2acaea764c669d2b00433 (diff) | |
download | nfs-utils-b5a542ab44c4d3430cf68dcacc60f06a204b15cd.tar.gz nfs-utils-b5a542ab44c4d3430cf68dcacc60f06a204b15cd.tar.xz nfs-utils-b5a542ab44c4d3430cf68dcacc60f06a204b15cd.zip |
Allow default options in /etc/exports
Implement default options in /etc/exports, to fix a long-standing wishlist
bug in Debian. (The user claims the syntax matches that of OpenBSD.) This
makes it possible to write "/srv/www -sync,no_subtree_check host1 host2 host3"
instead of having to write (sync,no_subtree_check) over and over and over
again, driving the administrator slowly mad. Such option lines can be
placed anywhere on the line, and affects anything after them (I do not
know if OpenBSD allows this). The patch is slightly convoluted in order to
avoid triggering spurious warnings; for instance, we want
"/srv/www -sync host1" to trigger a warning, but not "/srv/www
-sync,no_subtree_check host1" or "/srv/www -sync host1(no_subtree_check)".
There was also a suggestion for a truly global (ie. per-file) option list,
but this seemed like the safest bet, given that it matches that of other
implementations.
Also, the man page is updated with information on the new possibilities,
and an example.
Signed-off-by: Steinar H. Gunderson <sesse@debian.org>
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'utils/exportfs')
-rw-r--r-- | utils/exportfs/exports.man | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/exportfs/exports.man b/utils/exportfs/exports.man index d57b8b4..3ab1116 100644 --- a/utils/exportfs/exports.man +++ b/utils/exportfs/exports.man @@ -22,6 +22,11 @@ client may be immediately followed by a parenthesized, comma-separated list of export options for that client. No whitespace is permitted between a client and its option list. .PP +Also, each line may have one or more specifications for default options +after the path name, in the form of a dash ("\-") followed by an option +list. The option list is used for all subsequent exports on that line +only. +.PP Blank lines are ignored. A pound sign ("#") introduces a comment to the end of the line. Entries may be continued across newlines using a backslash. If an export name contains spaces it should be quoted using @@ -499,6 +504,7 @@ is supposedly that of user joe). /usr *.local.domain(ro) @trusted(rw) /home/joe pc001(rw,all_squash,anonuid=150,anongid=100) /pub (ro,insecure,all_squash) +/srv/www -sync,rw server @trusted @external(ro) '''/pub/private (noaccess) .fi .PP @@ -512,6 +518,9 @@ under the nobody account. The .I insecure option in this entry also allows clients with NFS implementations that don't use a reserved port for NFS. +The sixth line exports a directory read-write to the machine 'server' +as well as the `@trusted' netgroup, and read-only to netgroup `@external', +all three mounts with the `sync' option enabled. ''' The last line denies all NFS clients '''access to the private directory. '''.SH CAVEATS |