1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.77"></HEAD
28 >smbcacls -- Set or get ACLs on an NT file or directory names</DIV
30 CLASS="REFSYNOPSISDIV"
40 > {//server/share} {filename} [-U username] [-A acls] [-M acls] [-D acls] [-S acls] [-C name] [-G name] [-n] [-h]</P
50 >This tool is part of the <A
59 > program manipulates NT Access Control
60 Lists (ACLs) on SMB file shares. </P
70 >The following options are available to the <B
74 The format of ACLs is described in the section ACL FORMAT </P
84 >Add the ACLs specified to the ACL list. Existing
85 access control entries are unchanged. </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
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
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
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
124 used, or "username%password" or "DOMAIN\username%password" and the
125 password and workgroup names are used as provided. </P
131 >The owner of a file or directory can be changed
132 to the name given using the <TT
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
141 >This command is a shortcut for -M OWNER:name.
148 >The group owner of a file or directory can
149 be changed to the name given using the <TT
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.
159 >This command is a shortcut for -M GROUP:name.</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
173 >Print usage information on the <B
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
194 CLASS="PROGRAMLISTING"
196 REVISION:<revision number>
197 OWNER:<sid or name>
198 GROUP:<sid or name>
199 ACL:<sid or name>:<type>/<flags>/<mask>
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
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
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
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
228 >#define SEC_ACE_FLAG_OBJECT_INHERIT 0x1</P
232 >#define SEC_ACE_FLAG_CONTAINER_INHERIT 0x2</P
236 >#define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT 0x4
241 >#define SEC_ACE_FLAG_INHERIT_ONLY 0x8</P
245 >At present flags can only be specified as decimal or
246 hexadecimal values.</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
263 > - Allow read access </P
273 > - Allow write access</P
283 > - Execute permission on the object</P
293 > - Delete the object</P
303 > - Change permissions</P
313 > - Take ownership</P
317 >The following combined permissions can be specified:</P
329 > - Equivalent to 'RX'
340 > - Equivalent to 'RXWD' permissions
351 > - Equivalent to 'RWXDPO'
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
371 >If the operation succeeded, smbcacls returns and exit
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
388 >This man page is correct for version 2.2 of
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
407 > was written by Andrew Tridgell
410 >The conversion to DocBook for Samba 2.2 was done