Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

share - Make local resources available for client access

&pagelevel(4)&pagelevel

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]

-F nfs

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.

-o specific_options

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.

-d description

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.

pathname

Path name of the resource to be made available.


The following specific_options can be specified after -o:

rw

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.

ro

Makes the resource available for read-only access.

rw=client[:client]...

Makes the resource available for read and write access to the listed clients. This specification overrides the sub option ro for individual clients.

ro=client[:client]...

Makes the resource available for read-only access to the listed clients. This specification overrides the sub option rw for individual clients.

anon=uid

NFS client processes with the user ID 0 (root) will access the shared resource with the effective user ID uid.  The default value is UID_NOBODY (60001). Exceptions do apply to those client computers listet in the "root=..." option.

If uid is set to -1, access to this resource is denied.

root=host[:host]...

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:

bs2anon=bs2000_uid
bs2conv
bs2nameconv

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