1SMBCACLS(1)                                                        SMBCACLS(1)
2
3
4

NAME

6       smbcacls - Set or get ACLs on an NT file or directory names
7

SYNOPSIS

9       smbcacls  {//server/share}  {filename}  [-D acls]  [-M acls]  [-a acls]
10        [-S acls] [-C name] [-G name] [--numeric] [-t] [-U username] [-h] [-d]
11

DESCRIPTION

13       This tool is part of the samba(7) suite.
14
15       The smbcacls program manipulates NT Access Control Lists (ACLs) on  SMB
16       file shares.
17

OPTIONS

19       The following options are available to the smbcacls program. The format
20       of ACLs is described in the section ACL FORMAT
21
22       -a acls
23          Add the ACLs specified to the  ACL  list.  Existing  access  control
24          entries are unchanged.
25
26       -M acls
27          Modify  the  mask  value (permissions) for the ACLs specified on the
28          command line. An error will be printed for each ACL  specified  that
29          was not already present in the ACL list
30
31       -D acls
32          Delete  any  ACLs  specified  on  the command line. An error will be
33          printed for each ACL specified that was not already present  in  the
34          ACL list.
35
36       -S acls
37          This  command sets the ACLs on the file with only the ones specified
38          on the command line. All other ACLs are erased. Note  that  the  ACL
39          specified  must  contain  at least a revision, type, owner and group
40          for the call to succeed.
41
42       -U username
43          Specifies a username used to connect to the specified  service.  The
44          username  may  be  of  the form "username" in which case the user is
45          prompted to enter in a password and the workgroup specified  in  the
46          smb.conf(5)  file  is  used,  or  "username%password" or "DOMAINser‐
47          name%password" and the password and workgroup names are used as pro‐
48          vided.
49
50       -C name
51          The  owner  of  a file or directory can be changed to the name given
52          using the -C option. The name can be a sid in the form S-1-x-y-z  or
53          a name resolved against the server specified in the first argument.
54
55          This command is a shortcut for -M OWNER:name.
56
57       -G name
58          The  group  owner  of a file or directory can be changed to the name
59          given using the -G option. The name can be a sid in the form  S-1-x-
60          y-z  or  a  name  resolved  against the server specified n the first
61          argument.
62
63          This command is a shortcut for -M GROUP:name.
64
65       --numeric
66          This option displays all ACL  information  in  numeric  format.  The
67          default  is  to  convert  SIDs to names and ACE types and masks to a
68          readable string format.
69
70       -t
71          Don't actually do anything, only validate  the  correctness  of  the
72          arguments.
73
74       -h|--help
75          Print a summary of command line options.
76
77       -V
78          Prints the program version number.
79
80       -s <configuration file>
81          The  file  specified  contains the configuration details required by
82          the server. The information in this  file  includes  server-specific
83          information  such  as what printcap file to use, as well as descrip‐
84          tions of all the  services  that  the  server  is  to  provide.  See
85          smb.conf  for  more information. The default configuration file name
86          is determined at compile time.
87
88       -d|--debuglevel=level
89          level is an integer from 0 to 10. The default value if this  parame‐
90          ter is not specified is zero.
91
92          The  higher  this  value,  the more detail will be logged to the log
93          files about the activities of the server. At level 0, only  critical
94          errors  and serious warnings will be logged. Level 1 is a reasonable
95          level for day-to-day running - it generates a small amount of infor‐
96          mation about operations carried out.
97
98          Levels  above  1 will generate considerable amounts of log data, and
99          should only be used when investigating a problem. Levels above 3 are
100          designed for use only by developers and generate HUGE amounts of log
101          data, most of which is extremely cryptic.
102
103          Note that specifying this parameter here will override the
104
105          parameter in the smb.conf file.
106
107       -l|--logfile=logdirectory
108          Base directory name for log/debug files. The  extension  ".progname"
109          will  be  appended  (e.g.  log.smbclient, log.smbd, etc...). The log
110          file is never removed by the client.
111

ACL FORMAT

113       The format of an ACL is one or more ACL  entries  separated  by  either
114       commas or newlines. An ACL entry is one of the following:
115
116       REVISION:<revision number>
117       OWNER:<sid or name>
118       GROUP:<sid or name>
119       ACL:<sid or name>:<type>/<flags>/<mask>
120
121
122
123       The  revision of the ACL specifies the internal Windows NT ACL revision
124       for the security descriptor. If not specified it defaults to  1.  Using
125       values other than 1 may cause strange behaviour.
126
127       The owner and group specify the owner and group sids for the object. If
128       a SID in the format S-1-x-y-z is specified this is used, otherwise  the
129       name specified is resolved using the server on which the file or direc‐
130       tory resides.
131
132       ACLs specify permissions granted to the SID.  This  SID  again  can  be
133       specified in S-1-x-y-z format or as a name in which case it is resolved
134       against the server on which the file or directory  resides.  The  type,
135       flags and mask values determine the type of access granted to the SID.
136
137       The type can be either 0 or 1 corresponding to ALLOWED or DENIED access
138       to the SID. The flags values are  generally  zero  for  file  ACLs  and
139       either 9 or 2 for directory ACLs. Some common flags are:
140
141       ·  #define SEC_ACE_FLAG_OBJECT_INHERIT 0x1
142
143       ·  #define SEC_ACE_FLAG_CONTAINER_INHERIT 0x2
144
145       ·  #define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT 0x4
146
147       ·  #define SEC_ACE_FLAG_INHERIT_ONLY 0x8
148
149       At  present  flags can only be specified as decimal or hexadecimal val‐
150       ues.
151
152       The mask is a value which expresses the access  right  granted  to  the
153       SID. It can be given as a decimal or hexadecimal value, or by using one
154       of the following text strings which map to the NT file  permissions  of
155       the same name.
156
157       ·  R - Allow read access
158
159       ·  W - Allow write access
160
161       ·  X - Execute permission on the object
162
163       ·  D - Delete the object
164
165       ·  P - Change permissions
166
167       ·  O - Take ownership
168
169       The following combined permissions can be specified:
170
171       ·  READ - Equivalent to 'RX' permissions
172
173       ·  CHANGE - Equivalent to 'RXWD' permissions
174
175       ·  FULL - Equivalent to 'RWXDPO' permissions
176

EXIT STATUS

178       The  smbcacls  program sets the exit status depending on the success or
179       otherwise of the operations performed. The exit status may  be  one  of
180       the following values.
181
182       If  the  operation succeeded, smbcacls returns and exit status of 0. If
183       smbcacls couldn't connect to the specified  server,  or  there  was  an
184       error  getting or setting the ACLs, an exit status of 1 is returned. If
185       there was an error parsing any command line arguments, an  exit  status
186       of 2 is returned.
187

VERSION

189       This man page is correct for version 3.0 of the Samba suite.
190

AUTHOR

192       The  original  Samba  software  and  related  utilities were created by
193       Andrew Tridgell. Samba is now developed by the Samba Team  as  an  Open
194       Source project similar to the way the Linux kernel is developed.
195
196       smbcacls was written by Andrew Tridgell and Tim Potter.
197
198       The  conversion to DocBook for Samba 2.2 was done by Gerald Carter. The
199       conversion to DocBook XML 4.2 for  Samba  3.0  was  done  by  Alexander
200       Bokovoy.
201
202
203
204
205                                                                   SMBCACLS(1)
Impressum