7 CONTENT=
"Modular DocBook HTML Stylesheet Version 1.57"></HEAD
27 >smbcacls
--
Set or get ACLs on an NT file or directory names
</DIV
29 CLASS=
"REFSYNOPSISDIV"
39 > {//server/share} {filename} [-U username] [-A acls] [-M acls] [-D acls] [-S acls] [-C name] [-G name] [-n] [-h]
</P
49 >This tool is part of the
<A
55 >The smbcacls program manipulates NT Access Control Lists
56 (ACLs) on SMB file shares.
</P
66 >The following options are available to the smbcacls program.
67 The format of ACLs is described in the section ACL FORMAT
</P
77 >Add the ACLs specified to the ACL list. Existing
78 access control entries are unchanged.
</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
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
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
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
117 used, or
"username%password" or
"DOMAIN\username%password" and the
118 password and workgroup names are used as provided.
</P
124 >The owner of a file or directory can be changed
125 to the name given using the
<TT
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.
141 >The group owner of a file or directory can
142 be changed to the name given using the
<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
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
166 >Print usage information on the
<B
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
193 CLASS=
"PROGRAMLISTING"
195 REVISION:
<revision number
>
196 OWNER:
<sid or name
>
197 GROUP:
<sid or name
>
198 ACL:
<sid or name
>:
<type
>/
<flags
>/
<mask
>
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
230 >#define SEC_ACE_FLAG_OBJECT_INHERIT
0x1</P
234 >#define SEC_ACE_FLAG_CONTAINER_INHERIT
0x2</P
238 >#define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT
0x4
243 >#define SEC_ACE_FLAG_INHERIT_ONLY
0x8</P
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
261 > - Allow read access
</P
267 > - Allow write access
</P
273 > - Execute permission on the object
</P
279 > - Delete the object
</P
285 > - Change permissions
</P
291 > - Take ownership
</P
295 >The following combined permissions can be specified:
</P
303 > - Equivalent to 'RX'
310 > - Equivalent to 'RXWD' permissions
317 > - Equivalent to 'RWXDPO'
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
351 >This man page is correct for version
2.2 of
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
370 > was written by Andrew Tridgell
373 >The conversion to DocBook for Samba
2.2 was done