merge from 2.2
[Samba/gbeck.git] / docs / htmldocs / smbcacls.1.html
blobb8323dd8f5b370fbe95f06173212e02b58b579bc
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 smbcacls program manipulates NT Access Control Lists
56 (ACLs) on SMB file shares. </P
57 ></DIV
58 ><DIV
59 CLASS="REFSECT1"
60 ><A
61 NAME="AEN27"
62 ></A
63 ><H2
64 >OPTIONS</H2
65 ><P
66 >The following options are available to the smbcacls program.
67 The format of ACLs is described in the section ACL FORMAT </P
68 ><P
69 ></P
70 ><DIV
71 CLASS="VARIABLELIST"
72 ><DL
73 ><DT
74 >-A acls</DT
75 ><DD
76 ><P
77 >Add the ACLs specified to the ACL list. Existing
78 access control entries are unchanged. </P
79 ></DD
80 ><DT
81 >-M acls</DT
82 ><DD
83 ><P
84 >Modify the mask value (permissions) for the ACLs
85 specified on the command line. An error will be printed for each
86 ACL specified that was not already present in the ACL list
87 </P
88 ></DD
89 ><DT
90 >-D acls</DT
91 ><DD
92 ><P
93 >Delete any ACLs specfied on the command line.
94 An error will be printed for each ACL specified that was not
95 already present in the ACL list. </P
96 ></DD
97 ><DT
98 >-S acls</DT
99 ><DD
101 >This command sets the ACLs on the file with
102 only the ones specified on the command line. All other ACLs are
103 erased. Note that the ACL specified must contain at least a revision,
104 type, owner and group for the call to succeed. </P
105 ></DD
106 ><DT
107 >-U username</DT
108 ><DD
110 >Specifies a username used to connect to the
111 specified service. The username may be of the form "username" in
112 which case the user is prompted to enter in a password and the
113 workgroup specified in the <TT
114 CLASS="FILENAME"
115 >smb.conf</TT
116 > file is
117 used, or "username%password" or "DOMAIN\username%password" and the
118 password and workgroup names are used as provided. </P
119 ></DD
120 ><DT
121 >-C name</DT
122 ><DD
124 >The owner of a file or directory can be changed
125 to the name given using the <TT
126 CLASS="PARAMETER"
128 >-C</I
129 ></TT
130 > option.
131 The name can be a sid in the form S-1-x-y-z or a name resolved
132 against the server specified in the first argument. </P
134 >This command is a shortcut for -M OWNER:name.
136 ></DD
137 ><DT
138 >-G name</DT
139 ><DD
141 >The group owner of a file or directory can
142 be changed to the name given using the <TT
143 CLASS="PARAMETER"
145 >-G</I
146 ></TT
148 option. The name can be a sid in the form S-1-x-y-z or a name
149 resolved against the server specified n the first argument.
152 >This command is a shortcut for -M GROUP:name.</P
153 ></DD
154 ><DT
155 >-n</DT
156 ><DD
158 >This option displays all ACL information in numeric
159 format. The default is to convert SIDs to names and ACE types
160 and masks to a readable string format. </P
161 ></DD
162 ><DT
163 >-h</DT
164 ><DD
166 >Print usage information on the <B
167 CLASS="COMMAND"
168 >smbcacls
170 > program.</P
171 ></DD
172 ></DL
173 ></DIV
174 ></DIV
175 ><DIV
176 CLASS="REFSECT1"
178 NAME="AEN73"
179 ></A
180 ><H2
181 >ACL FORMAT</H2
183 >The format of an ACL is one or more ACL entries separated by
184 either commas or newlines. An ACL entry is one of the following: </P
186 ><TABLE
187 BORDER="0"
188 BGCOLOR="#E0E0E0"
189 WIDTH="100%"
190 ><TR
191 ><TD
192 ><PRE
193 CLASS="PROGRAMLISTING"
195 REVISION:&#60;revision number&#62;
196 OWNER:&#60;sid or name&#62;
197 GROUP:&#60;sid or name&#62;
198 ACL:&#60;sid or name&#62;:&#60;type&#62;/&#60;flags&#62;/&#60;mask&#62;
199 </PRE
200 ></TD
201 ></TR
202 ></TABLE
203 ></P
205 >The revision of the ACL specifies the internal Windows
206 NT ACL revision for the security descriptor.
207 If not specified it defaults to 1. Using values other than 1 may
208 cause strange behaviour. </P
210 >The owner and group specify the owner and group sids for the
211 object. If a SID in the format CWS-1-x-y-z is specified this is used,
212 otherwise the name specified is resolved using the server on which
213 the file or directory resides. </P
215 >ACLs specify permissions granted to the SID. This SID again
216 can be specified in CWS-1-x-y-z format or as a name in which case
217 it is resolved against the server on which the file or directory
218 resides. The type, flags and mask values determine the type of
219 access granted to the SID. </P
221 >The type can be either 0 or 1 corresponding to ALLOWED or
222 DENIED access to the SID. The flags values are generally
223 zero for file ACLs and either 9 or 2 for directory ACLs. Some
224 common flags are: </P
226 ></P
227 ><UL
228 ><LI
230 >#define SEC_ACE_FLAG_OBJECT_INHERIT 0x1</P
231 ></LI
232 ><LI
234 >#define SEC_ACE_FLAG_CONTAINER_INHERIT 0x2</P
235 ></LI
236 ><LI
238 >#define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT 0x4
240 ></LI
241 ><LI
243 >#define SEC_ACE_FLAG_INHERIT_ONLY 0x8</P
244 ></LI
245 ></UL
247 >At present flags can only be specified as decimal or
248 hexadecimal values.</P
250 >The mask is a value which expresses the access right
251 granted to the SID. It can be given as a decimal or hexadecimal value,
252 or by using one of the following text strings which map to the NT
253 file permissions of the same name. </P
255 ></P
256 ><UL
257 ><LI
259 ><EM
260 >R</EM
261 > - Allow read access </P
262 ></LI
263 ><LI
265 ><EM
266 >W</EM
267 > - Allow write access</P
268 ></LI
269 ><LI
271 ><EM
272 >X</EM
273 > - Execute permission on the object</P
274 ></LI
275 ><LI
277 ><EM
278 >D</EM
279 > - Delete the object</P
280 ></LI
281 ><LI
283 ><EM
284 >P</EM
285 > - Change permissions</P
286 ></LI
287 ><LI
289 ><EM
290 >O</EM
291 > - Take ownership</P
292 ></LI
293 ></UL
295 >The following combined permissions can be specified:</P
297 ></P
298 ><UL
299 ><LI
301 ><EM
302 >READ</EM
303 > - Equivalent to 'RX'
304 permissions</P
305 ></LI
306 ><LI
308 ><EM
309 >CHANGE</EM
310 > - Equivalent to 'RXWD' permissions
312 ></LI
313 ><LI
315 ><EM
316 >FULL</EM
317 > - Equivalent to 'RWXDPO'
318 permissions</P
319 ></LI
320 ></UL
321 ></DIV
322 ><DIV
323 CLASS="REFSECT1"
325 NAME="AEN123"
326 ></A
327 ><H2
328 >EXIT STATUS</H2
330 >The <B
331 CLASS="COMMAND"
332 >smbcacls</B
333 > program sets the exit status
334 depending on the success or otherwise of the operations performed.
335 The exit status may be one of the following values. </P
337 >If the operation succeded, smbcacls returns and exit
338 status of 0. If smbcacls couldn't connect to the specified server,
339 or there was an error getting or setting the ACLs, an exit status
340 of 1 is returned. If there was an error parsing any command line
341 arguments, an exit status of 2 is returned. </P
342 ></DIV
343 ><DIV
344 CLASS="REFSECT1"
346 NAME="AEN128"
347 ></A
348 ><H2
349 >VERSION</H2
351 >This man page is correct for version 2.2 of
352 the Samba suite.</P
353 ></DIV
354 ><DIV
355 CLASS="REFSECT1"
357 NAME="AEN131"
358 ></A
359 ><H2
360 >AUTHOR</H2
362 >The original Samba software and related utilities
363 were created by Andrew Tridgell. Samba is now developed
364 by the Samba Team as an Open Source project similar
365 to the way the Linux kernel is developed.</P
368 CLASS="COMMAND"
369 >smbcacls</B
370 > was written by Andrew Tridgell
371 and Tim Potter.</P
373 >The conversion to DocBook for Samba 2.2 was done
374 by Gerald Carter</P
375 ></DIV
376 ></BODY
377 ></HTML