cifs.idmap: fix endianness on SIDs before sending to kernel
[jlayton/cifs-utils.git] / setcifsacl.1
1 '\" t
2 .\"     Title: cifs.idmap
3 .\"    Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5 .\"      Date: 08/19/2011
6 .\"    Manual: System Administration tools
7 .\"    Source: cifs-utils 4.0
8 .\"  Language: English
9 .\"
10 .TH "SETCIFSACL" "1" "08/19/2011" "cifs-utils" "CIFS Access Control List Tools"
11 .\" -----------------------------------------------------------------
12 .\" * set default formatting
13 .\" -----------------------------------------------------------------
14 .\" disable hyphenation
15 .nh
16 .\" disable justification (adjust text to left margin only)
17 .ad l
18 .\" -----------------------------------------------------------------
19 .\" * MAIN CONTENT STARTS HERE *
20 .\" -----------------------------------------------------------------
21 .SH "NAME"
22 setcifsacl \- Userspace helper to alter an ACL in a security descriptor for Common Internet File System (CIFS)
23 .SH "SYNOPSIS"
24 .HP \w'\ 'u
25 setcifsacl [\-v|\-a|\-D|\-M|\-S] "{one or more ACEs}" {file system object}
26 .SH "DESCRIPTION"
27 .PP
28 This tool is part of the cifs-utils suite\&.
29 .PP
30 setcifsacl is a userspace helper program for the Linux CIFS client file system.  It is intended to alter an ACL of a security descriptor for a file system object.  It is best utilized when an option of cifsacl is specified when mounting a cifs share in conjunction with winbind facility of Samba suite.  Whether a security descriptor to be set is applied or not is determined by the CIFS/SMB server.
31 .SH "OPTIONS"
32 .PP
33 -h
34 .RS 4
35 Print usage message and exit.
36 .RE
37 \-v
38 .RS 4
39 Print version number and exit\&.
40 .RE
41 \-a
42 .RS 4
43 Add one or more ACEs to an ACL of a security descriptor.
44 An ACE is added even if the same ACE exists in the ACL.
45 .RE
46 \-D
47 .RS 4
48 Delete one or more ACEs from an ACL of a security descriptor.
49 Entire ACE has to match in an existing ACL for the listed ACEs to be deleted.
50 .RE
51 \-M
52 .RS 4
53 Modify one or more ACEs from an ACL of a security descriptor.
54 SID and type are used to match for existing ACEs to be modified with the list of ACEs specified.
55 .RE
56 \-S
57 .RS 4
58 Set an ACL of security descriptor with the list of ACEs
59 Existing ACL is replaced entirely with the specified ACEs.
60 .RE
61 .PP
62 Every ACE entry starts with "ACL:"
63 One or more ACEs are specified within double quotes.
64 Multiple ACEs are separated by a comma.
65 .PP
66 Following fields of an ACE can be modified with possible values:
67 .PP
68 SID: Either a name or a raw SID value.
69 .PP
70 type: ALLOWED (0x0), DENIED (0x1), OBJECT_ALLOWED (0x5), OBJECT_DENIED (0x6)
71 .PP
72 flags: OBJECT_INHERIT_FLAG (OI or 0x1), CONTAINER_INHERIT_FLAG (CI or 0x2), NO_PROPAGATE_INHERIT_FLAG (NI or 0x4), INHERIT_ONLY_FLAG (IO or 0x8), INHERITED_ACE_FLAG (IA or 0x10) or a combination/OR of these values.
73 .PP
74 mask: Either one of FULL, CHANGE, READ, a combination of R W X D P O, or a hex value
75 .SH "EXAMPLES"
76 .PP
77 Add an ACE
78 .br
79 setcifsacl -a "ACL:CIFSTESTDOM\\user2:DENIED/0x1/D" <file_name>
80 setcifsacl -a "ACL:CIFSTESTDOM\\user1:ALLOWED/OI|CI|NI/D" <file_name>
81 .PP
82 Delete an ACE
83 .br
84 setcifsacl -D "ACL:S-1-1-0:0x1/OI/0x1201ff" <file_name>
85 .PP
86 Modify an ACE
87 .br
88 setcifsacl -M "ACL:CIFSTESTDOM\\user1:ALLOWED/0x1f/CHANGE" <file_name>
89 .PP
90 Set an ACL
91 .br
92 setcifsacl -S "ACL:CIFSTESTDOM\\Administrator:0x0/0x0/FULL,
93 .br
94 ACL:CIFSTESTDOM\\user2:0x0/0x0/FULL," <file_name>
95 .PP
96 .SH "NOTES"
97 .PP
98 Kernel support for getcifsacl/setcifsacl utilities was initially introduced in the 2.6.37 kernel.
99 .SH "SEE ALSO"
100 .PP
101 \fBmount.cifs\fR(8),
102 \fBwinbindd\fR(8),
103 \fBgetcifsacl\fR(1)
104 .PP
105 .SH "AUTHOR"
106 .PP
107 Shirish Pargaonkar wrote the setcifsacl program\&.
108 .PP
109 The
110 Linux CIFS Mailing list
111 is the preferred place to ask questions regarding these programs\&.