samba-tool: Fix enum values in dns.py
[Samba.git] / docs-xml / manpages / smbcacls.1.xml
blobe073b4c3e2d7c8efd62f53574bfaf45ec18564dd
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="smbcacls.1">
5 <refmeta>
6         <refentrytitle>smbcacls</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>smbcacls</refname>
16         <refpurpose>Set or get ACLs on an NT file or directory names</refpurpose>
17 </refnamediv>
19 <refsynopsisdiv>
20         <cmdsynopsis>
21                 <command>smbcacls</command>
22                 <arg choice="req">//server/share</arg>
23                 <arg choice="req">/filename</arg>
24                 <arg choice="opt">-D|--delete acls</arg>
25                 <arg choice="opt">-M|--modify acls</arg>
26                 <arg choice="opt">-a|--add acls</arg>
27                 <arg choice="opt">-S|--set acls</arg>
28                 <arg choice="opt">-C|--chown name</arg>
29                 <arg choice="opt">-G|--chgrp name</arg>
30                 <arg choice="opt">-I allow|romove|copy</arg>
31                 <arg choice="opt">--numeric</arg>
32                 <arg choice="opt">-t</arg>
33                 <arg choice="opt">-U username</arg>
34                 <arg choice="opt">-d</arg>
35                 <arg choice="opt">-e</arg>
36                 <arg choice="opt">-m|--max-protocol LEVEL</arg>
37                 <arg choice="opt">--query-security-info FLAGS</arg>
38                 <arg choice="opt">--set-security-info FLAGS</arg>
39                 <arg choice="opt">--sddl</arg>
40                 <arg choice="opt">--domain-sid SID</arg>
41         </cmdsynopsis>
42 </refsynopsisdiv>
44 <refsect1>
45         <title>DESCRIPTION</title>
47         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
48         <manvolnum>7</manvolnum></citerefentry> suite.</para>
50         <para>The <command>smbcacls</command> program manipulates NT Access Control
51         Lists (ACLs) on SMB file shares. </para>
52 </refsect1>
55 <refsect1>
56         <title>OPTIONS</title>
58         <para>The following options are available to the <command>smbcacls</command> program.  
59         The format of ACLs is described in the section ACL FORMAT </para>
62         <variablelist>
63                 <varlistentry>
64                 <term>-a|--add acls</term>
65                 <listitem><para>Add the ACLs specified to the ACL list.  Existing 
66                 access control entries are unchanged. </para></listitem>
67                 </varlistentry>
68                 
69                 
70                 
71                 <varlistentry>
72                 <term>-M|--modify acls</term>
73                 <listitem><para>Modify the mask value (permissions) for the ACLs 
74                 specified on the command line.  An error will be printed for each 
75                 ACL specified that was not already present in the ACL list
76                 </para></listitem>
77                 </varlistentry>
78                 
79                 
80                 
81                 <varlistentry>
82                 <term>-D|--delete acls</term>
83                 <listitem><para>Delete any ACLs specified on the command line.  
84                 An error will be printed for each ACL specified that was not 
85                 already present in the ACL list. </para></listitem>
86                 </varlistentry>
87                 
88                 
89                 
90                 <varlistentry>
91                 <term>-S|--set acls</term>
92                 <listitem><para>This command sets the ACLs on the file with 
93                 only the ones specified on the command line.  All other ACLs are 
94                 erased. Note that the ACL specified must contain at least a revision,
95                 type, owner and group for the call to succeed. </para></listitem>
96                 </varlistentry>
97                 
98                 
99                 
100                 <varlistentry>
101                 <term>-C|--chown name</term>
102                 <listitem><para>The owner of a file or directory can be changed 
103                 to the name given using the <parameter>-C</parameter> option.  
104                 The name can be a sid in the form S-1-x-y-z or a name resolved 
105                 against the server specified in the first argument. </para>
106                 
107                 <para>This command is a shortcut for -M OWNER:name. 
108                 </para></listitem>
109                 </varlistentry>
110                 
111                 
112                 
113                 <varlistentry>
114                 <term>-G|--chgrp name</term>
115                 <listitem><para>The group owner of a file or directory can 
116                 be changed to the name given using the <parameter>-G</parameter> 
117                 option.  The name can be a sid in the form S-1-x-y-z or a name 
118                 resolved against the server specified n the first argument.
119                 </para>
120                 
121                 <para>This command is a shortcut for -M GROUP:name.</para></listitem>
122                 </varlistentry>
123                 
124                 
125                 
126                 <varlistentry>
127                 <term>-I|--inherit allow|remove|copy</term>
128                 <listitem><para>Set or unset the windows "Allow inheritable
129                 permissions" check box using the <parameter>-I</parameter>
130                 option.  To set the check box pass allow. To unset the check
131                 box pass either remove or copy. Remove will remove all
132                 inherited acls. Copy will copy all the inherited acls.
133                 </para></listitem>
135                 </varlistentry>
139                 <varlistentry>
140                 <term>--numeric</term>
141                 <listitem><para>This option displays all ACL information in numeric 
142                 format.  The default is to convert SIDs to names and ACE types 
143                 and masks to a readable string format.  </para></listitem>
144                 </varlistentry>
145                 
146                 <varlistentry>
147                 <term>-m|--max-protocol PROTOCOL_NAME</term>
148                 <listitem><para>This allows the user to select the
149                 highest SMB protocol level that smbcacls will use to
150                 connect to the server. By default this is set to
151                 NT1, which is the highest available SMB1 protocol.
152                 To connect using SMB2 or SMB3 protocol, use the
153                 strings SMB2 or SMB3 respectively. Note that to connect
154                 to a Windows 2012 server with encrypted transport selecting
155                 a max-protocol of SMB3 is required.
156                 </para></listitem>
157                 </varlistentry>
159                 <varlistentry>
160                 <term>-t|--test-args</term>
161                 <listitem><para>
162                 Don't actually do anything, only validate the correctness of 
163                 the arguments.
164                 </para></listitem>
165                 </varlistentry>
167                 <varlistentry>
168                 <term>--query-security-info FLAGS</term>
169                 <listitem><para>The security-info flags for queries.
170                 </para></listitem>
171                 </varlistentry>
173                 <varlistentry>
174                 <term>--set-security-info FLAGS</term>
175                 <listitem><para>The security-info flags for queries.
176                 </para></listitem>
177                 </varlistentry>
179                 <varlistentry>
180                 <term>--sddl</term>
181                 <listitem><para>Output and input acls in sddl format.
182                 </para></listitem>
183                 </varlistentry>
185                 <varlistentry>
186                 <term>--domain-sid SID</term>
187                 <listitem><para>SID used for sddl processing.
188                 </para></listitem>
189                 </varlistentry>
191                 &stdarg.server.debug;
192                 &popt.common.samba;
193                 &popt.common.credentials;
194                 &popt.common.connection;
195                 &popt.autohelp;
196         </variablelist>
197 </refsect1>
200 <refsect1>
201         <title>ACL FORMAT</title>
203         <para>The format of an ACL is one or more ACL entries separated by 
204         either commas or newlines.  An ACL entry is one of the following: </para>
206 <para><programlisting> 
207 REVISION:&lt;revision number&gt;
208 OWNER:&lt;sid or name&gt;
209 GROUP:&lt;sid or name&gt;
210 ACL:&lt;sid or name&gt;:&lt;type&gt;/&lt;flags&gt;/&lt;mask&gt;
211 </programlisting></para>
212   
214         <para>The revision of the ACL specifies the internal Windows 
215         NT ACL revision for the security descriptor.  
216         If not specified it defaults to 1.  Using values other than 1 may 
217         cause strange behaviour. </para>
219         <para>The owner and group specify the owner and group sids for the 
220         object.  If a SID in the format S-1-x-y-z is specified this is used, 
221         otherwise the name specified is resolved using the server on which 
222         the file or directory resides. </para>
224         <para>ACLs specify permissions granted to the SID.  This SID again 
225         can be specified in S-1-x-y-z format or as a name in which case 
226         it is resolved against the server on which the file or directory 
227         resides.  The type, flags and mask values determine the type of 
228         access granted to the SID. </para>
230         <para>The type can be either ALLOWED or DENIED to allow/deny access 
231         to the SID. The flags values are generally zero for file ACLs and 
232         either 9 or 2 for directory ACLs.  Some common flags are: </para>
234         <itemizedlist> 
235                 <listitem><para><constant>#define SEC_ACE_FLAG_OBJECT_INHERIT           0x1</constant></para></listitem>
236                 <listitem><para><constant>#define SEC_ACE_FLAG_CONTAINER_INHERIT        0x2</constant></para></listitem>
237                 <listitem><para><constant>#define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT     0x4</constant></para></listitem>
238                 <listitem><para><constant>#define SEC_ACE_FLAG_INHERIT_ONLY             0x8</constant></para></listitem>
239         </itemizedlist>
240   
241         <para>At present flags can only be specified as decimal or 
242         hexadecimal values.</para>
244         <para>The mask is a value which expresses the access right 
245         granted to the SID. It can be given as a decimal or hexadecimal value, 
246         or by using one of the following text strings which map to the NT 
247         file permissions of the same name. </para>
249         <itemizedlist>
250                 <listitem><para><emphasis>R</emphasis> - Allow read access </para></listitem>
251                 <listitem><para><emphasis>W</emphasis> - Allow write access</para></listitem>
252                 <listitem><para><emphasis>X</emphasis> - Execute permission on the object</para></listitem>
253                 <listitem><para><emphasis>D</emphasis> - Delete the object</para></listitem>
254                 <listitem><para><emphasis>P</emphasis> - Change permissions</para></listitem>
255                 <listitem><para><emphasis>O</emphasis> - Take ownership</para></listitem>
256         </itemizedlist>
259         <para>The following combined permissions can be specified:</para>
262         <itemizedlist>
263                 <listitem><para><emphasis>READ</emphasis> -  Equivalent to 'RX'
264                 permissions</para></listitem>
265                 <listitem><para><emphasis>CHANGE</emphasis> - Equivalent to 'RXWD' permissions
266                 </para></listitem>
267                 <listitem><para><emphasis>FULL</emphasis> - Equivalent to 'RWXDPO' 
268                 permissions</para></listitem>
269         </itemizedlist>
270         </refsect1>
272 <refsect1>
273         <title>EXIT STATUS</title>
275         <para>The <command>smbcacls</command> program sets the exit status 
276         depending on the success or otherwise of the operations performed.  
277         The exit status may be one of the following values. </para>
279         <para>If the operation succeeded, smbcacls returns and exit 
280         status of 0.  If <command>smbcacls</command> couldn't connect to the specified server, 
281         or there was an error getting or setting the ACLs, an exit status 
282         of 1 is returned.  If there was an error parsing any command line 
283         arguments, an exit status of 2 is returned. </para>
284 </refsect1>
286 <refsect1>
287         <title>VERSION</title>
289         <para>This man page is correct for version 3 of the Samba suite.</para>
290 </refsect1>
292 <refsect1>
293         <title>AUTHOR</title>
294         
295         <para>The original Samba software and related utilities 
296         were created by Andrew Tridgell. Samba is now developed
297         by the Samba Team as an Open Source project similar 
298         to the way the Linux kernel is developed.</para>
299         
300         <para><command>smbcacls</command> was written by Andrew Tridgell 
301         and Tim Potter.</para>
302         
303         <para>The conversion to DocBook for Samba 2.2 was done 
304         by Gerald Carter. The conversion to DocBook XML 4.2 for Samba 3.0 was done
305         by Alexander Bokovoy.</para>
306 </refsect1>
308 </refentry>