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