Updated smbcacls documentation.
[samba.git] / docs / htmldocs / smbcacls.1.html
1
2
3
4
5 <html><head><title>smbcacls (1)</title>
6
7 </head>
8 <body>
9
10 <hr>
11
12 <h1>smbcacls (1)</h1>
13 <h2>Samba</h2>
14 <h2>3 Dec 2000</h2>
15
16
17     
18 <p><a name="NAME"></a>
19 <h2>NAME</h2>
20     smbcacls - Set or get ACLs on an NT file or directory 
21 <p><a name="SYNOPSIS"></a>
22 <h2>SYNOPSIS</h2>
23      
24 <p><strong>smbcacls</strong> //server/share filename <a href="smbcacls.1.html#minusU">-U username</a>
25 [<a href="smbcacls.1.html#minusA">-A acls</a>] [<a href="smbcacls.1.html#minusM">-M acls</a>] 
26 [<a href="smbcacls.1.html#minusD">-D acls</a>] [<a href="smbcacls.1.html#minusS">-S acls</a>] 
27 [<a href="smbcacls.1.html#minusn">-n</a>] [<a href="smbcacls.1.html#minush">-h</a>]
28 <p><a name="DESCRIPTION"></a>
29 <h2>DESCRIPTION</h2>
30     
31 <p>The <strong>smbcacls</strong> program manipulates NT Access Control Lists (ACLs) on
32 SMB file shares.
33 <p><a name="OPTIONS"></a>
34 <h2>OPTIONS</h2>
35     
36 <p>The following options are available to the <strong>smbcacls</strong> program.  The
37 format of ACLs is described in the section <a href="smbcacls.1.html#ACLFORMAT">ACL FORMAT</a>
38 <p><dl>
39 <p><a name="minusA"></a>
40 <p></p><dt><strong><strong>-A acls</strong></strong><dd>
41 <p>Add the ACLs specified to the ACL list.  Existing access control entries
42 are unchanged.
43 <p><a name="minusM"></a>
44 <p></p><dt><strong><strong>-M acls</strong></strong><dd>
45 <p>Modify the mask value (permissions) for the ACLs specified on the command
46 line.  An error will be printed for each ACL specified that was not already
47 present in the ACL list.
48 <p><a name="minusD"></a>
49 <p></p><dt><strong><strong>-D acls</strong></strong><dd>
50 <p>Delete any ACLs specfied on the command line.  An error will be printed for
51 each ACL specified that was not already present in the ACL list.
52 <p><a name="minusS"></a>
53 <p></p><dt><strong><strong>-S acls</strong></strong><dd>
54 <p>This command sets the ACLs on the file with only the ones specified on the
55 command line.  All other ACLs are erased.  Note that the ACL specified must
56 contain at least a revision, type, owner and group for the call to succeed.
57 <p><a name="minusU"></a>
58 <p></p><dt><strong><strong>-U username</strong></strong><dd>
59 <p>Specifies a username used to connect to the specified service.  The
60 username may be of the form <code>username</code> in which case the user is
61 prompted to enter in a password and the workgroup specified in the
62 <a href="smb.conf.5.html"><strong>smb.conf</strong></a> file is used, or <code>username%password</code>
63 or <code>DOMAIN\username%password</code> and the password and workgroup names are
64 used as provided.
65 <p><a name="minusn"></a>
66 <p></p><dt><strong><strong>-n</strong></strong><dd>
67 <p>This option displays all ACL information in numeric format.  The default is
68 to convert SIDs to names and ACE types and masks to a readable string
69 format. 
70 <p><a name="minush"></a>
71 <p></p><dt><strong><strong>-h</strong></strong><dd>
72 <p>Print usage information on the <strong>smbcacls</strong> program
73 <p></dl>
74 <p><a name="ACLFORMAT"></a>
75 <h2>ACL FORMAT</h2>
76     
77 <p>The format of an ACL is one or more ACL entries separated by either spaces,
78 commas or newlines.  An ACL entry is one of the following:
79 <p><pre>
80
81 REVISION:&lt;revision number&gt;
82 OWNER:&lt;sid or name&gt;
83 GROUP:&lt;sid or name&gt;
84 ACL:&lt;sid or name&gt;:&lt;type&gt;/&lt;flags&gt;/&lt;mask&gt;
85 </pre>
86
87 <p>The revision of the ACL specifies the internal Windows NT ACL revision for
88 the security descriptor.  If not specified it defaults to 1.
89 <p>The owner and group specify the owner and group sids for the object.  If a
90 SID in the format <code>S-1-x-y-z</code> is specified this is used, otherwise
91 the name specified is resolved using the server on which the file or
92 directory resides. 
93 <p>ACLs specify permissions granted to the SID.  This SID again can be
94 specified in <code>S-1-x-y-z</code> format or as a name in which case it is resolved
95 against the server on which the file or directory resides.  The type, flags
96 and mask values determine the type of access granted to the SID.
97 <p>The type can be either 0 or 1 corresponding to ALLOWED or DENIED access to
98 the SID.  The flags values are generally zero for file ACLs and either 9 or
99 2 for directory ACLs.  Some common flags are:
100 <p><pre>
101
102 #define SEC_ACE_FLAG_OBJECT_INHERIT             0x1
103 #define SEC_ACE_FLAG_CONTAINER_INHERIT          0x2
104 #define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT       0x4
105 #define SEC_ACE_FLAG_INHERIT_ONLY               0x8
106 </pre>
107
108 <p>The mask is a value which expresses the access right granted to
109 the SID.  It can be given as a hexadecimal value or by using one of the
110 following text strings which map to the NT file permissions of the same
111 name. 
112 <p><dl>
113 <p><p></p><dt><strong></strong><dd> <code>R</code>      Allow read access
114 <p><p></p><dt><strong></strong><dd> <code>W</code>      Allow write access
115 <p><p></p><dt><strong></strong><dd> <code>X</code>      Execute permission on the object
116 <p><p></p><dt><strong></strong><dd> <code>D</code>      Delete the object
117 <p><p></p><dt><strong></strong><dd> <code>P</code>      Change permissions
118 <p><p></p><dt><strong></strong><dd> <code>O</code>      Take ownership
119 <p></dl>
120 <p>The following combined permissions can be specified:
121 <p><dl>
122 <p><p></p><dt><strong></strong><dd> <code>READ</code>    Equivalent to <code>RX</code> permissions
123 <p></p><dt><strong></strong><dd> <code>CHANGE</code> Equivalent to <code>RXWD</code> permissions
124 <p></p><dt><strong></strong><dd> <code>FULL</code>   Equivalent to <code>RWXDPO</code> permissions
125 <p></dl>
126 <p><a name="EXITSTATUS"></a>
127 <h2>EXIT STATUS</h2>
128     
129 <p><a name="AUTHOR"></a>
130 <h2>AUTHOR</h2>
131     
132 <p>The original Samba software and related utilities were created by
133 Andrew Tridgell. Samba is now developed by the Samba Team as an Open
134 Source project.
135 <p><strong>smbcacls</strong> was written by Andrew Tridgell and Tim Potter.
136 </body>
137 </html>