Copyright (c) 2000 Sun Microsystems, Inc. All Rights Reserved
Copyright 1989 AT&T
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
share [-p] [-F FSType] [-o specific_options] [-d description] [pathname]
The share command exports, or makes a resource available for mounting, through a remote file system of type FSType. If the option -F FSType is omitted, the first file system type listed in /etc/dfs/fstypes is used as default. For a description of NFS specific options, see share_nfs(1M). pathname is the pathname of the directory to be shared. When invoked with no arguments, share displays all shared file systems.
The -d flag may be used to provide a description of the resource being shared.
Specify the filesystem type.
The specific_options are used to control access of the shared resource. (See share_nfs(1M) for the NFS specific options.) They may be any of the following: rwrw=client[:client]... ro
pathname is shared read-only to all clients.
pathname is shared read-only only to the listed clients. No other systems can access pathname.
Causes the share operation to persist across reboots.
Example 1 Sharing a Read-Only Filesystem
This line will share the /disk file system read-only at boot time.
share -F nfs -o ro /disk
Example 2 Invoking Multiple Options
List of share commands to be executed at boot time. Note that you can invoke share from a command line and use the -p option, described above, as an alternative to editing this file.
List of file system types; NFS is the default.
System record of shared file systems.
mountd(1M), nfsd(1M), share_nfs(1M), shareall(1M), unshare(1M), attributes(5)
If share commands are invoked multiple times on the same filesystem, the last share invocation supersedes the previous\(emthe options set by the last share command replace the old options. For example, if read-write permission was given to usera on /somefs, then to give read-write permission also to userb on /somefs:
example% share -F nfs -o rw=usera:userb /somefs
This behavior is not limited to sharing the root filesystem, but applies to all filesystems.