pretty-html-synopsis-20060228
[openafs.git] / doc / man-pages / pod1 / fs_copyacl.pod
1 =head1 NAME
2
3 fs copyacl - Copies an ACL from a directory to one or more other directories
4
5 =head1 SYNOPSIS
6
7 =for html
8 <div class="synopsis">
9
10 B<fs copyacl> S<<< B<-fromdir> <I<source directory (or DFS file)>> >>>
11     S<<< B<-todir> <I<destination directory (or DFS file)>>+ >>>
12     [B<-clear>] [B<-id>] [B<-if>] [-help]
13
14 B<fs co> S<<< B<-f> <I<source directory (or DFS file)>> >>>
15     S<<< B<-t> <I<destination directory (or DFS file)>>+ >>>
16     [B<-c>] [B<-id>] [B<-if>] [-h]
17
18 =for html
19 </div>
20
21 =head1 DESCRIPTION
22
23 The fs copyacl command copies the access control list (ACL) from a source
24 directory to each specified destination directory. The source directory's
25 ACL is unchanged, and changes to the destination directory's ACL obey the
26 following rules:
27
28 =over 4
29
30 =item *
31
32 If an entry on the source ACL does not already exist on the destination
33 ACL, it is added.
34
35 =item *
36
37 If an entry exists on both the source and destination ACLs, the
38 permissions from the source ACL entry replace the current permissions on
39 the destination ACL entry.
40
41 =item *
42
43 If an entry on the destination ACL has no corresponding entry on the
44 source ACL, it is removed if the B<-clear> flag is included and is
45 unchanged otherwise. In other words, if the B<-clear> flag is provided,
46 the source ACL completely replaces the destination ACL.
47
48 =back
49
50 When using this command to copy ACLs between objects in DFS filespace
51 accessed via the AFS/DFS Migration Toolkit Protocol Translator, it is
52 possible to specify files, as well as directories, with the B<-fromdir>
53 and B<-todir> arguments. For more information on copying ACLs between DFS
54 directories and files, refer to the I<IBM AFS/DFS Migration Toolkit
55 Administration Guide and Reference>.
56
57 =head1 CAUTIONS
58
59 Do not copy ACLs between AFS and DFS files or directories. The ACL formats
60 are incompatible.
61
62 =head1 OPTIONS
63
64 =over 4
65
66 =item B<-fromdir> <I<source directory>>
67
68 Specifies the source directory from which to copy the ACL.  (Specifying an
69 AFS file copies its directory's ACL, but specifying a DFS file copies its
70 own ACL.) A partial pathname is interpreted relative to the current
71 working directory.
72
73 =item B<-todir> <I<destination directory>>
74
75 Specifies each directory for which to alter the ACL to match the source
76 ACL. (Specifying an AFS file halts the command with an error, but
77 specifying a DFS file alters the file's ACL). A partial pathname is
78 interpreted relative to the current working directory.
79
80 Specify the read/write path to each directory (or DFS file), to avoid the
81 failure that results from attempting to change a read-only volume. By
82 convention, the read/write path is indicated by placing a period before
83 the cell name at the pathname's second level (for example,
84 C</afs/.abc.com>). For further discussion of the concept of read/write and
85 read-only paths through the filespace, see the B<fs mkmount> reference
86 page.
87
88 =item B<-clear>
89
90 Replaces the ACL of each destination directory with the source ACL.
91
92 =item B<-id>
93
94 Modifies the Initial Container ACL of each DFS directory named by the
95 B<-todir> argument, rather than the regular Object ACL. This argument is
96 supported only when both the source and each destination directory reside
97 in DFS and are accessed via the AFS/DFS Migration Toolkit Protocol
98 Translator.
99
100 =item B<-if>
101
102 Modifies the Initial Object ACL of each DFS directory named by the
103 B<-todir> argument, rather than the regular Object ACL. This argument is
104 supported only when both the source and each destination directory reside
105 in DFS and are accessed via the AFS/DFS Migration Toolkit Protocol
106 Translator.
107
108 =item B<-help>
109
110 Prints the online help for this command. All other valid options are
111 ignored.
112
113 =back
114
115 =head1 EXAMPLES
116
117 The following example command copies the current working directory's ACL
118 to its subdirectory called F<reports>. Note that the source directory's
119 ACL is unaffected. Entries on the F<reports> directory's that are not on
120 the source ACL of the current directory remain unaffected as well, because
121 the B<-clear> flag is not used.
122
123    % fs listacl . reports
124    Access list for . is
125    Normal rights:
126       pat rlidwka
127       smith rlidwk
128    Access list for reports is
129    Normal rights:
130       pat rl
131       pat:friends rl
132    Negative rights
133       jones rlidwka
134
135    % fs copyacl -fromdir . -todir reports
136
137    % fs listacl . reports
138    Access list for . is
139    Normal rights:
140       pat rlidwka
141       smith rlidwk
142    Access list for reports is
143    Normal rights:
144       pat rlidwka
145       pat:friends rl
146       smith rlidwk
147    Negative rights
148       jones rlidwka
149
150 =head1 PRIVILEGE REQUIRED
151
152 To copy an ACL between AFS objects, the issuer must have the C<l> (lookup)
153 permission on the source directory's ACL and the C<a> (administer)
154 permission on each destination directory's ACL. If the B<-fromdir>
155 argument names a file rather than a directory, the issuer must have both
156 the C<l> and C<r> (read) permissions on the ACL of the file's directory.
157
158 To copy an ACL between DFS objects, the issuer must have the r permission
159 on the source directory or file's ACL and the C<c> (control) permission on
160 each destination directory or file's ACL.
161
162 =head1 SEE ALSO
163
164 L<fs_listacl(1)>,
165 L<fs_mkmount(1)>,
166 L<fs_setacl(1)>
167
168 I<IBM AFS/DFS Migration Toolkit Administration Guide and Reference>
169
170 =head1 COPYRIGHT
171
172 IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
173
174 This documentation is covered by the IBM Public License Version 1.0.  It was
175 converted from HTML to POD by software written by Chas Williams and Russ
176 Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.