install-reloc: Support multi-binary installation.
[gnulib.git] / doc / acl-cygwin.txt
1 $ getfacl --help
2 Usage: getfacl [-adn] FILE [FILE2...]
3 Display file and directory access control lists (ACLs).
4
5   -a, --all      display the filename, the owner, the group, and
6                  the ACL of the file
7   -d, --dir      display the filename, the owner, the group, and
8                  the default ACL of the directory, if it exists
9   -h, --help     output usage information and exit
10   -n, --noname   display user and group IDs instead of names
11   -v, --version  output version information and exit
12
13 When multiple files are specified on the command line, a blank
14 line separates the ACLs for each file.
15 For each argument that is a regular file, special file or
16 directory, getfacl displays the owner, the group, and the ACL.
17 For directories getfacl displays additionally the default ACL.
18
19 With no options specified, getfacl displays the filename, the
20 owner, the group, and both the ACL and the default ACL, if it
21 exists.
22
23 The format for ACL output is as follows:
24      # file: filename
25      # owner: name or uid
26      # group: name or uid
27      user::perm
28      user:name or uid:perm
29      group::perm
30      group:name or gid:perm
31      mask:perm
32      other:perm
33      default:user::perm
34      default:user:name or uid:perm
35      default:group::perm
36      default:group:name or gid:perm
37      default:mask:perm
38      default:other:perm
39
40
41
42 $ setfacl --help
43 Usage: setfacl [-r] (-f ACL_FILE | -s acl_entries) FILE...
44        setfacl [-r] ([-d acl_entries] [-m acl_entries]) FILE...
45 Modify file and directory access control lists (ACLs)
46
47   -d, --delete     delete one or more specified ACL entries
48   -f, --file       set ACL entries for FILE to ACL entries read
49                    from a ACL_FILE
50   -m, --modify     modify one or more specified ACL entries
51   -r, --replace    replace mask entry with maximum permissions
52                    needed for the file group class
53   -s, --substitute substitute specified ACL entries for the
54                    ACL of FILE
55   -h, --help       output usage information and exit
56   -v, --version    output version information and exit
57
58 At least one of (-d, -f, -m, -s) must be specified
59
60      Acl_entries are one or more comma-separated ACL entries
61      from the following list:
62
63          u[ser]::perm
64          u[ser]:uid:perm
65          g[roup]::perm
66          g[roup]:gid:perm
67          m[ask]:perm
68          o[ther]:perm
69
70      Default entries are like the above with the additional
71      default identifier. For example:
72
73          d[efault]:u[ser]:uid:perm
74
75      'perm' is either a 3-char permissions string in the form
76      "rwx" with the character - for no permission
77      or it is the octal representation of the permissions, a
78      value from 0 (equivalent to "---") to 7 ("rwx").
79      'uid' is a user name or a numerical uid.
80      'gid' is a group name or a numerical gid.
81
82
83 For each file given as parameter, setfacl will either replace its
84 complete ACL (-s, -f), or it will add, modify, or delete ACL
85 entries.
86
87 The following options are supported:
88
89 -d   Delete one or more specified entries from the file's ACL.
90      The owner, group and others entries must not be deleted.
91      Acl_entries to be deleted should be specified without
92      permissions, as in the following list:
93
94          u[ser]:uid
95          g[roup]:gid
96          d[efault]:u[ser]:uid
97          d[efault]:g[roup]:gid
98          d[efault]:m[ask]:
99          d[efault]:o[ther]:
100
101 -f   Take the Acl_entries from ACL_FILE one per line. Whitespace
102      characters are ignored, and the character "#" may be used
103      to start a comment.  The special filename "-" indicates
104      reading from stdin.
105      Required entries are
106      - One user entry for the owner of the file.
107      - One group entry for the group of the file.
108      - One other entry.
109      If additional user and group entries are given:
110      - A mask entry for the file group class of the file.
111      - No duplicate user or group entries with the same uid/gid.
112      If it is a directory:
113      - One default user entry for the owner of the file.
114      - One default group entry for the group of the file.
115      - One default mask entry for the file group class.
116      - One default other entry.
117
118 -m   Add or modify one or more specified ACL entries.
119      Acl_entries is a comma-separated list of entries from the
120      same list as above.
121
122 -r   Causes the permissions specified in the mask entry to be
123      ignored and replaced by the maximum permissions needed for
124      the file group class.
125
126 -s   Like -f, but substitute the file's ACL with Acl_entries
127      specified in a comma-separated list on the command line.
128
129 While the -d and -m options may be used in the same command, the
130 -f and -s options may be used only exclusively.
131
132 Directories may contain default ACL entries.  Files created
133 in a directory that contains default ACL entries will have
134 permissions according to the combination of the current umask,
135 the explicit permissions requested and the default ACL entries
136 Note: Under Cygwin, the default ACL entries are not taken into
137 account currently.