NFS Services Administrator's Guide (B.11.31.03) August 2008
share -F nfs directory_name
2. Enter the following command to verify if your filesystem is shared:
share
An output similar to the following output is displayed:
/tmp rw=hpdfs001.cup.hp.com ““
/mail rw ““
/var rw ““
The directory that you have shared must be present in this list.
For more information on the share command and a list of share options, see
share_nfs(1M) and share(1M).
Examples for Sharing directories
This section discusses different examples for sharing directories.
• Sharing a directory with read-only access
share -F nfs -o ro /tmp
In this example, all clients are allowed read-only access to the /tmp directory. The
/tmp directory needs to be configured to allow read access to users on the clients.
For example, specify -r--r--r-- permissions for the /tmp directory.
• Sharing a directory with varying access permissions
share -F nfs -o ro=Jan:Feb,rw=Mar /usr/kc
In this example, the /usr/kc directory is shared with clients Jan, Feb, and Mar.
The rw option specifies that users on client Mar have read-write access to the
/usr/kc directory. The ro option specifies that users on Jan and Feb have
read-only access.
In addition to the share options, the HP-UX permissions for the /usr/kc directory
must be set to allow access to all users or group that includes the users on Jan,
Feb, and Mar.
• Sharing a directory with root access for clients
share -F nfs -o root=Red:Blue:Green /var/mail
In this example, the /var/mail directory is shared. Root access is allowed for
clients Red, Blue, and Green. Superusers on all other clients are considered as
unknown by the NFS server, and are given the access privileges of an anonymous
user. Non-superusers on all clients are allowed read-write access to the /var/mail
directory if the HP-UX permissions on the /var/mail directory allow them
read-write access.
• Sharing a directory with root access for superuser and read-write access for other
users
share -F nfs -o rw=Red,root=Red /var/mail/Red
34 Configuring and Administering NFS Services