Starting with the Solaris 2.6 release, by default all file systems that are available for NFS mounting are automatically available for WebNFS access. The only condition that requires the use of this procedure is one of the following:
To allow NFS mounting on a server that does not already allow NFS mounting
To reset the public file handle to shorten NFS URLs by using the public option
To force the loading of a specific HTML file by using the index option
See Planning for WebNFS Access for a list of issues to consider before starting the WebNFS service.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
Add entries for each file system to be shared by using the WebNFS service.
Edit /etc/dfs/dfstab. Add one entry to the file for every file system. The public and index tags that are shown in the following example are optional.
share -F nfs -o ro,public,index=index.html /export/ftp |
See the dfstab(4) man page for a description of /etc/dfs/dfstab and the share_nfs(1M) man page for a complete list of options.
Share the file system.
After the entry is in /etc/dfs/dfstab, you can share the file system by either rebooting the system or by using the shareall command.
# shareall |
Verify that the information is correct.
Run the share command to check that the correct options are listed:
# share - /export/share/man ro "" - /usr/src rw=eng "" - /export/ftp ro,public,index=index.html "" |