]> gitweb.michael.orlitzky.com - apply-default-acl.git/blob - doc/man/apply-default-acl.1
man/apply-default-acl.1: add a note about the --recursive exit codes.
[apply-default-acl.git] / doc / man / apply-default-acl.1
1 .TH apply-default-acl 1
2
3 .SH NAME
4 apply-default-acl \- Apply default POSIX ACLs to files and directories.
5
6 .SH SYNOPSIS
7
8 \fBapply-default-acl\fR [\fB-rx\fR] \fIpath\fR [\fIpath2 ...\fR]
9
10 .SH DESCRIPTION
11
12 .P
13 If the directory containing \fIpath\fR has a default ACL, the ACL on
14 \fIpath\fR is replaced with that default. Neither symbolic nor hard
15 links are followed; symbolic links are ignored in all path components
16 to avoid a dangerous race condition.
17 .P
18 By default, a heuristic is used to determine whether or not the
19 execute bit is masked on \fIpath\fR. If \fIpath\fR is not a directory,
20 and no user or group has \fBeffective\fR execute permissions on
21 \fIpath\fR, then the execute bit will not masked. Otherwise, it is
22 left alone. In effect we pretend that the \fBx\fR permission acts like
23 the \fBX\fR (note the case difference) permission of \fBsetfacl\fR.
24 .P
25 This behavior can be modified with the \fB--no-exec-mask\fR flag.
26
27 .SH OPTIONS
28 .IP \fB\-\-recursive\fR,\ \fB\-r\fR
29 Apply default ACLs recursively. This works top-down, so if directory
30 \fBfoo\fR is in another directory \fBbar\fR which has a default ACL,
31 then \fBbar\fR's default ACL will be applied to \fBfoo\fR before the
32 contents of \fBfoo\fR are processed.
33 .IP \fB\-\-no-exec-mask\fR,\ \fB\-x\fR
34 Apply the default ACL literally; that is, don't use a heuristic to
35 decide whether or not to mask the execute bit. This usually results in
36 looser-than-necessary execute permissions.
37
38 .SH EXIT CODE
39 .P
40 When given a single path, the following codes correspond directly to
41 the action of the program on that path:
42 .IP \fB0\ (EXIT_SUCCESS)\fR
43 Success
44 .IP \fB1\ (EXIT_FAILURE)\fR
45 Failure due to a symlink, hardlink, or invalid/inaccessible path
46 .IP \fB2\fP
47 Other unexpected library error
48 .P
49 When called on multiple paths, the results from all paths are
50 collected and the \(dqworst\(dq result is returned. For example, if
51 one path succeeds and another fails, the overall result will be
52 failure. If one succeeds, one fails, and one causes an error, then the
53 overall result will be an error; and so on.
54 .P
55 The \fB\-\-recursive\fR flag modifies this behavior. Due to an
56 implementation detail, the recursive operation will return
57 EXIT_SUCCESS even if it encounters links or inaccessible paths during
58 the traversal. Beware; this means that manually supplying all children
59 of a directory on the command-line does not act the same as operating
60 on that directory recursively.