1 .\" This manpage has been automatically generated by docbook2man-spec
2 .\" from a DocBook document. docbook2man-spec can be found at:
3 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
4 .\" Please send any bug reports, improvements, comments, patches,
5 .\" etc. to Steve Cheng <steve@ggi-project.org>.
6 .TH "SMBCACLS" "1" "22 June 2001" "" ""
8 smbcacls \- Set or get ACLs on an NT file or directory names
11 \fBsmbcacls\fR \fB//server/share\fR \fBfilename\fR [ \fB-U username\fR ] [ \fB-A acls\fR ] [ \fB-M acls\fR ] [ \fB-D acls\fR ] [ \fB-S acls\fR ] [ \fB-C name\fR ] [ \fB-G name\fR ] [ \fB-n\fR ] [ \fB-h\fR ]
14 This tool is part of the Sambasuite.
16 The \fBsmbcacls\fR program manipulates NT Access Control Lists
17 (ACLs) on SMB file shares.
20 The following options are available to the \fBsmbcacls\fR program.
21 The format of ACLs is described in the section ACL FORMAT
24 Add the ACLs specified to the ACL list. Existing
25 access control entries are unchanged.
28 Modify the mask value (permissions) for the ACLs
29 specified on the command line. An error will be printed for each
30 ACL specified that was not already present in the ACL list
33 Delete any ACLs specified on the command line.
34 An error will be printed for each ACL specified that was not
35 already present in the ACL list.
38 This command sets the ACLs on the file with
39 only the ones specified on the command line. All other ACLs are
40 erased. Note that the ACL specified must contain at least a revision,
41 type, owner and group for the call to succeed.
44 Specifies a username used to connect to the
45 specified service. The username may be of the form "username" in
46 which case the user is prompted to enter in a password and the
47 workgroup specified in the \fIsmb.conf\fR file is
48 used, or "username%password" or "DOMAIN\\username%password" and the
49 password and workgroup names are used as provided.
52 The owner of a file or directory can be changed
53 to the name given using the \fI-C\fR option.
54 The name can be a sid in the form S-1-x-y-z or a name resolved
55 against the server specified in the first argument.
57 This command is a shortcut for -M OWNER:name.
60 The group owner of a file or directory can
61 be changed to the name given using the \fI-G\fR
62 option. The name can be a sid in the form S-1-x-y-z or a name
63 resolved against the server specified n the first argument.
65 This command is a shortcut for -M GROUP:name.
68 This option displays all ACL information in numeric
69 format. The default is to convert SIDs to names and ACE types
70 and masks to a readable string format.
73 Print usage information on the \fBsmbcacls
77 The format of an ACL is one or more ACL entries separated by
78 either commas or newlines. An ACL entry is one of the following:
83 REVISION:<revision number>
86 ACL:<sid or name>:<type>/<flags>/<mask>
91 The revision of the ACL specifies the internal Windows
92 NT ACL revision for the security descriptor.
93 If not specified it defaults to 1. Using values other than 1 may
94 cause strange behaviour.
96 The owner and group specify the owner and group sids for the
97 object. If a SID in the format CWS-1-x-y-z is specified this is used,
98 otherwise the name specified is resolved using the server on which
99 the file or directory resides.
101 ACLs specify permissions granted to the SID. This SID again
102 can be specified in CWS-1-x-y-z format or as a name in which case
103 it is resolved against the server on which the file or directory
104 resides. The type, flags and mask values determine the type of
105 access granted to the SID.
107 The type can be either 0 or 1 corresponding to ALLOWED or
108 DENIED access to the SID. The flags values are generally
109 zero for file ACLs and either 9 or 2 for directory ACLs. Some
113 #define SEC_ACE_FLAG_OBJECT_INHERIT 0x1
116 #define SEC_ACE_FLAG_CONTAINER_INHERIT 0x2
119 #define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT 0x4
122 #define SEC_ACE_FLAG_INHERIT_ONLY 0x8
124 At present flags can only be specified as decimal or
128 The mask is a value which expresses the access right
129 granted to the SID. It can be given as a decimal or hexadecimal value,
130 or by using one of the following text strings which map to the NT
131 file permissions of the same name.
135 \fBR\fR - Allow read access
138 \fBW\fR - Allow write access
141 \fBX\fR - Execute permission on the object
144 \fBD\fR - Delete the object
147 \fBP\fR - Change permissions
150 \fBO\fR - Take ownership
152 The following combined permissions can be specified:
156 \fBREAD\fR - Equivalent to 'RX'
160 \fBCHANGE\fR - Equivalent to 'RXWD' permissions
163 \fBFULL\fR - Equivalent to 'RWXDPO'
167 The \fBsmbcacls\fR program sets the exit status
168 depending on the success or otherwise of the operations performed.
169 The exit status may be one of the following values.
171 If the operation succeeded, smbcacls returns and exit
172 status of 0. If \fBsmbcacls\fR couldn't connect to the specified server,
173 or there was an error getting or setting the ACLs, an exit status
174 of 1 is returned. If there was an error parsing any command line
175 arguments, an exit status of 2 is returned.
178 This man page is correct for version 2.2 of
182 The original Samba software and related utilities
183 were created by Andrew Tridgell. Samba is now developed
184 by the Samba Team as an Open Source project similar
185 to the way the Linux kernel is developed.
187 \fBsmbcacls\fR was written by Andrew Tridgell
190 The conversion to DocBook for Samba 2.2 was done