sharesec: Document --view-all
[Samba.git] / docs-xml / manpages / sharesec.1.xml
blobb98340816dde8234bda29513ffdc9442d6586a00
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="sharesec.1">
5 <refmeta>
6         <refentrytitle>sharesec</refentrytitle>
7         <manvolnum>1</manvolnum>
8         <refmiscinfo class="source">Samba</refmiscinfo>
9         <refmiscinfo class="manual">User Commands</refmiscinfo>
10         <refmiscinfo class="version">4.0</refmiscinfo>
11 </refmeta>
14 <refnamediv>
15         <refname>sharesec</refname>
16         <refpurpose>Set or get share ACLs</refpurpose>
17 </refnamediv>
19 <refsynopsisdiv>
20         <cmdsynopsis>
21                 <command>sharesec</command>
22                 <arg choice="req">sharename</arg>
23                 <arg choice="opt">-r, --remove=ACL</arg>
24                 <arg choice="opt">-m, --modify=ACL</arg>
25                 <arg choice="opt">-a, --add=ACL</arg>
26                 <arg choice="opt">-R, --replace=ACLs</arg>
27                 <arg choice="opt">-D, --delete</arg>
28                 <arg choice="opt">-v, --view</arg>
29                 <arg choice="opt">--view-all</arg>
30                 <arg choice="opt">-M, --machine-sid</arg>
31                 <arg choice="opt">-F, --force</arg>
32                 <arg choice="opt">-d, --debuglevel=DEBUGLEVEL</arg>
33                 <arg choice="opt">-s, --configfile=CONFIGFILE</arg>
34                 <arg choice="opt">-l, --log-basename=LOGFILEBASE</arg>
35                 <arg choice="opt">-V, --version</arg>
36                 <arg choice="opt">-?, --help</arg>
37                 <arg choice="opt">--usage</arg>
38         </cmdsynopsis>
39 </refsynopsisdiv>
41 <refsect1>
42         <title>DESCRIPTION</title>
44         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
45         <manvolnum>7</manvolnum></citerefentry> suite.</para>
47         <para>The <command>sharesec</command> program manipulates share permissions
48         on SMB file shares.</para>
49 </refsect1>
52 <refsect1>
53         <title>OPTIONS</title>
55         <para>The following options are available to the <command>sharesec</command> program.
56         The format of ACLs is described in the section ACL FORMAT </para>
58         <variablelist>
59                 <varlistentry>
60                 <term>-a|--add=ACL</term>
61                 <listitem><para>Add the ACEs specified to the ACL list.
62                 </para></listitem>
63                 </varlistentry>
65                 <varlistentry>
66                 <term>-D|--delete</term>
67                 <listitem><para>Delete the entire security descriptor.
68                 </para></listitem>
69                 </varlistentry>
71                 <varlistentry>
72                 <term>-F|--force</term>
73                 <listitem><para>Force storing the ACL.
74                 </para></listitem>
75                 </varlistentry>
77                 <varlistentry>
78                 <term>-m|--modify=ACL</term>
79                 <listitem><para>Modify existing ACEs.
80                 </para></listitem>
81                 </varlistentry>
83                 <varlistentry>
84                 <term>-M|--machine-sid</term>
85                 <listitem><para>Initialize the machine SID.
86                 </para></listitem>
87                 </varlistentry>
89                 <varlistentry>
90                 <term>-r|--remove=ACL</term>
91                 <listitem><para>Remove ACEs.
92                 </para></listitem>
93                 </varlistentry>
95                 <varlistentry>
96                 <term>-R|--replace=ACLS</term>
97                 <listitem><para>
98                 Overwrite an existing share permission ACL.
99                 </para></listitem>
100                 </varlistentry>
102                 <varlistentry>
103                 <term>-v|--view</term>
104                 <listitem><para>
105                 List a share acl
106                 </para></listitem>
107                 </varlistentry>
109                 <varlistentry>
110                 <term>--view-all</term>
111                 <listitem><para>
112                 List all share acls
113                 </para></listitem>
114                 </varlistentry>
116                 &stdarg.help;
117                 &stdarg.server.debug;
118                 &popt.common.samba;
119         </variablelist>
120 </refsect1>
123 <refsect1>
124         <title>ACL FORMAT</title>
126         <para>The format of an ACL is one or more ACL entries separated by
127         either commas or newlines.  An ACL entry is one of the following: </para>
129         <para><programlisting>
130         REVISION:&lt;revision number&gt;
131         OWNER:&lt;sid or name&gt;
132         GROUP:&lt;sid or name&gt;
133         ACL:&lt;sid or name&gt;:&lt;type&gt;/&lt;flags&gt;/&lt;mask&gt;
134         </programlisting></para>
136         <para>The revision of the ACL specifies the internal Windows
137         NT ACL revision for the security descriptor.
138         If not specified it defaults to 1. Using values other than 1 may
139         cause strange behaviour.</para>
141         <para>The owner and group specify the owner and group SIDs for the
142         object. If a SID in the format S-1-x-y-z is specified this is used,
143         otherwise the name specified is resolved using the server on which
144         the file or directory resides.</para>
146         <para>ACLs specify permissions granted to the SID. This SID
147         can be specified in S-1-x-y-z format or as a name in which case
148         it is resolved against the server on which the file or directory
149         resides.  The type, flags and mask values determine the type of
150         access granted to the SID.</para>
152         <para>The type can be either ALLOWED or DENIED to allow/deny access
153         to the SID. The flags values are generally zero for share ACLs.
154         </para>
156         <para>The mask is a value which expresses the access right
157         granted to the SID. It can be given as a decimal or hexadecimal value,
158         or by using one of the following text strings which map to the NT
159         file permissions of the same name.</para>
161         <itemizedlist>
162                 <listitem><para><emphasis>R</emphasis> - Allow read access </para></listitem>
163                 <listitem><para><emphasis>W</emphasis> - Allow write access</para></listitem>
164                 <listitem><para><emphasis>X</emphasis> - Execute permission on the object</para></listitem>
165                 <listitem><para><emphasis>D</emphasis> - Delete the object</para></listitem>
166                 <listitem><para><emphasis>P</emphasis> - Change permissions</para></listitem>
167                 <listitem><para><emphasis>O</emphasis> - Take ownership</para></listitem>
168         </itemizedlist>
170         <para>The following combined permissions can be specified:</para>
172         <itemizedlist>
173                 <listitem><para><emphasis>READ</emphasis> -  Equivalent to 'RX'
174                 permissions</para></listitem>
175                 <listitem><para><emphasis>CHANGE</emphasis> - Equivalent to 'RXWD' permissions
176                 </para></listitem>
177                 <listitem><para><emphasis>FULL</emphasis> - Equivalent to 'RWXDPO'
178                 permissions</para></listitem>
179         </itemizedlist>
180         </refsect1>
182 <refsect1>
183         <title>EXIT STATUS</title>
185         <para>The <command>sharesec</command> program sets the exit status
186         depending on the success or otherwise of the operations performed.
187         The exit status may be one of the following values. </para>
189         <para>If the operation succeeded, sharesec returns and exit
190         status of 0.  If <command>sharesec</command> couldn't connect to the specified server,
191         or there was an error getting or setting the ACLs, an exit status
192         of 1 is returned.  If there was an error parsing any command line
193         arguments, an exit status of 2 is returned. </para>
194 </refsect1>
196 <refsect1>
197         <title>EXAMPLES</title>
199         <para>Add full access for SID
200         <parameter>S-1-5-21-1866488690-1365729215-3963860297-17724</parameter> on
201         <parameter>share</parameter>:
202         </para>
204         <programlisting>
205         host:~ # sharesec share -a S-1-5-21-1866488690-1365729215-3963860297-17724:ALLOWED/0/FULL
206         </programlisting>
208         <para>List all ACEs for <parameter>share</parameter>:
209         </para>
211         <programlisting>
212         host:~ # sharesec share -v
213         REVISION:1
214         OWNER:(NULL SID)
215         GROUP:(NULL SID)
216         ACL:S-1-1-0:ALLOWED/0/0x101f01ff
217         ACL:S-1-5-21-1866488690-1365729215-3963860297-17724:ALLOWED/0/FULL
218         </programlisting>
219 </refsect1>
221 <refsect1>
222         <title>VERSION</title>
224         <para>This man page is correct for version 3 of the Samba suite.</para>
225 </refsect1>
227 <refsect1>
228         <title>AUTHOR</title>
229         <para>The original Samba software and related utilities
230         were created by Andrew Tridgell. Samba is now developed
231         by the Samba Team as an Open Source project similar
232         to the way the Linux kernel is developed.</para>
233 </refsect1>
235 </refentry>