This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[kai/samba.git] / docs / manpages / smbcacls.1
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" "" ""
7 .SH NAME
8 smbcacls \- Set or get ACLs on an NT file or directory names
9 .SH SYNOPSIS
10
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 ]
12
13 .SH "DESCRIPTION"
14 .PP
15 This tool is part of the  Samba suite.
16 .PP
17 The \fBsmbcacls\fR program manipulates NT Access Control
18 Lists (ACLs) on SMB file shares. 
19 .SH "OPTIONS"
20 .PP
21 The following options are available to the \fBsmbcacls\fR program.  
22 The format of ACLs is described in the section ACL FORMAT 
23 .TP
24 \fB-A acls\fR
25 Add the ACLs specified to the ACL list.  Existing 
26 access control entries are unchanged. 
27 .TP
28 \fB-M acls\fR
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
32 .TP
33 \fB-D acls\fR
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. 
37 .TP
38 \fB-S acls\fR
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. 
43 .TP
44 \fB-U username\fR
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. 
51 .TP
52 \fB-C name\fR
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. 
57
58 This command is a shortcut for -M OWNER:name. 
59 .TP
60 \fB-G name\fR
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.
65
66 This command is a shortcut for -M GROUP:name.
67 .TP
68 \fB-n\fR
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.  
72 .TP
73 \fB-h\fR
74 Print usage information on the \fBsmbcacls
75 \fR program.
76 .SH "ACL FORMAT"
77 .PP
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: 
80 .PP
81
82 .nf
83  
84 REVISION:<revision number>
85 OWNER:<sid or name>
86 GROUP:<sid or name>
87 ACL:<sid or name>:<type>/<flags>/<mask>
88         
89 .fi
90 .PP
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. 
95 .PP
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. 
100 .PP
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. 
106 .PP
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 
110 common flags are: 
111 .TP 0.2i
112 \(bu
113 #define SEC_ACE_FLAG_OBJECT_INHERIT      0x1
114 .TP 0.2i
115 \(bu
116 #define SEC_ACE_FLAG_CONTAINER_INHERIT   0x2
117 .TP 0.2i
118 \(bu
119 #define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT       0x4
120 .TP 0.2i
121 \(bu
122 #define SEC_ACE_FLAG_INHERIT_ONLY        0x8
123 .PP
124 At present flags can only be specified as decimal or 
125 hexadecimal values.
126 .PP
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. 
131 .TP 0.2i
132 \(bu
133 \fBR\fR - Allow read access 
134 .TP 0.2i
135 \(bu
136 \fBW\fR - Allow write access
137 .TP 0.2i
138 \(bu
139 \fBX\fR - Execute permission on the object
140 .TP 0.2i
141 \(bu
142 \fBD\fR - Delete the object
143 .TP 0.2i
144 \(bu
145 \fBP\fR - Change permissions
146 .TP 0.2i
147 \(bu
148 \fBO\fR - Take ownership
149 .PP
150 The following combined permissions can be specified:
151 .TP 0.2i
152 \(bu
153 \fBREAD\fR -  Equivalent to 'RX'
154 permissions
155 .TP 0.2i
156 \(bu
157 \fBCHANGE\fR - Equivalent to 'RXWD' permissions
158 .TP 0.2i
159 \(bu
160 \fBFULL\fR - Equivalent to 'RWXDPO' 
161 permissions
162 .SH "EXIT STATUS"
163 .PP
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. 
167 .PP
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. 
173 .SH "VERSION"
174 .PP
175 This man page is correct for version 2.2 of 
176 the Samba suite.
177 .SH "AUTHOR"
178 .PP
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.
183 .PP
184 \fBsmbcacls\fR was written by Andrew Tridgell 
185 and Tim Potter.
186 .PP
187 The conversion to DocBook for Samba 2.2 was done 
188 by Gerald Carter