I can't spell "choice". Twice.
[import/samba-docs-svnimport.git] / manpages-3 / smbcacls.1.xml
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">
4
5 <refmeta>
6         <refentrytitle>smbcacls</refentrytitle>
7         <manvolnum>1</manvolnum>
8 </refmeta>
9
10
11 <refnamediv>
12         <refname>smbcacls</refname>
13         <refpurpose>Set or get ACLs on an NT file or directory names</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17         <cmdsynopsis>
18                 <command>smbcacls</command>
19                 <arg choice="req">//server/share</arg>
20                 <arg choice="req">filename</arg>
21                 <arg choice="opt">-D acls</arg>
22                 <arg choice="opt">-M acls</arg>
23                 <arg choice="opt">-a acls</arg>
24                 <arg choice="opt">-S acls</arg>
25                 <arg choice="opt">-C name</arg>
26                 <arg choice="opt">-G name</arg>
27                 <arg choice="opt">--numeric</arg>
28                 <arg choice="opt">-t</arg>
29                 <arg choice="opt">-U username</arg>
30                 <arg choice="opt">-h</arg>
31                 <arg choice="opt">-d</arg>
32         </cmdsynopsis>
33 </refsynopsisdiv>
34
35 <refsect1>
36         <title>DESCRIPTION</title>
37
38         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
39         <manvolnum>7</manvolnum></citerefentry> suite.</para>
40
41         <para>The <command>smbcacls</command> program manipulates NT Access Control
42         Lists (ACLs) on SMB file shares. </para>
43 </refsect1>
44
45
46 <refsect1>
47         <title>OPTIONS</title>
48
49         <para>The following options are available to the <command>smbcacls</command> program.  
50         The format of ACLs is described in the section ACL FORMAT </para>
51
52
53         <variablelist>
54                 <varlistentry>
55                 <term>-a acls</term>
56                 <listitem><para>Add the ACLs specified to the ACL list.  Existing 
57                 access control entries are unchanged. </para></listitem>
58                 </varlistentry>
59                 
60                 
61                 
62                 <varlistentry>
63                 <term>-M acls</term>
64                 <listitem><para>Modify the mask value (permissions) for the ACLs 
65                 specified on the command line.  An error will be printed for each 
66                 ACL specified that was not already present in the ACL list
67                 </para></listitem>
68                 </varlistentry>
69                 
70                 
71                 
72                 <varlistentry>
73                 <term>-D acls</term>
74                 <listitem><para>Delete any ACLs specified on the command line.  
75                 An error will be printed for each ACL specified that was not 
76                 already present in the ACL list. </para></listitem>
77                 </varlistentry>
78                 
79                 
80                 
81                 <varlistentry>
82                 <term>-S acls</term>
83                 <listitem><para>This command sets the ACLs on the file with 
84                 only the ones specified on the command line.  All other ACLs are 
85                 erased. Note that the ACL specified must contain at least a revision,
86                 type, owner and group for the call to succeed. </para></listitem>
87                 </varlistentry>
88                 
89                 
90                 
91                 <varlistentry>
92                 <term>-U username</term>
93                 <listitem><para>Specifies a username used to connect to the 
94                 specified service.  The username may be of the form "username" in 
95                 which case the user is prompted to enter in a password and the 
96                 workgroup specified in the <citerefentry><refentrytitle>smb.conf</refentrytitle>
97                 <manvolnum>5</manvolnum></citerefentry> file is 
98                 used, or "username%password"  or "DOMAIN\username%password" and the 
99                 password and workgroup names are used as provided. </para></listitem>
100                 </varlistentry>
101                 
102                 
103                 
104                 <varlistentry>
105                 <term>-C name</term>
106                 <listitem><para>The owner of a file or directory can be changed 
107                 to the name given using the <parameter>-C</parameter> option.  
108                 The name can be a sid in the form S-1-x-y-z or a name resolved 
109                 against the server specified in the first argument. </para>
110                 
111                 <para>This command is a shortcut for -M OWNER:name. 
112                 </para></listitem>
113                 </varlistentry>
114                 
115                 
116                 
117                 <varlistentry>
118                 <term>-G name</term>
119                 <listitem><para>The group owner of a file or directory can 
120                 be changed to the name given using the <parameter>-G</parameter> 
121                 option.  The name can be a sid in the form S-1-x-y-z or a name 
122                 resolved against the server specified n the first argument.
123                 </para>
124                 
125                 <para>This command is a shortcut for -M GROUP:name.</para></listitem>
126                 </varlistentry>
127                 
128                 
129                 
130                 <varlistentry>
131                 <term>--numeric</term>
132                 <listitem><para>This option displays all ACL information in numeric 
133                 format.  The default is to convert SIDs to names and ACE types 
134                 and masks to a readable string format.  </para></listitem>
135                 </varlistentry>
136                 
137                 <varlistentry>
138                 <term>-t</term>
139                 <listitem><para>
140                 Don't actually do anything, only validate the correctness of 
141                 the arguments.
142                 </para></listitem>
143                 </varlistentry>
144                                 
145                 &stdarg.help;
146                 &popt.common.samba;
147         </variablelist>
148 </refsect1>
149
150
151 <refsect1>
152         <title>ACL FORMAT</title>
153
154         <para>The format of an ACL is one or more ACL entries separated by 
155         either commas or newlines.  An ACL entry is one of the following: </para>
156
157 <para><programlisting> 
158 REVISION:&lt;revision number&gt;
159 OWNER:&lt;sid or name&gt;
160 GROUP:&lt;sid or name&gt;
161 ACL:&lt;sid or name&gt;:&lt;type&gt;/&lt;flags&gt;/&lt;mask&gt;
162 </programlisting></para>
163   
164
165         <para>The revision of the ACL specifies the internal Windows 
166         NT ACL revision for the security descriptor.  
167         If not specified it defaults to 1.  Using values other than 1 may 
168         cause strange behaviour. </para>
169
170         <para>The owner and group specify the owner and group sids for the 
171         object.  If a SID in the format S-1-x-y-z is specified this is used, 
172         otherwise the name specified is resolved using the server on which 
173         the file or directory resides. </para>
174
175         <para>ACLs specify permissions granted to the SID.  This SID again 
176         can be specified in S-1-x-y-z format or as a name in which case 
177         it is resolved against the server on which the file or directory 
178         resides.  The type, flags and mask values determine the type of 
179         access granted to the SID. </para>
180
181         <para>The type can be either 0 or 1 corresponding to ALLOWED or 
182         DENIED access to the SID.  The flags values are generally
183         zero for file ACLs and either 9 or 2 for directory ACLs.  Some 
184         common flags are: </para>
185
186         <itemizedlist> 
187                 <listitem><para><constant>#define SEC_ACE_FLAG_OBJECT_INHERIT           0x1</constant></para></listitem>
188                 <listitem><para><constant>#define SEC_ACE_FLAG_CONTAINER_INHERIT        0x2</constant></para></listitem>
189                 <listitem><para><constant>#define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT     0x4</constant></para></listitem>
190                 <listitem><para><constant>#define SEC_ACE_FLAG_INHERIT_ONLY             0x8</constant></para></listitem>
191         </itemizedlist>
192   
193         <para>At present flags can only be specified as decimal or 
194         hexadecimal values.</para>
195  
196         <para>The mask is a value which expresses the access right 
197         granted to the SID. It can be given as a decimal or hexadecimal value, 
198         or by using one of the following text strings which map to the NT 
199         file permissions of the same name. </para>
200
201         <itemizedlist>
202                 <listitem><para><emphasis>R</emphasis> - Allow read access </para></listitem>
203                 <listitem><para><emphasis>W</emphasis> - Allow write access</para></listitem>
204                 <listitem><para><emphasis>X</emphasis> - Execute permission on the object</para></listitem>
205                 <listitem><para><emphasis>D</emphasis> - Delete the object</para></listitem>
206                 <listitem><para><emphasis>P</emphasis> - Change permissions</para></listitem>
207                 <listitem><para><emphasis>O</emphasis> - Take ownership</para></listitem>
208         </itemizedlist>
209
210
211         <para>The following combined permissions can be specified:</para>
212
213
214         <itemizedlist>
215                 <listitem><para><emphasis>READ</emphasis> -  Equivalent to 'RX'
216                 permissions</para></listitem>
217                 <listitem><para><emphasis>CHANGE</emphasis> - Equivalent to 'RXWD' permissions
218                 </para></listitem>
219                 <listitem><para><emphasis>FULL</emphasis> - Equivalent to 'RWXDPO' 
220                 permissions</para></listitem>
221         </itemizedlist>
222         </refsect1>
223
224 <refsect1>
225         <title>EXIT STATUS</title>
226
227         <para>The <command>smbcacls</command> program sets the exit status 
228         depending on the success or otherwise of the operations performed.  
229         The exit status may be one of the following values. </para>
230
231         <para>If the operation succeeded, smbcacls returns and exit 
232         status of 0.  If <command>smbcacls</command> couldn't connect to the specified server, 
233         or there was an error getting or setting the ACLs, an exit status 
234         of 1 is returned.  If there was an error parsing any command line 
235         arguments, an exit status of 2 is returned. </para>
236 </refsect1>
237
238 <refsect1>
239         <title>VERSION</title>
240
241         <para>This man page is correct for version 3.0 of the Samba suite.</para>
242 </refsect1>
243
244 <refsect1>
245         <title>AUTHOR</title>
246         
247         <para>The original Samba software and related utilities 
248         were created by Andrew Tridgell. Samba is now developed
249         by the Samba Team as an Open Source project similar 
250         to the way the Linux kernel is developed.</para>
251         
252         <para><command>smbcacls</command> was written by Andrew Tridgell 
253         and Tim Potter.</para>
254         
255         <para>The conversion to DocBook for Samba 2.2 was done 
256         by Gerald Carter. The conversion to DocBook XML 4.2 for Samba 3.0 was done
257         by Alexander Bokovoy.</para>
258 </refsect1>
259
260 </refentry>