HP-UX Reference (11i v3 07/02) - 1M System Administration Commands N-Z (vol 4)
s
share_nfs(1M) share_nfs(1M)
clients using more secure modes get stronger access than clients using less secure modes.
If rw=, and ro= options are specified in the same
sec= clause, and a client is in both lists, the order of the
two options determines the access the client gets. If client
hosta is in two netgroups - group1 and
group2- in this example, the client would get read-only access:
share -F nfs -o ro=group1,rw=group2 /var
In this example hosta would get read-write access:
share -F nfs -o rw=group2,ro=group1 /var
If within a sec= clause, both the ro
and rw= options are specified, for compatibility, the order of the
options rule is not enforced. All hosts would get read-only access, with the exception to those in the read-
write list. Likewise, if the
ro= and rw
options are specified, all hosts get read-write access with the excep-
tions of those in the read-only list.
The
ro= and rw= options are guaranteed to work over UDP and TCP but may not work over other tran-
sport providers.
The root= option with AUTH_SYS is guaranteed to work over UDP and TCP but may not work over
other transport providers.
The root= option with AUTH_DES is guaranteed to work over any transport provider.
There are no interactions between the root= option and the rw, ro, rw=, and
ro= options. Putting a
host in the
root list does not override the semantics of the other options. The access the host gets is the
same as when the root= options is absent. For example, the following share command will deny access
to
hostb:
share -F nfs -o ro=hosta,root=hostb /var
The following will give read-only permissions to hostb:
share -F nfs -o ro=hostb,root=hostb /var
The following will give read-write permissions to hostb:
share -F nfs -o ro=hosta,rw=hostb,root=hostb /var
If the file system being shared is a symbolic link to a valid pathname, the canonical path (the path which
the symbolic link follows) will be shared. For example, if /export/foo is a symbolic link to
/export/bar (/export/foo -> /export/bar ), the following share command will result in
/export/bar as the shared pathname (and not /export/foo ).
example# share -F nfs /export/foo
Note that an NFS mount of server:/export/foo
will result in server:/export/bar really
being mounted.
This line in the
/etc/dfs/dfstab
file will share the /disk file system read-only at boot time:
share -F nfs -o ro /disk
Note that the same command entered from the command line will not share the /disk file system unless
there is at least one file system entry in the
/etc/dfs/dfstab file.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
FILES
/etc/dfs/fstypes list of distributed file system types, NFS by default
/etc/dfs/sharetab system record of shared file systems
/etc/nfs/nfslogtab system record of logged file systems
/etc/nfs/nfslog.conf logging configuration file
AUTHOR
share_nfs was developed by Sun Microsystems, Inc.
380 Hewlett-Packard Company − 4 − HP-UX 11i Version 3: February 2007