man: remove SunOS 4.x references
[unleashed.git] / share / man / man8 / share.8
blobb15edfcf485e5ccead8653cb3a2eeb6eeb50da20
1 '\" te
2 .\" Copyright (c) 2000 Sun Microsystems, Inc. All Rights Reserved
3 .\" Copyright 1989 AT&T
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH SHARE 8 "Jan 23, 2007"
8 .SH NAME
9 share \- make local resource available for mounting by remote systems
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBshare\fR [\fB-p\fR] [\fB-F\fR \fIFSType\fR] [\fB-o\fR \fIspecific_options\fR] [\fB-d\fR \fIdescription\fR]
14      [\fIpathname\fR]
15 .fi
17 .SH DESCRIPTION
18 .sp
19 .LP
20 The \fBshare\fR command exports, or makes a resource available for mounting,
21 through a remote file system of type \fIFSType\fR. If the option \fB-F\fR
22 \fIFSType\fR is omitted, the first file system type listed in
23 \fB/etc/dfs/fstypes\fR is used as default. For a description of NFS specific
24 options, see \fBshare_nfs\fR(8). \fIpathname\fR is the pathname of the
25 directory to be shared. When invoked with no arguments, \fBshare\fR displays
26 all shared file systems.
27 .SH OPTIONS
28 .sp
29 .ne 2
30 .na
31 \fB\fB-d\fR \fIdescription\fR\fR
32 .ad
33 .sp .6
34 .RS 4n
35 The \fB-d\fR flag may be used to provide a description of the resource being
36 shared.
37 .RE
39 .sp
40 .ne 2
41 .na
42 \fB\fB-F\fR \fIFSType\fR\fR
43 .ad
44 .sp .6
45 .RS 4n
46 Specify the filesystem type.
47 .RE
49 .sp
50 .ne 2
51 .na
52 \fB\fB-o\fR \fIspecific_options\fR\fR
53 .ad
54 .sp .6
55 .RS 4n
56 The \fIspecific_options\fR are used to control access of the shared resource.
57 (See \fBshare_nfs\fR(8) for the NFS specific options.) They may be any of the
58 following:
59 .sp
60 .ne 2
61 .na
62 \fB\fBrw\fR\fR
63 .ad
64 .sp .6
65 .RS 4n
66 \fIpathname\fR is shared read/write to all clients. This is also the default
67 behavior.
68 .RE
70 .sp
71 .ne 2
72 .na
73 \fB\fBrw=\fR\fIclient\fR[\fI:client\fR]...\fR
74 .ad
75 .sp .6
76 .RS 4n
77 \fIpathname\fR is shared read/write only to the listed clients. No other
78 systems can access \fIpathname\fR.
79 .RE
81 .sp
82 .ne 2
83 .na
84 \fB\fBro\fR\fR
85 .ad
86 .sp .6
87 .RS 4n
88 \fIpathname\fR is shared read-only to all clients.
89 .RE
91 .sp
92 .ne 2
93 .na
94 \fB\fBro=\fR\fIclient\fR[\fI:client\fR]...\fR
95 .ad
96 .sp .6
97 .RS 4n
98 \fIpathname\fR is shared read-only only to the listed clients. No other systems
99 can access \fIpathname\fR.
102 Separate multiple options with commas. Separate multiple operands for an option
103 with colons. See EXAMPLES.
107 .ne 2
109 \fB\fB-p\fR\fR
111 .sp .6
112 .RS 4n
113 Causes the share operation to persist across reboots.
116 .SH EXAMPLES
118 \fBExample 1 \fRSharing a Read-Only Filesystem
121 This line will share the \fB/disk\fR file system read-only at boot time.
124 .in +2
126 \fBshare\fR \fB-F\fR\fB nfs \fR\fB-o\fR \fBro /disk\fR
128 .in -2
132 \fBExample 2 \fRInvoking Multiple Options
135 The following command shares the filesystem \fB/export/manuals\fR, with members
136 of the netgroup having read-only access and users on the specified host having
137 read-write access.
140 .in +2
142 share \fB-F\fR nfs \fB-o\fR ro=\fInetgroup_name\fR,rw=\fIhost1\fR:\fIhost2\fR:\fIhost3\fR /export/manuals
144 .in -2
147 .SH FILES
149 .ne 2
151 \fB\fB/etc/dfs/dfstab\fR\fR
153 .sp .6
154 .RS 4n
155 List of \fBshare\fR commands to be executed at boot time. Note that you can
156 invoke \fBshare\fR from a command line and use the \fB-p\fR option, described
157 above, as an alternative to editing this file.
161 .ne 2
163 \fB\fB/etc/dfs/fstypes\fR\fR
165 .sp .6
166 .RS 4n
167 List of file system types; NFS is the default.
171 .ne 2
173 \fB\fB/etc/dfs/sharetab\fR\fR
175 .sp .6
176 .RS 4n
177 System record of shared file systems.
180 .SH SEE ALSO
183 \fBmountd\fR(8), \fBnfsd\fR(8), \fBshare_nfs\fR(8), \fBshareall\fR(8),
184 \fBunshare\fR(8), \fBattributes\fR(5)
185 .SH NOTES
188 If \fBshare\fR commands are invoked multiple times on the same filesystem, the
189 last \fBshare\fR invocation supersedes the previous\(emthe options set by the
190 last \fBshare\fR command replace the old options. For example, if read-write
191 permission was given to \fBusera\fR on \fB/somefs\fR, then to give read-write
192 permission also to \fBuserb\fR on \fB/somefs\fR:
195 \fBexample% share -F nfs -o rw=usera:userb /somefs\fR
198 This behavior is not limited to sharing the root filesystem, but applies to all
199 filesystems.