Add some more common errors
[sfrench/samba-autobuild/.git] / docs / htmldocs / smbcacls.1.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >smbcacls</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.77"></HEAD
9 ><BODY
10 CLASS="REFENTRY"
11 BGCOLOR="#FFFFFF"
12 TEXT="#000000"
13 LINK="#0000FF"
14 VLINK="#840084"
15 ALINK="#0000FF"
16 ><H1
17 ><A
18 NAME="SMBCACLS"
19 ></A
20 >smbcacls</H1
21 ><DIV
22 CLASS="REFNAMEDIV"
23 ><A
24 NAME="AEN5"
25 ></A
26 ><H2
27 >Name</H2
28 >smbcacls&nbsp;--&nbsp;Set or get ACLs on an NT file or directory names</DIV
29 ><DIV
30 CLASS="REFSYNOPSISDIV"
31 ><A
32 NAME="AEN8"
33 ></A
34 ><H2
35 >Synopsis</H2
36 ><P
37 ><B
38 CLASS="COMMAND"
39 >smbcacls</B
40 >  {//server/share} {filename} [-U username] [-A acls] [-M acls] [-D acls] [-S acls] [-C name] [-G name] [-n] [-h]</P
41 ></DIV
42 ><DIV
43 CLASS="REFSECT1"
44 ><A
45 NAME="AEN22"
46 ></A
47 ><H2
48 >DESCRIPTION</H2
49 ><P
50 >This tool is part of the <A
51 HREF="samba.7.html"
52 TARGET="_top"
53 >       Samba</A
54 > suite.</P
55 ><P
56 >The <B
57 CLASS="COMMAND"
58 >smbcacls</B
59 > program manipulates NT Access Control
60         Lists (ACLs) on SMB file shares. </P
61 ></DIV
62 ><DIV
63 CLASS="REFSECT1"
64 ><A
65 NAME="AEN28"
66 ></A
67 ><H2
68 >OPTIONS</H2
69 ><P
70 >The following options are available to the <B
71 CLASS="COMMAND"
72 >smbcacls</B
73 > program.  
74         The format of ACLs is described in the section ACL FORMAT </P
75 ><P
76 ></P
77 ><DIV
78 CLASS="VARIABLELIST"
79 ><DL
80 ><DT
81 >-A acls</DT
82 ><DD
83 ><P
84 >Add the ACLs specified to the ACL list.  Existing 
85                 access control entries are unchanged. </P
86 ></DD
87 ><DT
88 >-M acls</DT
89 ><DD
90 ><P
91 >Modify the mask value (permissions) for the ACLs 
92                 specified on the command line.  An error will be printed for each 
93                 ACL specified that was not already present in the ACL list
94                 </P
95 ></DD
96 ><DT
97 >-D acls</DT
98 ><DD
99 ><P
100 >Delete any ACLs specified on the command line.  
101                 An error will be printed for each ACL specified that was not 
102                 already present in the ACL list. </P
103 ></DD
104 ><DT
105 >-S acls</DT
106 ><DD
107 ><P
108 >This command sets the ACLs on the file with 
109                 only the ones specified on the command line.  All other ACLs are 
110                 erased. Note that the ACL specified must contain at least a revision,
111                 type, owner and group for the call to succeed. </P
112 ></DD
113 ><DT
114 >-U username</DT
115 ><DD
116 ><P
117 >Specifies a username used to connect to the 
118                 specified service.  The username may be of the form "username" in 
119                 which case the user is prompted to enter in a password and the 
120                 workgroup specified in the <TT
121 CLASS="FILENAME"
122 >smb.conf</TT
123 > file is 
124                 used, or "username%password"  or "DOMAIN\username%password" and the 
125                 password and workgroup names are used as provided. </P
126 ></DD
127 ><DT
128 >-C name</DT
129 ><DD
130 ><P
131 >The owner of a file or directory can be changed 
132                 to the name given using the <TT
133 CLASS="PARAMETER"
134 ><I
135 >-C</I
136 ></TT
137 > option.  
138                 The name can be a sid in the form S-1-x-y-z or a name resolved 
139                 against the server specified in the first argument. </P
140 ><P
141 >This command is a shortcut for -M OWNER:name. 
142                 </P
143 ></DD
144 ><DT
145 >-G name</DT
146 ><DD
147 ><P
148 >The group owner of a file or directory can 
149                 be changed to the name given using the <TT
150 CLASS="PARAMETER"
151 ><I
152 >-G</I
153 ></TT
154
155                 option.  The name can be a sid in the form S-1-x-y-z or a name 
156                 resolved against the server specified n the first argument.
157                 </P
158 ><P
159 >This command is a shortcut for -M GROUP:name.</P
160 ></DD
161 ><DT
162 >-n</DT
163 ><DD
164 ><P
165 >This option displays all ACL information in numeric 
166                 format.  The default is to convert SIDs to names and ACE types 
167                 and masks to a readable string format.  </P
168 ></DD
169 ><DT
170 >-h</DT
171 ><DD
172 ><P
173 >Print usage information on the <B
174 CLASS="COMMAND"
175 >smbcacls
176                 </B
177 > program.</P
178 ></DD
179 ></DL
180 ></DIV
181 ></DIV
182 ><DIV
183 CLASS="REFSECT1"
184 ><A
185 NAME="AEN75"
186 ></A
187 ><H2
188 >ACL FORMAT</H2
189 ><P
190 >The format of an ACL is one or more ACL entries separated by 
191         either commas or newlines.  An ACL entry is one of the following: </P
192 ><P
193 ><PRE
194 CLASS="PROGRAMLISTING"
195
196 REVISION:&lt;revision number&gt;
197 OWNER:&lt;sid or name&gt;
198 GROUP:&lt;sid or name&gt;
199 ACL:&lt;sid or name&gt;:&lt;type&gt;/&lt;flags&gt;/&lt;mask&gt;
200         </PRE
201 ></P
202 ><P
203 >The revision of the ACL specifies the internal Windows 
204         NT ACL revision for the security descriptor.  
205         If not specified it defaults to 1.  Using values other than 1 may 
206         cause strange behaviour. </P
207 ><P
208 >The owner and group specify the owner and group sids for the 
209         object.  If a SID in the format CWS-1-x-y-z is specified this is used, 
210         otherwise the name specified is resolved using the server on which 
211         the file or directory resides. </P
212 ><P
213 >ACLs specify permissions granted to the SID.  This SID again 
214                 can be specified in CWS-1-x-y-z format or as a name in which case 
215                 it is resolved against the server on which the file or directory 
216                 resides.  The type, flags and mask values determine the type of 
217                 access granted to the SID. </P
218 ><P
219 >The type can be either 0 or 1 corresponding to ALLOWED or 
220                 DENIED access to the SID.  The flags values are generally
221                 zero for file ACLs and either 9 or 2 for directory ACLs.  Some 
222                 common flags are: </P
223 ><P
224 ></P
225 ><UL
226 ><LI
227 ><P
228 >#define SEC_ACE_FLAG_OBJECT_INHERIT            0x1</P
229 ></LI
230 ><LI
231 ><P
232 >#define SEC_ACE_FLAG_CONTAINER_INHERIT         0x2</P
233 ></LI
234 ><LI
235 ><P
236 >#define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT       0x4
237                         </P
238 ></LI
239 ><LI
240 ><P
241 >#define SEC_ACE_FLAG_INHERIT_ONLY              0x8</P
242 ></LI
243 ></UL
244 ><P
245 >At present flags can only be specified as decimal or 
246         hexadecimal values.</P
247 ><P
248 >The mask is a value which expresses the access right 
249         granted to the SID. It can be given as a decimal or hexadecimal value, 
250         or by using one of the following text strings which map to the NT 
251         file permissions of the same name. </P
252 ><P
253 ></P
254 ><UL
255 ><LI
256 ><P
257 ><SPAN
258 CLASS="emphasis"
259 ><I
260 CLASS="EMPHASIS"
261 >R</I
262 ></SPAN
263 > - Allow read access </P
264 ></LI
265 ><LI
266 ><P
267 ><SPAN
268 CLASS="emphasis"
269 ><I
270 CLASS="EMPHASIS"
271 >W</I
272 ></SPAN
273 > - Allow write access</P
274 ></LI
275 ><LI
276 ><P
277 ><SPAN
278 CLASS="emphasis"
279 ><I
280 CLASS="EMPHASIS"
281 >X</I
282 ></SPAN
283 > - Execute permission on the object</P
284 ></LI
285 ><LI
286 ><P
287 ><SPAN
288 CLASS="emphasis"
289 ><I
290 CLASS="EMPHASIS"
291 >D</I
292 ></SPAN
293 > - Delete the object</P
294 ></LI
295 ><LI
296 ><P
297 ><SPAN
298 CLASS="emphasis"
299 ><I
300 CLASS="EMPHASIS"
301 >P</I
302 ></SPAN
303 > - Change permissions</P
304 ></LI
305 ><LI
306 ><P
307 ><SPAN
308 CLASS="emphasis"
309 ><I
310 CLASS="EMPHASIS"
311 >O</I
312 ></SPAN
313 > - Take ownership</P
314 ></LI
315 ></UL
316 ><P
317 >The following combined permissions can be specified:</P
318 ><P
319 ></P
320 ><UL
321 ><LI
322 ><P
323 ><SPAN
324 CLASS="emphasis"
325 ><I
326 CLASS="EMPHASIS"
327 >READ</I
328 ></SPAN
329 > -  Equivalent to 'RX'
330                 permissions</P
331 ></LI
332 ><LI
333 ><P
334 ><SPAN
335 CLASS="emphasis"
336 ><I
337 CLASS="EMPHASIS"
338 >CHANGE</I
339 ></SPAN
340 > - Equivalent to 'RXWD' permissions
341                 </P
342 ></LI
343 ><LI
344 ><P
345 ><SPAN
346 CLASS="emphasis"
347 ><I
348 CLASS="EMPHASIS"
349 >FULL</I
350 ></SPAN
351 > - Equivalent to 'RWXDPO' 
352                 permissions</P
353 ></LI
354 ></UL
355 ></DIV
356 ><DIV
357 CLASS="REFSECT1"
358 ><A
359 NAME="AEN125"
360 ></A
361 ><H2
362 >EXIT STATUS</H2
363 ><P
364 >The <B
365 CLASS="COMMAND"
366 >smbcacls</B
367 > program sets the exit status 
368         depending on the success or otherwise of the operations performed.  
369         The exit status may be one of the following values. </P
370 ><P
371 >If the operation succeeded, smbcacls returns and exit 
372         status of 0.  If <B
373 CLASS="COMMAND"
374 >smbcacls</B
375 > couldn't connect to the specified server, 
376         or there was an error getting or setting the ACLs, an exit status 
377         of 1 is returned.  If there was an error parsing any command line 
378         arguments, an exit status of 2 is returned. </P
379 ></DIV
380 ><DIV
381 CLASS="REFSECT1"
382 ><A
383 NAME="AEN131"
384 ></A
385 ><H2
386 >VERSION</H2
387 ><P
388 >This man page is correct for version 2.2 of 
389         the Samba suite.</P
390 ></DIV
391 ><DIV
392 CLASS="REFSECT1"
393 ><A
394 NAME="AEN134"
395 ></A
396 ><H2
397 >AUTHOR</H2
398 ><P
399 >The original Samba software and related utilities 
400         were created by Andrew Tridgell. Samba is now developed
401         by the Samba Team as an Open Source project similar 
402         to the way the Linux kernel is developed.</P
403 ><P
404 ><B
405 CLASS="COMMAND"
406 >smbcacls</B
407 > was written by Andrew Tridgell 
408         and Tim Potter.</P
409 ><P
410 >The conversion to DocBook for Samba 2.2 was done 
411         by Gerald Carter</P
412 ></DIV
413 ></BODY
414 ></HTML
415 >