The share command makes local resources available for remote client access.
If the command is entered without options, all resources which are currently made available by your system are listed.
Syntax
share[ -F nfs][ -o specific_options][ -d description][ pathname] |
Specifies that a resource of the file system type nfs is to be made available. Because no other file system types for distributed file usage are supported in POSIX, this option may be omitted. |
A list of file system specific options which can be specified after -o. The individual options in the list are separated by commas, and are described below. |
A text enclosed in quotes which can be used to furnish clients with comments concerning usage of the resource. The text may not contain special characters and must not exceed 32 characters in length. |
Path name of the resource to be made available. |
The following specific_options can be specified after -o:
Makes the resource available for read and write access. This option is the default, i.e. if no specific_options are specified, read/write access is granted to all clients. |
Makes the resource available for read-only access. |
Makes the resource available for read and write access to the listed clients. This specification overrides the sub option ro for individual clients. |
Makes the resource available for read-only access to the listed clients. This specification overrides the sub option rw for individual clients. |
NFS client processes with the user ID 0 (root) will access the shared resource with the effective user ID uid. The default value is If uid is set to -1, access to this resource is denied. |
Specifies that NFS client processes with user ID 0 (root) from the specified hosts are also allowed to access the shared resource with root privileges. By default, no host is granted root privileges. |
When sharing bs2fs resources, the following additional specific_options can be specified after -o:
For detailed information, refer to the manual "POSIX BS2000 file system bs2fs". |
The command will not be executed if conflicting access rights are defined for a client. This is the case, for example, if the same client name is specified both after ro= and also after rw=, or if the options ro and rw are specified together and without arguments.
Files
/etc/dfs/fstypes Table of installed utilities for distributed file systems |
/etc/dfs/sharetab Table of shared resources |
Examples
Example 1:
You want to make available the directory /usr/reports/mtgmemos for client access via NFS. The directory is to be made available for all clients with read-only access.
$ share -F nfs -o ro -d "MEMOS on project X" /usr/reports/mtgmemos
Example 2:
You want to make available the directory /export/graphics for client access via NFS. All clients should have read-only access, only the client "art.dept" gets read and write permissions.
$ share -F nfs -o ro,rw=art.dept /export/graphics