1 .\" This manpage has been automatically generated by docbook2man
2 .\" from a DocBook document. This tool can be found at:
3 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
4 .\" Please send any bug reports, improvements, comments, patches,
5 .\" etc. to Steve Cheng <steve@ggi-project.org>.
6 .TH "SMBCACLS" "1" "04 March 2003" "" ""
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 ]
15 This tool is part of the Samba suite.
17 The \fBsmbcacls\fR program manipulates NT Access Control
18 Lists (ACLs) on SMB file shares.
21 The following options are available to the \fBsmbcacls\fR program.
22 The format of ACLs is described in the section ACL FORMAT
25 Add the ACLs specified to the ACL list. Existing
26 access control entries are unchanged.
29 Modify the mask value (permissions) for the ACLs
30 specified on the command line. An error will be printed for each
31 ACL specified that was not already present in the ACL list
34 Delete any ACLs specified on the command line.
35 An error will be printed for each ACL specified that was not
36 already present in the ACL list.
39 This command sets the ACLs on the file with
40 only the ones specified on the command line. All other ACLs are
41 erased. Note that the ACL specified must contain at least a revision,
42 type, owner and group for the call to succeed.
45 Specifies a username used to connect to the
46 specified service. The username may be of the form "username" in
47 which case the user is prompted to enter in a password and the
48 workgroup specified in the \fIsmb.conf\fR file is
49 used, or "username%password" or "DOMAIN\\username%password" and the
50 password and workgroup names are used as provided.
53 The owner of a file or directory can be changed
54 to the name given using the \fI-C\fR option.
55 The name can be a sid in the form S-1-x-y-z or a name resolved
56 against the server specified in the first argument.
58 This command is a shortcut for -M OWNER:name.
61 The group owner of a file or directory can
62 be changed to the name given using the \fI-G\fR
63 option. The name can be a sid in the form S-1-x-y-z or a name
64 resolved against the server specified n the first argument.
66 This command is a shortcut for -M GROUP:name.
69 This option displays all ACL information in numeric
70 format. The default is to convert SIDs to names and ACE types
71 and masks to a readable string format.
74 Print usage information on the \fBsmbcacls
78 The format of an ACL is one or more ACL entries separated by
79 either commas or newlines. An ACL entry is one of the following:
84 REVISION:<revision number>
87 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
127 The mask is a value which expresses the access right
128 granted to the SID. It can be given as a decimal or hexadecimal value,
129 or by using one of the following text strings which map to the NT
130 file permissions of the same name.
133 \fBR\fR - Allow read access
136 \fBW\fR - Allow write access
139 \fBX\fR - Execute permission on the object
142 \fBD\fR - Delete the object
145 \fBP\fR - Change permissions
148 \fBO\fR - Take ownership
150 The following combined permissions can be specified:
153 \fBREAD\fR - Equivalent to 'RX'
157 \fBCHANGE\fR - Equivalent to 'RXWD' permissions
160 \fBFULL\fR - Equivalent to 'RWXDPO'
164 The \fBsmbcacls\fR program sets the exit status
165 depending on the success or otherwise of the operations performed.
166 The exit status may be one of the following values.
168 If the operation succeeded, smbcacls returns and exit
169 status of 0. If \fBsmbcacls\fR couldn't connect to the specified server,
170 or there was an error getting or setting the ACLs, an exit status
171 of 1 is returned. If there was an error parsing any command line
172 arguments, an exit status of 2 is returned.
175 This man page is correct for version 2.2 of
179 The original Samba software and related utilities
180 were created by Andrew Tridgell. Samba is now developed
181 by the Samba Team as an Open Source project similar
182 to the way the Linux kernel is developed.
184 \fBsmbcacls\fR was written by Andrew Tridgell
187 The conversion to DocBook for Samba 2.2 was done