~ubuntu-branches/ubuntu/vivid/nfs4-acl-tools/vivid-proposed

« back to all changes in this revision

Viewing changes to man/man1/nfs4_setfacl.1

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2009-05-12 13:53:04 UTC
  • Revision ID: james.westby@ubuntu.com-20090512135304-b4hyk0en3a0v8r3p
Tags: upstream-0.3.3
ImportĀ upstreamĀ versionĀ 0.3.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\" NFSv4 Access Control Lists manual pages
 
2
.\" format with: groff -man -Tascii foo.1
 
3
.\" richterd
 
4
.\".fam T
 
5
.\"
 
6
.TH NFS4_SETFACL 1 "version 0.3.3, August 2008" "Linux" "NFSv4 Access Control Lists"
 
7
.SH NAME
 
8
nfs4_setfacl, nfs4_editfacl \- manipulate NFSv4 file/directory access control lists
 
9
.SH SYNOPSIS
 
10
.ns
 
11
.BR nfs4_setfacl  " [OPTIONS] COMMAND "
 
12
.IR file ...
 
13
.br
 
14
.BR nfs4_editfacl  " [OPTIONS] "
 
15
.IR file ...
 
16
.SH DESCRIPTION
 
17
.B nfs4_setfacl 
 
18
manipulates the NFSv4 Access Control List (ACL) of one or more 
 
19
.I files 
 
20
(or directories), provided they are on a mounted NFSv4 filesystem
 
21
which supports ACLs. 
 
22
 
 
23
.B nfs4_editfacl 
 
24
is equivalent to 
 
25
.BR "nfs4_setfacl -e" .
 
26
.\".B nfs4_setfacl -e
 
27
 
 
28
Refer to the
 
29
.BR nfs4_acl (5)
 
30
manpage for information about NFSv4 ACL terminology and syntax.
 
31
.SS COMMANDS
 
32
.TP
 
33
.BR "-a " "\fIacl_spec\fP [\fIindex\fP]"
 
34
.RI "add the ACEs from " acl_spec " to " file "'s ACL."
 
35
ACEs are inserted starting at the
 
36
.IR index th
 
37
position (DEFAULT: 1) of
 
38
.IR file "'s ACL."
 
39
.\".ns
 
40
.TP
 
41
.BR "-A " "\fIacl_file\fP [\fIindex\fP]"
 
42
.RI "add the ACEs from the acl_spec in " acl_file " to " file "'s ACL."
 
43
ACEs are inserted starting at the
 
44
.IR index th
 
45
position (DEFAULT: 1) of
 
46
.IR file "'s ACL."
 
47
.TP
 
48
.BI "-x " "acl_spec \fR|\fP index"
 
49
delete ACEs matched from
 
50
.I acl_spec
 
51
- or delete the 
 
52
.IR index th
 
53
ACE - from 
 
54
.IR file 's
 
55
ACL.  Note that the ordering of the ACEs in
 
56
.I acl_spec
 
57
does not matter.
 
58
.TP
 
59
.BI "-X " acl_file
 
60
delete ACEs matched from the acl_spec in
 
61
.IR acl_file " from " file "'s ACL."
 
62
Note that the ordering of the ACEs in the acl_spec does not matter.
 
63
.TP
 
64
.BI "-s " acl_spec
 
65
.RI "set " file "'s ACL to " acl_spec .
 
66
.TP
 
67
.BI "-S " acl_file
 
68
.RI "set " file "'s ACL to the acl_spec in " acl_file .
 
69
.TP
 
70
.BR "-e" , " --edit"
 
71
.RI "edit " file "'s ACL in the editor defined in the EDITOR environment variable (DEFAULT: "
 
72
.BR vi "(1)) and set the resulting ACL upon a clean exit, assuming changes made in the editor
 
73
were saved.  Note that if multiple
 
74
.IR files " are specified, the editor will be serially invoked once per " file .
 
75
.TP
 
76
.BI "-m " "from_ace to_ace"
 
77
.RI "modify " file "'s ACL in-place by replacing " from_ace " with " to_ace .
 
78
.TP
 
79
.BR "-?" ", " "-h" ", " "--help"
 
80
display help text and exit.
 
81
.TP
 
82
.B "--version"
 
83
display this program's version and exit.
 
84
.P
 
85
.RI "NOTE: if '-' is given as the " acl_file 
 
86
.ns
 
87
.RB "with the " -A / -X / -S " flags, the acl_spec will be read from stdin."
 
88
.SS OPTIONS
 
89
.TP
 
90
.BR "-R" , " --recursive"
 
91
recursively apply to a directory's files and subdirectories.  Similar to 
 
92
.BR setfacl (1),
 
93
the default behavior is to follow symlinks given on the command line and to skip symlinks
 
94
encountered while recursing through directories.
 
95
.TP
 
96
.BR "-L" , " --logical"
 
97
in conjunction with
 
98
.BR -R / --recursive ", a logical walk follows all symbolic links."
 
99
.TP
 
100
.BR "-P" , " --physical"
 
101
in conjunction with
 
102
.BR -R / --recursive ", a physical walk skips all symbolic links."
 
103
.TP
 
104
.BR --test       
 
105
display results of 
 
106
.BR COMMAND ,
 
107
but do not save changes.
 
108
 
 
109
.SH PERMISSIONS ALIASES
 
110
With 
 
111
.BR nfs4_setfacl ,
 
112
one can use simple abbreviations ("aliases") to express generic "read"
 
113
.RB ( R ),
 
114
generic "write"
 
115
.RB ( W ),
 
116
and generic "execute"
 
117
.RB ( X )
 
118
.IR permissions ,
 
119
familiar from the POSIX mode bits used by, e.g., 
 
120
.BR chmod (1).
 
121
To use these aliases, one can put them in the
 
122
.I permissions
 
123
field of an NFSv4 ACE and
 
124
.B nfs4_setfacl
 
125
will convert them: an
 
126
.B R
 
127
is expanded to
 
128
.BR rntcy ,
 
129
a
 
130
.B W
 
131
is expanded to
 
132
.B watTNcCy 
 
133
(with 
 
134
.B D
 
135
added to directory ACEs), and an
 
136
.B X
 
137
is expanded to
 
138
.BR xtcy .
 
139
Please refer to the
 
140
.BR nfs4_acl (5)
 
141
manpage for information on specific NFSv4 ACE
 
142
.IR permissions .
 
143
 
 
144
For example, if one wanted to grant generic "read" and "write" access on a file, the NFSv4
 
145
.I permissions
 
146
field would normally contain something like
 
147
.BR rwatTnNcCy .
 
148
Instead, one might use aliases to accomplish the same goal with
 
149
.BR RW .
 
150
 
 
151
The two
 
152
.I permissions
 
153
not included in any of the aliases are
 
154
.B d
 
155
(delete) and 
 
156
.B o
 
157
(write-owner).  However, they can still be used: e.g., a 
 
158
.I permissions
 
159
field consisting of
 
160
.B Wdo
 
161
expresses generic "write" access as well as the ability to delete and change ownership.
 
162
.SH EXAMPLES
 
163
Assume that the file `foo' has the following NFSv4 ACL for the following examples:
 
164
.RS
 
165
.nf
 
166
 
 
167
A::OWNER@:rwatTnNcCy
 
168
D::OWNER@:x
 
169
A:g:GROUP@:rtncy
 
170
D:g:GROUP@:waxTC
 
171
A::EVERYONE@:rtncy
 
172
D::EVERYONE@:waxTC
 
173
.fi
 
174
.RE
 
175
.IP - 2
 
176
add ACE granting `alice@nfsdomain.org' generic "read" and "execute" access (defaults to prepending ACE to ACL):
 
177
.br
 
178
        $ nfs4_setfacl -a A::alice@nfsdomain.org:rxtncy foo
 
179
.IP - 2
 
180
add the same ACE as above, but using aliases:
 
181
.br
 
182
        $ nfs4_setfacl -a A::alice@nfsdomain.org:RX foo
 
183
.IP - 2
 
184
edit existing ACL in a text editor and set modified ACL on clean save/exit:
 
185
.br
 
186
        $ nfs4_setfacl -e foo
 
187
.IP - 2
 
188
set ACL (overwrites original) to contents of a
 
189
.I spec_file
 
190
named `newacl.txt':
 
191
.br
 
192
        $ nfs4_setfacl -S newacl.txt foo
 
193
.IP - 2
 
194
recursively set the ACLs of all files and subdirectories in the current directory, skipping
 
195
all symlinks encountered, to the ACL contained in the
 
196
.I spec_file
 
197
named `newacl.txt':
 
198
.br
 
199
        $ nfs4_setfacl -R -P -S newacl.txt *
 
200
.IP - 2
 
201
delete the first ACE, but only print the resulting ACL (does not save changes):
 
202
.br
 
203
        $ nfs4_setfacl --test -x 1 foo
 
204
.IP - 2
 
205
delete the last two ACEs above:
 
206
.br
 
207
        $ nfs4_setfacl -x "A::EVERYONE@rtncy, D::EVERYONE@:waxTC" foo
 
208
.IP - 2
 
209
modify (in-place) the second ACE above:
 
210
.br
 
211
        $ nfs4_setfacl -m D::OWNER@:x  D::OWNER@:xo foo
 
212
.IP - 2
 
213
set ACLs of `bar' and `frobaz' to ACL of `foo':
 
214
.br
 
215
        $ nfs4_getfacl foo | nfs4_setfacl -S - bar frobaz
 
216
.SH AUTHORS
 
217
.B nfs4_setfacl 
 
218
was written by people at CITI, the Center for Information Technology Integration
 
219
.RI ( http://www.citi.umich.edu ). 
 
220
This manpage was written by David Richter.
 
221
.SH CONTACT
 
222
Please send bug reports, feature requests, and comments to 
 
223
.RI < nfsv4@linux-nfs.org >.
 
224
.SH SEE ALSO
 
225
.BR nfs4_getfacl "(1), " nfs4_acl (5),
 
226
.IR RFC3530  " (NFSv4.0), NFSv4.1 Minor Version Draft."