Initial IBM OpenAFS 1.0 tree
[openafs.git] / src / WINNT / doc / install / Documentation / en_US / html / SysAdminGd / auagd020.htm
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3//EN">
2 <HTML><HEAD>
3 <TITLE>Administration Guide</TITLE>
4 <!-- Begin Header Records  ========================================== -->
5 <!-- /tmp/idwt3191/auagd000.scr converted by idb2h R4.2 (359) ID      -->
6 <!-- Workbench Version (AIX) on 5 Nov 1999 at 14:06:34                -->
7 <META HTTP-EQUIV="updated" CONTENT="Fri, 05 Nov 1999 14:06:34">
8 <META HTTP-EQUIV="review" CONTENT="Sun, 05 Nov 2000 14:06:34">
9 <META HTTP-EQUIV="expires" CONTENT="Mon, 05 Nov 2001 14:06:34">
10 </HEAD><BODY>
11 <!-- (C) IBM Corporation 2000. All Rights Reserved    --> 
12 <BODY bgcolor="ffffff"> 
13 <!-- End Header Records  ============================================ -->
14 <A NAME="Top_Of_Page"></A>
15 <H1>Administration Guide</H1>
16 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auagd002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auagd019.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Bot_Of_Page"><IMG SRC="../bot.gif" BORDER="0" ALT="[Bottom of Topic]"></A> <A HREF="auagd021.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auagd026.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
17 <HR><H1><A NAME="HDRWQ772" HREF="auagd002.htm#ToC_628">Managing Access Control Lists</A></H1>
18 <P>To control access to a directory and all of the files in it,
19 AFS associates an <I>access control list</I> (<I>ACL</I>) with it,
20 rather than the mode bits that the UNIX file system (UFS) associates with
21 individual files or directories. AFS ACLs provide more refined access
22 control because there are seven access permissions rather than UFS&#39;s
23 three, and there is room for approximately 20 user or group entries on an ACL,
24 rather than just the three UFS entries (<B>owner</B>, <B>group</B>,
25 and <B>other</B>).
26 <HR><H2><A NAME="HDRWQ773" HREF="auagd002.htm#ToC_629">Summary of Instructions</A></H2>
27 <P>This chapter explains how to perform the following tasks by
28 using the indicated commands&#58;
29 <BR>
30 <TABLE WIDTH="100%">
31 <TR>
32 <TD ALIGN="LEFT" VALIGN="TOP" WIDTH="57%">Examine access control list
33 </TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="43%"><B>fs listacl</B>
34 </TD></TR><TR>
35 <TD ALIGN="LEFT" VALIGN="TOP" WIDTH="57%">Edit ACL&#39;s normal permissions section
36 </TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="43%"><B>fs setacl</B>
37 </TD></TR><TR>
38 <TD ALIGN="LEFT" VALIGN="TOP" WIDTH="57%">Edit ACL&#39;s negative permissions section
39 </TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="43%"><B>fs setacl</B> with <B>-negative</B> flag
40 </TD></TR><TR>
41 <TD ALIGN="LEFT" VALIGN="TOP" WIDTH="57%">Replace an ACL
42 </TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="43%"><B>fs setacl</B> with <B>-clear</B> flag
43 </TD></TR><TR>
44 <TD ALIGN="LEFT" VALIGN="TOP" WIDTH="57%">Copy an ACL
45 </TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="43%"><B>fs copyacl</B>
46 </TD></TR><TR>
47 <TD ALIGN="LEFT" VALIGN="TOP" WIDTH="57%">Remove obsolete AFS UIDs
48 </TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="43%"><B>fs cleanacl</B>
49 </TD></TR></TABLE>
50 <HR><H2><A NAME="HDRWQ780" HREF="auagd002.htm#ToC_630">Protecting Data in AFS</A></H2>
51 <A NAME="IDX8016"></A>
52 <A NAME="IDX8017"></A>
53 <P>This section describes the main differences between the AFS and UFS file
54 protection systems, discusses the implications of directory-level protections,
55 and describes the seven access permissions.
56 <P><H3><A NAME="HDRWQ781" HREF="auagd002.htm#ToC_631">Differences Between UFS and AFS Data Protection</A></H3>
57 <A NAME="IDX8018"></A>
58 <A NAME="IDX8019"></A>
59 <A NAME="IDX8020"></A>
60 <P>The UFS mode bits data protection system and the AFS ACL system differ in
61 the following ways&#58;
62 <UL>
63 <P><LI>Protection at the file level (UFS) versus the directory level (AFS) 
64 <P>UFS associates a set of nine mode bits with each file element, three
65 (<B>rwx</B>) for each of the element&#39;s owner, owning group, and all
66 other users. A similar set of mode bits on the file&#39;s directory
67 applies to the file only in an oblique way.
68 <P>An AFS ACL instead protects all files in a directory in the same
69 way. If a certain file is more sensitive than others, store it in a
70 directory with a more restrictive ACL.
71 <P>Defining access at the directory level has important consequences&#58; 
72 <A NAME="IDX8021"></A>
73 <UL>
74 <P><LI>The permissions on a directory&#39;s ACL apply to all of the files in the
75 directory. When you move a file to a different directory, you
76 effectively change the access permissions that apply to it to those on its new
77 directory&#39;s ACL. Changing a directory&#39;s ACL changes the
78 protection on all the files in it.
79 <P><LI>When you create a subdirectory, its initial ACL is created as a copy of
80 its parent directory&#39;s ACL. You can then change the
81 subdirectory&#39;s ACL independently. However, the parent
82 directory&#39;s ACL continues to control access to the subdirectory in the
83 following way&#58; the parent directory&#39;s ACL must grant the
84 <B>l</B> (<B>lookup</B>) permission to a user (or a group the user
85 belongs to) in order for the user to access the subdirectory at all. 
86 <P>In general, then, it is best to assign fairly liberal access permissions to
87 high-level directories (including user home directories). In
88 particular, it often makes sense to grant at least the <B>l</B> permission
89 to the <B>system&#58;anyuser</B> or <B>system&#58;authuser</B>
90 group on high-level directories. For further discussion, see <A HREF="#HDRWQ786">Using Groups on ACLs</A>.
91 </UL>
92 <P><LI>How the mode bits are interpreted
93 <P>Mode bits are the only file-protection system in UFS. AFS allows you
94 to set the UNIX mode bits on a file in addition to the ACL on its directory,
95 but it interprets them differently. See <A HREF="#HDRWQ795">How AFS Interprets the UNIX Mode Bits</A>.
96 <P><LI>Three access permissions (UFS) versus seven (AFS)
97 <P>UFS defines three access permissions in the form of mode bits&#58;
98 <B>r</B> (<B>read</B>), <B>w</B> (<B>write</B>), and
99 <B>x</B> (<B>execute</B>). AFS defines seven permissions, which
100 makes access control more precise. For detailed descriptions, see <A HREF="#HDRWQ782">The AFS ACL Permissions</A>.
101 <DL>
102 <DD><P><B>a</B> (<B>administer</B>)
103 <DD><P><B>d</B> (<B>delete</B>)
104 <DD><P><B>i</B> (<B>insert</B>)
105 <DD><P><B>k</B> (<B>lock</B>)
106 <DD><P><B>l</B> (<B>lookup</B>)
107 <DD><P><B>r</B> (<B>read</B>)
108 <DD><P><B>w</B> (<B>write</B>)
109 </DL>
110 <P><LI>Three defined users and groups (UFS) versus many (AFS)
111 <P>UFS controls access for one user and two groups by providing a set of mode
112 bits for each&#58; the user who owns the file or directory, a single defined
113 group, and everyone who has an account on the system.
114 <P>AFS, in contrast, allows you to place many entries (individual users or
115 groups) on an ACL, granting a different set of access permissions to each
116 one. The number of possible entries is about 20, and depends on how
117 much space each entry occupies in the memory allocated for the ACL
118 itself.
119 <P>AFS defines two system groups, <B>system&#58;anyuser</B> and
120 <B>system&#58;authuser</B>, which represent all users and all
121 authenticated users, respectively; for further discussion, see <A HREF="#HDRWQ786">Using Groups on ACLs</A>. In addition, users can define their own groups in
122 the Protection Database, consisting of individual users or machine IP
123 addresses. Users who have the <B>a</B> permission on an ACL can
124 create entries for the system groups as well as groups defined by themselves
125 or other users. For information on defining groups, see <A HREF="auagd019.htm#HDRWQ721">Administering the Protection Database</A>.
126 <P>When a user requests access to a file or directory, the File Server sums
127 together all of the permissions that the relevant ACL extends to the user and
128 to groups to which the user belongs. Placing group entries on ACLs
129 therefore can control access for many more users than the ACL can accommodate
130 as individual entries.
131 </UL>
132 <P><H3><A NAME="HDRWQ782" HREF="auagd002.htm#ToC_632">The AFS ACL Permissions</A></H3>
133 <A NAME="IDX8022"></A>
134 <A NAME="IDX8023"></A>
135 <A NAME="IDX8024"></A>
136 <P>Functionally, the seven standard ACL permissions fall into two
137 groups&#58; one that applies to the directory itself and one that applies to
138 the files it contains.
139 <P><H4><A NAME="HDRWQ783">The Four Directory Permissions</A></H4>
140 <P>The four permissions in this group are meaningful with
141 respect to the directory itself. For example, the <B>i</B>
142 (<B>insert</B>) permission does not control addition of data to a file,
143 but rather creation of a new file or subdirectory.
144 <DL>
145 <P><DT><B>The l (lookup) permission
146 </B><DD>This permission functions as something of a gate keeper for access to the
147 directory and its files, because a user must have it in order to exercise any
148 other permissions. In particular, a user must have this permission to
149 access anything in the directory&#39;s subdirectories, even if the ACL on a
150 subdirectory grants extensive permissions.
151 <A NAME="IDX8025"></A>
152 <A NAME="IDX8026"></A>
153 <P>This permission enables a user to issue the following commands&#58;
154 <UL>
155 <P><LI>The <B>ls</B> command to list the names of the files and
156 subdirectories in the directory
157 <P><LI>The <B>ls -ld</B> command to obtain complete status information for
158 the directory element itself
159 <P><LI>The <B>fs listacl</B> command to examine the directory&#39;s ACL
160 </UL>
161 <P>This permission does not enable a user to read the contents of a file in
162 the directory, to issue the <B>ls -l</B> command on a file in the
163 directory, or to issue the <B>fs listacl</B> command with the filename as
164 the <B>-path</B> argument. Those operations require the
165 <B>r</B> (<B>read</B>) permission which is described in <A HREF="#HDRWQ784">The Three File Permissions</A>.
166 <P>Similarly, this permission does not enable a user to issue the
167 <B>ls</B>, <B>ls -l</B>, <B>ls -ld</B>, or <B>fs listacl</B>
168 commands against a subdirectory of the directory. Those operations
169 require the <B>l</B> permission on the ACL of the subdirectory
170 itself.
171 <P><DT><B>The i (insert) permission
172 </B><DD>This permission enables a user to add new files to the directory, either
173 by creating or copying, and to create new subdirectories. It does not
174 extend into any subdirectories, which are protected by their own ACLs.
175 <A NAME="IDX8027"></A>
176 <A NAME="IDX8028"></A>
177 <P><DT><B>The d (delete) permission
178 </B><DD>This permission enables a user to remove files and subdirectories from the
179 directory or move them into other directories (assuming that the user has the
180 <B>i</B> permission on the ACL of the other directories).
181 <A NAME="IDX8029"></A>
182 <A NAME="IDX8030"></A>
183 <P><DT><B>The a (administer) permission
184 </B><DD>This permission enables a user to change the directory&#39;s ACL.
185 Members of the <B>system&#58;administrators</B> group implicitly have
186 this permission on every directory (that is, even if that group does not
187 appear on the ACL). Similarly, the owner of a directory implicitly has
188 this permission on its ACL and those of all directories below it that he or
189 she owns.
190 <A NAME="IDX8031"></A>
191 <A NAME="IDX8032"></A>
192 </DL>
193 <P><H4><A NAME="HDRWQ784">The Three File Permissions</A></H4>
194 <P>The three permissions in this group are meaningful with
195 respect to files in a directory, rather than the directory itself or its
196 subdirectories.
197 <DL>
198 <P><DT><B>The r (read) permission
199 </B><DD>This permission enables a user to read the contents of files in the
200 directory and to issue the <B>ls -l</B> command to stat the file
201 elements.
202 <A NAME="IDX8033"></A>
203 <A NAME="IDX8034"></A>
204 <P><DT><B>The w (write) permission
205 </B><DD>This permission enables a user to modify the contents of files in the
206 directory and to issue the <B>chmod</B> command to change their UNIX mode
207 bits.
208 <A NAME="IDX8035"></A>
209 <A NAME="IDX8036"></A>
210 <P><DT><B>The k (lock) permission
211 </B><DD>This permission enables the user to run programs that issue system calls
212 to lock files in the directory. 
213 <A NAME="IDX8037"></A>
214 <A NAME="IDX8038"></A>
215 </DL>
216 <P><H4><A NAME="Header_635">The Eight Auxiliary Permissions</A></H4>
217 <A NAME="IDX8039"></A>
218 <A NAME="IDX8040"></A>
219 <A NAME="IDX8041"></A>
220 <P>AFS provides eight additional permissions that do not have a defined
221 meaning, denoted by the uppercase letters <B>A</B>, <B>B</B>,
222 <B>C</B>, <B>D</B>, <B>E</B>, <B>F</B>, <B>G</B>, and
223 <B>H</B>.
224 <P>You can write application programs that assign a meaning to one or more of
225 the permissions, and then place them on ACLs to control file access by those
226 programs. For example, you can modify a print program to recognize and
227 interpret the permissions, and then place them on directories that house files
228 that the program accesses. Use the <B>fs listacl</B> and <B>fs
229 setacl</B> commands to display and set the auxiliary permissions on ACLs
230 just like the standard seven.
231 <P><H4><A NAME="Header_636">Shorthand Notation for Sets of Permissions</A></H4>
232 <A NAME="IDX8042"></A>
233 <A NAME="IDX8043"></A>
234 <P>You can combine the seven permissions in any way in an ACL entry, but
235 certain combinations are more useful than others. Four of the more
236 common combinations have corresponding shorthand forms. When using the
237 <B>fs setacl</B> command to define ACL entries, you can provide either one
238 or more of the individual letters that represent the permissions, or one of
239 the following shorthand forms&#58;
240 <DL>
241 <A NAME="IDX8044"></A>
242 <P><DT><B>all
243 </B><DD>Represents all seven standard permissions (<B>rlidwka</B>).
244 <A NAME="IDX8045"></A>
245 <P><DT><B>none
246 </B><DD>Removes the entry from the ACL, leaving the user or group with no
247 permissions.
248 <A NAME="IDX8046"></A>
249 <P><DT><B>read
250 </B><DD>Represents the <B>r</B> (<B>read</B>) and <B>l</B>
251 (<B>lookup</B>) permissions.
252 <A NAME="IDX8047"></A>
253 <P><DT><B>write
254 </B><DD>Represents all permissions except <B>a</B>
255 (<B>administer</B>)&#58; <B>rlidwk</B>.
256 </DL>
257 <P><H3><A NAME="HDRWQ785" HREF="auagd002.htm#ToC_637">Using Normal and Negative Permissions</A></H3>
258 <A NAME="IDX8048"></A>
259 <A NAME="IDX8049"></A>
260 <A NAME="IDX8050"></A>
261 <P>ACLs enable you both to grant and to deny access to a directory and the
262 files in it. To grant access, use the <B>fs setacl</B> command to
263 create an ACL entry that associates a set of permissions with a user or group,
264 as described in <A HREF="#HDRWQ788">Setting ACL Entries</A>. When you use the <B>fs listacl</B> command to
265 display an ACL (as described in <A HREF="#HDRWQ787">Displaying ACLs</A>), such entries appear underneath the following header, which
266 uses the term <I>rights</I> to refer to permissions&#58;
267 <PRE>   Normal rights
268 </PRE>
269 <P>There are two ways to deny access&#58;
270 <OL TYPE=1>
271 <P><LI>The recommended method is simply to omit an entry for the user or group
272 from the ACL, or to omit the appropriate permissions from the entry.
273 Use the <B>fs setacl</B> command to remove or edit an existing entry,
274 using the instructions in <A HREF="#HDRWQ789">To add, remove, or edit normal ACL permissions</A>. In most circumstances, this method is enough to
275 prevent access of certain kinds or by certain users. You must take
276 care, however, not to grant the undesired permissions to any groups to which
277 such users belong.
278 <P><LI>The more explicit method for denying access is to use the
279 <B>-negative</B> flag to the <B>fs setacl</B> command to create an
280 entry that associates <I>negative permissions</I> with the user or
281 group; for instructions, see <A HREF="#HDRWQ790">To add, remove, or edit negative ACL permissions</A>. The output from the <B>fs listacl</B>
282 command lists negative entries underneath the following header&#58; 
283 <PRE>   Negative rights
284 </PRE> 
285 <P>When determining what type of access to grant to a user, the File Server
286 first compiles a set of permissions by examining all of the entries in the
287 <TT>Normal rights</TT> section of the ACL. It then subtracts any
288 permissions associated with the user (or with groups to which the user
289 belongs) on the <TT>Negative rights</TT> section of the ACL.
290 Therefore, negative permissions always cancel out normal permissions.
291 <P>Using negative permissions reverses the usual semantics of the <B>fs
292 setacl</B> command, introducing the potential for confusion. In
293 particular, combining the <B>none</B> shorthand and the
294 <B>-negative</B> flag constitutes a double negative&#58; by removing an
295 entry from the <TT>Negative rights</TT> section of the ACL, you enable a
296 user once again to obtain permissions via entries in the <TT>Normal
297 rights</TT> section. Combining the <B>all</B> shorthand with the
298 <B>-negative</B> flag explicitly denies all permissions.
299 <P>Note also that it is pointless to create an entry in the <TT>Negative
300 rights</TT> section if an entry in the <TT>Normal rights</TT> section
301 grants the denied permissions to the <B>system&#58;anyuser</B>
302 group. In this case, users can obtain the permissions simply by using
303 the <B>unlog</B> command to discard their tokens. When they do so,
304 the File Server recognizes them as the <B>anonymous</B> user, who belongs
305 to the <B>system&#58;anyuser</B> group but does not match the entries on
306 the <TT>Negative rights</TT> section of the ACL.
307 </OL>
308 <P><H3><A NAME="HDRWQ786" HREF="auagd002.htm#ToC_638">Using Groups on ACLs</A></H3>
309 <A NAME="IDX8051"></A>
310 <A NAME="IDX8052"></A>
311 <P>As previously mentioned, placing a group entry on an ACL enables you to
312 control access for many users at once. You can grant a new user access
313 to many files and directories simply by adding the user to a group that
314 appears on the relevant ACLs. You can also create groups of machines,
315 in which case any user logged on to the machine obtains the access that is
316 granted to the group. On directories where they have the <B>a</B>
317 permission on the ACL, users can define their own groups and can create ACL
318 entries for any groups, not just groups that they create or own
319 themselves. For instructions on creating groups of users or machines,
320 and a discussion of the most effective ways to use different types of groups,
321 see <A HREF="auagd019.htm#HDRWQ721">Administering the Protection Database</A>.
322 <A NAME="IDX8053"></A>
323 <A NAME="IDX8054"></A>
324 <A NAME="IDX8055"></A>
325 <A NAME="IDX8056"></A>
326 <A NAME="IDX8057"></A>
327 <P>AFS also defines the following two system groups, which can be very useful
328 on ACLs because they potentially represent a large group of people. For
329 more information about these groups, see <A HREF="auagd019.htm#HDRWQ745">The System Groups</A>.
330 <DL>
331 <P><DT><B>system&#58;anyuser
332 </B><DD>Includes anyone who can access the cell&#39;s file tree, including users
333 who have logged in as the local superuser <B>root</B>, have connected to a
334 local machine from somewhere outside the cell, and AFS users who belong to a
335 foreign cell. This group includes users who do not have tokens that are
336 valid for the local AFS servers; the servers recognize them as the user
337 <B>anonymous</B>.
338 <P>Note that creating an ACL entry for this group is the only way to extend
339 access to AFS users from foreign cells, unless you create local authentication
340 accounts for them.
341 <A NAME="IDX8058"></A>
342 <P><DT><B>system&#58;authuser
343 </B><DD>Includes all users who have a valid AFS token obtained from the local
344 cell&#39;s authentication service.
345 </DL>
346 <P>It is particularly useful to grant the <B>l</B> (<B>lookup</B>)
347 permission to the <B>system&#58;anyuser</B> group on the ACL of most
348 directories in the file system, especially at the upper levels. This
349 permission enables users only to learn the names of files and subdirectories
350 in a directory, but without it they cannot traverse their way through the
351 directories in the path to a target file.
352 <P>A slightly more restrictive alternative is to grant the <B>l</B>
353 permission to the <B>system&#58;authuser</B> group. If that is
354 still not restrictive enough, you can grant the <B>l</B> to specific users
355 or groups, which cannot exceed about 20 in number on a given ACL.
356 <P>Another reason to grant certain permissions to the
357 <B>system&#58;anyuser</B> group is to enable the correct operation of
358 processes that provide services such as printing and mail delivery. For
359 example, in addition to the <B>l</B> permission, a print process possibly
360 needs the <B>r</B> (<B>read</B>) permission in order to access the
361 contents of files, and a mail delivery process possibly requires the
362 <B>i</B> (<B>insert</B>) permission to deliver new pieces of
363 mail.
364 <P>The ACL on the root directory of every newly created volume grants all
365 permissions to the <B>system&#58;administrators</B> group. You
366 can remove this entry if you wish, but members of the
367 <B>system&#58;administrators</B> group always implicitly have the
368 <B>a</B> (<B>administer</B>), and by default also the <B>l</B>,
369 permission on every directory&#39;s ACL. The <B>a</B> permission
370 enables them to grant themselves other permissions explicitly when
371 necessary. To learn about changing this default set of permissions, see
372 <A HREF="auagd021.htm#HDRWQ808">Administering the system&#58;administrators Group</A>.
373 <HR><H2><A NAME="HDRWQ787" HREF="auagd002.htm#ToC_639">Displaying ACLs</A></H2>
374 <A NAME="IDX8059"></A>
375 <A NAME="IDX8060"></A>
376 <P>To display the ACL associated with a file, directory or symbolic link,
377 issue the <B>fs listacl</B> command. The output for a symbolic link
378 displays the ACL that applies to its target file or directory, rather than the
379 ACL on the directory that houses the symbolic link.
380 <P><B>Note for AFS/DFS Migration Toolkit users&#58;</B> If the machine
381 on which you issue the <B>fs listacl</B> command is configured to access a
382 DCE cell&#39;s DFS filespace via the AFS/DFS Migration Toolkit, you can use
383 the command to display the ACL on DFS files and directories. To display
384 a DFS directory&#39;s Initial Container and Initial Object ACL instead of the
385 regular one, include the <B>fs listacl</B> command&#39;s <B>-id</B>
386 or <B>-if</B> flag. For instructions, see the <I>AFS/DFS
387 Migration Toolkit Administration Guide and Reference</I>. The
388 <B>fs</B> command interpreter ignores the <B>-id</B> and
389 <B>-if</B> flags if you include them when displaying an AFS ACL.
390 <A NAME="IDX8061"></A>
391 <A NAME="IDX8062"></A>
392 <P><H3><A NAME="Header_640" HREF="auagd002.htm#ToC_640">To display an ACL</A></H3>
393 <OL TYPE=1>
394 <P><LI>Issue the <B>fs listacl</B> command. 
395 <PRE>   % <B>fs listacl</B> [&lt;<VAR>dir/file&nbsp;path</VAR>><SUP>+</SUP>]
396 </PRE> 
397 <P>where
398 <DL>
399 <P><DT><B>la
400 </B><DD>Is an acceptable alias for <B>listacl</B> (and <B>lista</B> is the
401 shortest acceptable abbreviation).
402 <P><DT><B><VAR>dir/file path</VAR>
403 </B><DD>Names one or more files or directories for which to display the
404 ACL. For files, the output displays the ACL for its directory.
405 If you omit this argument, the output is for the current working
406 directory. Partial pathnames are interpreted relative to the current
407 working directory. You can also use the following notation on its own
408 or as part of a pathname&#58;
409 <DL>
410 <P><DT><B>.
411 </B><DD>(A single period). Specifies the current working directory.
412 <P><DT><B>..
413 </B><DD>(Two periods). Specifies the current working directory&#39;s
414 parent directory.
415 <P><DT><B>*
416 </B><DD>(The asterisk). Specifies each file and subdirectory in the current
417 working directory. The ACL displayed for a file is always the same as
418 for its directory, but the ACL for each subdirectory can differ.
419 </DL>
420 </DL>
421 </OL>
422 <P>The following error message indicates that you do not have the permissions
423 needed to display an ACL. To specify a directory name as the
424 <VAR>dir/file path</VAR> argument, you must have the <B>l</B>
425 (<B>lookup</B>) permission on the ACL. To specify a filename, you
426 must also have the <B>r</B> (<B>read</B>) permission on its
427 directory&#39;s ACL.
428 <PRE>   fs&#58; You don&#39;t have the required access permissions on &#39;<VAR>dir/file&nbsp;path</VAR>&#39;
429 </PRE>
430 <P>Members of the <B>system&#58;administrators</B> group and the
431 directory&#39;s owner (as reported by the <B>ls -ld</B> command)
432 implicitly have the <B>a</B> (<B>administer</B>) permission on every
433 directory&#39;s ACL, and can use the <B>fs setacl</B> command to grant
434 themselves the required permissions; for instructions, see <A HREF="#HDRWQ788">Setting ACL Entries</A>.
435 <P>The output for each file or directory specified as <VAR>dir/file path</VAR>
436 begins with the following header to identify it&#58;
437 <PRE>   Access list for  <VAR>dir/file&nbsp;path</VAR> is
438 </PRE>
439 <P>The <TT>Normal rights</TT> header appears on the next line, followed by
440 lines that each pair a user or group name and a set of permissions. The
441 permissions appear as the single letters defined in <A HREF="#HDRWQ782">The AFS ACL Permissions</A>, and always in the order <B>rlidwka</B>. If there
442 are any negative permissions, the <TT>Negative rights</TT> header appears
443 next, followed by pairs of negative permissions.
444 <P>The following example displays the ACL on user <B>terry</B>&#39;s home
445 directory in the ABC Corporation cell&#58;
446 <PRE>   % <B>fs la /afs/abc.com/usr/terry</B>
447    Access list for /afs/abc.com/usr/terry is
448    Normal permissions&#58;
449       system&#58;authuser rl
450       pat rlw
451       terry rlidwka
452    Negative permissions&#58;
453       terry&#58;other-dept rl
454       jones rl
455 </PRE>
456 <P>where <B>pat</B>, <B>terry</B>, and <B>jones</B> are individual
457 users, <B>system&#58;authuser</B> is a system group, and
458 <B>terry&#58;other-dept</B> is a group that <B>terry</B>
459 owns. The list of normal permissions grants all permissions to
460 <B>terry</B>, the <B>r</B> (<B>read</B>), <B>l</B>
461 (<B>lookup</B>), and <B>w</B> (<B>write</B>) permissions to
462 <B>pat</B>, and the <B>r</B> and <B>l</B> permissions to the
463 members of the <B>system&#58;authuser</B> group.
464 <P>The list of negative permissions denies the <B>r</B> and <B>l</B>
465 permissions to <B>jones</B> and the members of the
466 <B>terry&#58;other-dept</B> group. These entries effectively
467 prevent them from accessing <B>terry</B>&#39;s home directory in any way,
468 because they cancel out the <B>r</B> and <B>l</B> permissions extended
469 to the <B>system&#58;authuser</B> group, which is the only entry on the
470 <TT>Normal rights</TT> section of the ACL that possibly applies to
471 them.
472 <HR><H2><A NAME="HDRWQ788" HREF="auagd002.htm#ToC_641">Setting ACL Entries</A></H2>
473 <A NAME="IDX8063"></A>
474 <A NAME="IDX8064"></A>
475 <A NAME="IDX8065"></A>
476 <A NAME="IDX8066"></A>
477 <A NAME="IDX8067"></A>
478 <A NAME="IDX8068"></A>
479 <A NAME="IDX8069"></A>
480 <A NAME="IDX8070"></A>
481 <A NAME="IDX8071"></A>
482 <A NAME="IDX8072"></A>
483 <P>To add, remove, or edit ACL entries, use the <B>fs setacl</B>
484 command. By default, the command manipulates entries on the normal
485 permissions section of the ACL. To manipulate entries on the negative
486 permissions section, include the <B>-negative</B> flag.
487 <P>You must have the <B>a</B> (<B>administer</B>) permission on an ACL
488 to edit it. The owner of a directory (as reported by the <B>ls
489 -ld</B>) command and members of the <B>system&#58;administrators</B>
490 group always implicitly have it on every ACL. By default, members of
491 the <B>system&#58;administrators</B> group also implicitly have the
492 <B>l</B> (<B>lookup</B>) permission.
493 <P><B>Note for AFS/DFS Migration Toolkit users&#58;</B> If the machine
494 on which you issue the <B>fs setacl</B> command is configured to access a
495 DCE cell&#39;s DFS filespace via the AFS/DFS Migration Toolkit, you can use
496 the command to set the ACL on DFS files and directories. To set a DFS
497 directory&#39;s Initial Container and Initial Object ACL instead of the
498 regular one, include the <B>fs setacl</B> command&#39;s <B>-id</B> or
499 <B>-if</B> flag. For instructions, see the <I>AFS/DFS Migration
500 Toolkit Administration Guide and Reference</I>. The <B>fs</B>
501 command interpreter ignores the <B>-id</B> and <B>-if</B> flags if you
502 include them when setting an AFS ACL.
503 <A NAME="IDX8073"></A>
504 <A NAME="IDX8074"></A>
505 <P><H3><A NAME="HDRWQ789" HREF="auagd002.htm#ToC_642">To add, remove, or edit normal ACL permissions</A></H3>
506 <OL TYPE=1>
507 <P><LI>Verify that you have the <B>a</B> (<B>administer</B>) permission
508 on each directory for which you are editing the ACL. If necessary,
509 issue the <B>fs listacl</B> command, which is fully described in <A HREF="#HDRWQ787">Displaying ACLs</A>. 
510 <PRE>   % <B>fs listacl</B> [&lt;<VAR>dir/file path</VAR>>]
511 </PRE>
512 <P><LI>Issue the <B>fs setacl</B> command to edit entries in the normal
513 permissions section of the ACL. To remove an entry, specify the
514 <B>none</B> shorthand as the permissions. If an ACL entry already
515 exists, the permissions you specify completely replace those in the existing
516 entry.
517 <PRE>   % <B>fs setacl  -dir</B> &lt;<VAR>directory</VAR>><SUP>+</SUP> <B>-acl</B> &lt;<VAR>access&nbsp;list&nbsp;entries</VAR>><SUP>+</SUP>
518 </PRE> 
519 <P>where
520 <DL>
521 <P><DT><B>sa
522 </B><DD>Is an acceptable alias for <B>setacl</B> (and <B>seta</B> is the
523 shortest acceptable abbreviation).
524 <P><DT><B>-dir
525 </B><DD>Names one or more directories to which to apply the ACL entries defined by
526 the <B>-acl</B> argument. Partial pathnames are interpreted
527 relative to the current working directory. 
528 <P>Specify the read/write path to each directory, to avoid the failure that
529 results when you attempt to change a read-only volume. By convention,
530 you indicate the read/write path by placing a period before the cell name at
531 the pathname&#39;s second level (for example,
532 <B>/afs/.abc.com</B>). For further discussion of the
533 concept of read/write and read-only paths through the filespace, see <A HREF="auagd010.htm#HDRWQ294">The Rules of Mount Point Traversal</A>.
534 <P>You can also use the following notation on its own or as part of a
535 pathname&#58;
536 <DL>
537 <P><DT><B>.
538 </B><DD>(A single period). If used by itself, sets the ACL on the current
539 working directory.
540 <P><DT><B>..
541 </B><DD>(Two periods). If used by itself, sets the ACL on the current
542 working directory&#39;s parent directory.
543 <P><DT><B>*
544 </B><DD>(The asterisk). Sets the ACL on each of the subdirectories in the
545 current working directory. You must precede it with the <B>-dir</B>
546 switch, since it potentially designates multiple directories. The
547 <B>fs</B> command interpreter generates the following error message for
548 each file in the directory&#58; 
549 <PRE>   fs&#58; &#39;<VAR>filename</VAR>&#39;&#58; Not a directory
550 </PRE>
551 </DL>
552 <P>If you specify only one directory or file name, you can omit the
553 <B>-dir</B> and <B>-acl</B> switches.
554 <P><DT><B>-acl
555 </B><DD>Specifies one or more ACL entries, each of which pairs a user or group
556 name and a set of permissions. Separate the pairs, and the two parts of
557 each pair, with one or more spaces. 
558 <P>To define the permissions, provide either&#58;
559 <UL>
560 <P><LI>One or more of the letters that represent the standard or auxiliary
561 permissions (<B>rlidwka</B> and <B>ABCDEFGH</B>), in any order
562 <P><LI>One of the four shorthand notations&#58;
563 <UL>
564 <P><LI><B>all</B> (equals <B>rlidwka</B>)
565 <P><LI><B>none</B> (removes the entry)
566 <P><LI><B>read</B> (equals <B>rl</B>)
567 <P><LI><B>write</B> (equals <B>rlidwk</B>)
568 </UL>
569 </UL>
570 <P>For a more detailed description of the permissions and shorthand notations,
571 see <A HREF="#HDRWQ782">The AFS ACL Permissions</A>.
572 <P>On a single command line, you can combine user and group entries.
573 You can also use individual letters in some pairs and the shorthand notations
574 in other pairs, but cannot combine letters and shorthand notation within a
575 single pair.
576 </DL>
577 </OL>
578 <P>Either of the following examples grants user <B>pat</B> the
579 <B>r</B> (<B>read</B>) and <B>l</B> (<B>lookup</B>)
580 permissions on the ACL of the <B>notes</B> subdirectory in the
581 issuer&#39;s home directory. They illustrate how it is possible to
582 omit the <B>-dir</B> and <B>-acl</B> switches when you name only one
583 directory.
584 <PRE>   % <B>fs sa ~/notes pat rl</B>
585    
586    % <B>fs sa ~/notes pat read</B>
587 </PRE>
588 <P>The following example edits the ACL for the current working
589 directory. It removes the entry for the <B>system&#58;anyuser</B>
590 group, and adds two entries&#58; one grants all permissions except
591 <B>a</B> (<B>administer</B>) to the members of the
592 <B>terry&#58;colleagues</B> group and the other grants the <B>r</B>
593 (<B>read</B>) and <B>l</B> (<B>lookup</B>) permissions to the
594 <B>system&#58;authuser</B> group. The command appears on two
595 lines here only for legibility.
596 <PRE>   % <B>fs  sa  -dir . -acl  system&#58;anyuser  none  terry&#58;colleagues  write  \
597            system&#58;authuser  rl</B>
598 </PRE>
599 <A NAME="IDX8075"></A>
600 <A NAME="IDX8076"></A>
601 <A NAME="IDX8077"></A>
602 <A NAME="IDX8078"></A>
603 <A NAME="IDX8079"></A>
604 <P><H3><A NAME="HDRWQ790" HREF="auagd002.htm#ToC_643">To add, remove, or edit negative ACL permissions</A></H3>
605 <OL TYPE=1>
606 <P><LI>Verify that you have the <B>a</B> (<B>administer</B>) permission
607 on each directory for which you are editing the ACL. If necessary,
608 issue the <B>fs listacl</B> command, which is fully described in <A HREF="#HDRWQ787">Displaying ACLs</A>. 
609 <PRE>   % <B>fs listacl</B> [&lt;<VAR>dir/file path</VAR>>]
610 </PRE>
611 <P><LI>Issue the <B>fs setacl</B> command with the <B>-negative</B> flag
612 to edit entries in the negative permissions section of the ACL. To
613 remove an entry, specify the <B>none</B> shorthand as the
614 permissions. If an ACL entry already exists for a user or group, the
615 permissions you specify completely replace those in the existing entry.
616 <PRE>   % <B>fs setacl -dir</B> &lt;<VAR>directory</VAR>><SUP>+</SUP> <B>-acl</B> &lt;<VAR>access&nbsp;list&nbsp;entries</VAR>><SUP>+</SUP>  <B>-negative</B> 
617 </PRE> 
618 <P>where
619 <DL>
620 <P><DT><B>sa
621 </B><DD>Is an acceptable alias for <B>setacl</B> (and <B>seta</B> is the
622 shortest acceptable abbreviation).
623 <P><DT><B>-dir
624 </B><DD>Names one or more directories to which to apply the negative ACL entries
625 defined by the <B>-acl</B> argument. Specify the read/write path to
626 each directory, to avoid the failure that results when you attempt to change a
627 read-only volume. For a detailed description of acceptable values, see <A HREF="#HDRWQ789">To add, remove, or edit normal ACL permissions</A>.
628 <P><DT><B>-acl
629 </B><DD>Specifies one or more ACL entries, each of which pairs a user or group
630 name and a set of permissions. Separate the pairs, and the two parts of
631 each pair, with one or more spaces. For a detailed description of
632 acceptable values, see <A HREF="#HDRWQ789">To add, remove, or edit normal ACL permissions</A>. Keep in mind that the usual meaning of each
633 permission is reversed.
634 <P><DT><B>-negative
635 </B><DD>Places the entries defined by the <B>-acl</B> argument on the negative
636 permissions section of the ACL for each directory named by the <B>-dir</B>
637 argument.
638 </DL>
639 </OL>
640 <P>The following example denies user <B>pat</B> the <B>w</B>
641 (<B>write</B>) and <B>d</B> (<B>delete</B>) permissions for the
642 <B>project</B> subdirectory of the current working directory.
643 <PRE>   % <B>fs sa project pat wd -neg</B>
644 </PRE>
645 <HR><H2><A NAME="HDRWQ791" HREF="auagd002.htm#ToC_644">Completely Replacing an ACL</A></H2>
646 <A NAME="IDX8080"></A>
647 <A NAME="IDX8081"></A>
648 <A NAME="IDX8082"></A>
649 <A NAME="IDX8083"></A>
650 <A NAME="IDX8084"></A>
651 <A NAME="IDX8085"></A>
652 <P>It is sometimes simplest to clear an ACL completely before defining new
653 permissions on it, for instance if the mix of normal and negative permissions
654 makes it difficult to understand how their interaction affects a user&#39;s
655 access to the directory. To clear an ACL completely while you define
656 new entries, include the <B>-clear</B> flag on the <B>fs setacl</B>
657 command. When you include this flag, you can create entries on either
658 the normal permissions or the negative permissions section of the ACL, but not
659 on both at once.
660 <P>Remember to create an entry that grants appropriate permissions to the
661 directory&#39;s owner. The owner implicitly has the <B>a</B>
662 (<B>administer</B>) permission required to replace a deleted entry, but
663 the effects of a missing ACL entry (particularly the lack of the
664 <B>lookup</B> permission) can be so confusing that it becomes difficult
665 for the owner to realize that the missing entry is causing the
666 problems.
667 <A NAME="IDX8086"></A>
668 <A NAME="IDX8087"></A>
669 <P><H3><A NAME="Header_645" HREF="auagd002.htm#ToC_645">To replace an ACL completely</A></H3>
670 <OL TYPE=1>
671 <P><LI>Verify that you have the <B>a</B> (<B>administer</B>) permission
672 on each directory for which you are editing the ACL. If necessary,
673 issue the <B>fs listacl</B> command, which is fully described in <A HREF="#HDRWQ787">Displaying ACLs</A>. 
674 <PRE>   % <B>fs listacl</B> [&lt;<VAR>dir/file path</VAR>>]
675 </PRE>
676 <P><LI>Issue the <B>fs setacl</B> command with the <B>-clear</B> flag to
677 clear the ACL completely before setting either normal or negative
678 permissions. Because you need to grant the owner of the directory all
679 permissions, it is better in most cases to set normal permissions at this
680 point.
681 <PRE>   % <B>fs setacl -dir</B> &lt;<VAR>directory</VAR>><SUP>+</SUP> <B>-acl</B> &lt;<VAR>access&nbsp;list&nbsp;entries</VAR>><SUP>+</SUP> <B>-clear</B>  \
682                [<B>-negative</B>] 
683 </PRE> 
684 <P>where
685 <DL>
686 <P><DT><B>sa
687 </B><DD>Is an acceptable alias for <B>setacl</B> (and <B>seta</B> is the
688 shortest acceptable abbreviation).
689 <P><DT><B>-dir
690 </B><DD>Names one or more directories to which to apply the negative ACL entries
691 defined by the <B>-acl</B> argument. Specify the read/write path to
692 each directory, to avoid the failure that results when you attempt to change a
693 read-only volume. For a detailed description of acceptable values, see <A HREF="#HDRWQ789">To add, remove, or edit normal ACL permissions</A>.
694 <P><DT><B>-acl
695 </B><DD>Specifies one or more ACL entries, each of which pairs a user or group
696 name and a set of permissions. Separate the pairs, and the two parts of
697 each pair, with one or more spaces. Remember to grant all permissions
698 to the owner of the directory. For a detailed description of acceptable
699 values, see <A HREF="#HDRWQ789">To add, remove, or edit normal ACL permissions</A>.
700 <P><DT><B>-clear
701 </B><DD>Removes all entries from each ACL before creating the entries indicated by
702 the <B>-acl</B> argument.
703 <P><DT><B>-negative
704 </B><DD>Places the entries defined by the <B>-acl</B> argument on the negative
705 permissions section of each ACL.
706 </DL>
707 </OL>
708 <HR><H2><A NAME="HDRWQ792" HREF="auagd002.htm#ToC_646">Copying ACLs Between Directories</A></H2>
709 <A NAME="IDX8088"></A>
710 <A NAME="IDX8089"></A>
711 <A NAME="IDX8090"></A>
712 <P>The <B>fs copyacl</B> command copies a source directory&#39;s ACL to
713 one or more destination directories. It does not affect the source ACL
714 at all, but changes each destination ACL as follows&#58;
715 <UL>
716 <P><LI>If an entry on the source ACL does not exist on the destination ACL, the
717 command copies it to the destination ACL.
718 <P><LI>If an entry on the destination ACL does not also exist on the source ACL,
719 the command does not remove it unless you include the <B>-clear</B> flag
720 to overwrite the destination ACL completely.
721 <P><LI>If an entry is on both ACLs, the command changes the permissions on the
722 destination ACL entry to match the source ACL entry.
723 </UL>
724 <P><B>Note for AFS/DFS Migration Toolkit users&#58;</B> If the machine
725 is configured to enable AFS users to access a DCE cell&#39;s DFS filespace
726 via the AFS/DFS Migration Toolkit, then you can use the <B>fs copyacl</B>
727 command to copy ACLs between DFS files and directories also. The
728 command includes <B>-id</B> and <B>-if</B> flags for altering a DFS
729 directory&#39;s Initial Container and Initial Object ACLs as well as its
730 regular ACL; see the <I>AFS/DFS Migration Toolkit Administration Guide
731 and Reference</I>. You cannot copy ACLs between AFS and DFS
732 directories, because they use different ACL formats. The <B>fs</B>
733 command interpreter ignores the <B>-id</B> and <B>-if</B> flags if you
734 include them when copying AFS ACLs.
735 <A NAME="IDX8091"></A>
736 <A NAME="IDX8092"></A>
737 <P><H3><A NAME="Header_647" HREF="auagd002.htm#ToC_647">To copy an ACL between directories</A></H3>
738 <OL TYPE=1>
739 <P><LI>Verify that you have the <B>l</B> (<B>lookup</B>) permission on
740 the source ACL and the <B>a</B> (<B>administer</B>) permission on each
741 destination ACL. To identify the source directory by naming a file in
742 it, you must also have the <B>r</B> (<B>read</B>) permission on the
743 source ACL. If necessary, issue the <B>fs listacl</B> command,
744 which is fully described in <A HREF="#HDRWQ787">Displaying ACLs</A>. 
745 <PRE>   % <B>fs listacl</B> [&lt;<VAR>dir/file path</VAR>>]
746 </PRE>
747 <P><LI><A NAME="LIWQ793"></A>Issue the <B>fs copyacl</B> command to copy a source ACL to
748 the ACL on one or more destination directories. (The command appears
749 here on two lines only for legibility.)
750 <PRE>   % <B>fs copyacl -fromdir</B> &lt;<VAR>source&nbsp;directory</VAR>> <B>-todir</B> &lt;<VAR>destination&nbsp;directory</VAR>><SUP>+</SUP>  \
751                 [<B>-clear</B>]
752 </PRE> 
753 <P>where 
754 <DL>
755 <P><DT><B>co
756 </B><DD>Is the shortest acceptable abbreviation for <B>copyacl</B>.
757 <P><DT><B>-fromdir
758 </B><DD>Names the source directory from which to copy the ACL. Partial
759 pathnames are interpreted relative to the current working directory. If
760 this argument names a file, the ACL is copied from its directory.
761 <P><DT><B>-todir
762 </B><DD>Names each destination directory to which to copy the source ACL.
763 Partial pathnames are interpreted relative to the current working
764 directory. Filenames are not acceptable. 
765 <P>Specify the read/write path to each directory, to avoid the failure that
766 results when you attempt to change a read-only volume. By convention,
767 you indicate the read/write path by placing a period before the cell name at
768 the pathname&#39;s second level (for example,
769 <B>/afs/.abc.com</B>). For further discussion of the
770 concept of read/write and read-only paths through the filespace, see <A HREF="auagd010.htm#HDRWQ294">The Rules of Mount Point Traversal</A>.
771 <P><DT><B>-clear
772 </B><DD>Completely overwrites each destination directory&#39;s ACL with the
773 source ACL.
774 </DL>
775 </OL>
776 <P>The following example copies the ACL from the current working
777 directory&#39;s <B>notes</B> subdirectory to the <B>plans</B>
778 subdirectory. The issuer does not include the <B>-clear</B> flag,
779 so the entry for user <B>pat</B> remains on the <B>plans</B>
780 directory&#39;s ACL although there is no corresponding entry on the
781 <B>notes</B> directory&#39;s ACL.
782 <PRE>   % <B>fs la notes plans</B>
783    Access list for notes is
784    Normal permissions&#58;
785       terry rlidwka
786       smith rl
787       jones rl
788    Access list for plans is
789    Normal permissions&#58;
790       terry rlidwk
791       pat rlidwk
792    % <B>fs copyacl notes plans</B>
793    % <B>fs la notes plans</B>
794    Access list for notes is
795    Normal permissions&#58;
796       terry rlidwka
797       smith rl
798       jones rl
799    Access list for plans is
800    Normal permissions&#58;
801       terry rlidwka
802       pat rlidwk
803       smith rl
804       jones rl
805 </PRE>
806 <A NAME="IDX8093"></A>
807 <A NAME="IDX8094"></A>
808 <A NAME="IDX8095"></A>
809 <A NAME="IDX8096"></A>
810 <A NAME="IDX8097"></A>
811 <HR><H2><A NAME="HDRWQ794" HREF="auagd002.htm#ToC_648">Removing Obsolete AFS IDs from ACLs</A></H2>
812 <P>When you remove a user or group entry from the Protection
813 Database, the <B>fs listacl</B> command displays the user&#39;s AFS UID
814 (or group&#39;s AFS GID) in ACL entries, rather than the name. In the
815 following example, user <B>terry</B> has an ACL entry for the group
816 <B>terry&#58;friends</B> (AFS GID -567) on her home directory in the ABC
817 Corporation cell, and then removes the group from the Protection
818 Database.
819 <PRE>   % <B>fs listacl /afs/abc.com/usr/terry</B>
820    Access list for /afs/abc.com/usr/terry is
821    Normal permissions&#58;
822      terry&#58;friends rlik
823      system&#58;anyuser l
824      terry rlidwka
825    % <B>pts delete terry&#58;friends</B>
826    % <B>fs listacl /afs/abc.com/usr/terry</B>
827    Access list for /afs/abc.com/usr/terry is
828    Normal permissions&#58;
829      -567 rlik
830      system&#58;anyuser l
831      terry rlidwka
832 </PRE>
833 <P>Leaving AFS IDs on ACLs serves no function, because the ID no longer
834 corresponds to an active user or group. Furthermore, if the ID is ever
835 assigned to a new user or group, then the new possessor of the ID gains access
836 that the owner of the directory actually intended for the previous
837 possessor. (Reusing AFS IDs is not recommended precisely for this
838 reason.)
839 <P>To remove obsolete AFS UIDs from ACLs, use the <B>fs cleanacl</B>
840 command.
841 <A NAME="IDX8098"></A>
842 <A NAME="IDX8099"></A>
843 <P><H3><A NAME="Header_649" HREF="auagd002.htm#ToC_649">To clean obsolete AFS IDs from an ACL</A></H3>
844 <OL TYPE=1>
845 <P><LI>Verify that you have the <B>a</B> (<B>administer</B>) permission
846 on each directory for which you are cleaning the ACL. If necessary,
847 issue the <B>fs listacl</B> command, which is fully described in <A HREF="#HDRWQ787">Displaying ACLs</A>. 
848 <PRE>   % <B>fs listacl</B> [&lt;<VAR>dir/file path</VAR>>]
849 </PRE>
850 <P><LI>Issue the <B>fs cleanacl</B> command to remove entries for obsolete
851 AFS IDs. 
852 <PRE>   % <B>fs cleanacl</B> [&lt;<VAR>dir/file&nbsp;path</VAR>><SUP>+</SUP>]
853 </PRE> 
854 <P>where 
855 <DL>
856 <P><DT><B>cl
857 </B><DD>Is the shortest acceptable abbreviation of <B>cleanacl</B>.
858 <P><DT><B><VAR>dir/file path</VAR>
859 </B><DD>Names each directory for which to clean the ACL. If this argument
860 names a file, its directory&#39;s ACL is cleaned. Omit this argument
861 to clean the current working directory&#39;s ACL. 
862 <P>Specify the read/write path to each directory, to avoid the failure that
863 results when you attempt to change a read-only volume. By convention,
864 you indicate the read/write path by placing a period before the cell name at
865 the pathname&#39;s second level (for example,
866 <B>/afs/.abc.com</B>). For further discussion of the
867 concept of read/write and read-only paths through the filespace, see <A HREF="auagd010.htm#HDRWQ294">The Rules of Mount Point Traversal</A>.
868 <P>You can also use the following notation on its own or as part of a
869 pathname&#58;
870 <DL>
871 <P><DT><B>.
872 </B><DD>(A single period). If used by itself, cleans the current working
873 directory&#39;s ACL.
874 <P><DT><B>..
875 </B><DD>(Two periods). If used by itself, cleans the ACL on the current
876 working directory&#39;s parent directory.
877 <P><DT><B>*
878 </B><DD>(The asterisk). Cleans the ACL of each of the subdirectories in the
879 current working directory. However, if you use the asterisk and there
880 are obsolete AFS IDs on any directory&#39;s ACL, the following error message
881 appears for every file in the directory&#58; 
882 <PRE>   fs&#58; &#39;<VAR>filename</VAR>&#39;&#58; Not a directory
883 </PRE>
884 </DL>
885 </DL>
886 </OL>
887 <P>If there are obsolete AFS IDs on a directory, the command interpreter
888 displays its cleaned ACL under the following header.
889 <PRE>   Access list for <VAR>directory</VAR> is now
890 </PRE>
891 <P>If a directory&#39;s ACL has no obsolete AFS IDs on it, the following
892 message appears for each.
893 <PRE>   Access list for <VAR>directory</VAR> is fine.
894 </PRE>
895 <HR><H2><A NAME="HDRWQ795" HREF="auagd002.htm#ToC_650">How AFS Interprets the UNIX Mode Bits</A></H2>
896 <A NAME="IDX8100"></A>
897 <A NAME="IDX8101"></A>
898 <A NAME="IDX8102"></A>
899 <P>Although AFS uses ACLs to protect file data rather than the mode bits that
900 UFS uses, it does not ignore the mode bits entirely. When you issue the
901 <B>chmod</B> command on an AFS file or directory, AFS changes the bits
902 appropriately. To change a file&#39;s mode bits, you must have the AFS
903 <B>w</B> (<B>write</B>) permission on the ACL of the file&#39;s
904 directory. To change a directory&#39;s mode bits, you must have the
905 <B>d</B> (<B>delete</B>), <B>i</B> (<B>insert</B>), and
906 <B>l</B> (<B>lookup</B>) permissions on its ACL.
907 <P>AFS also uses the UNIX mode bits as follows&#58;
908 <UL>
909 <P><LI>It uses the initial bit to determine the element&#39;s type. This
910 is the bit that appears first in the output from the <B>ls -l</B> command
911 and shows the hyphen (<B>-</B>) for a file or the letter <B>d</B> for
912 a directory.
913 <P><LI>It does not use any of the mode bits on a directory.
914 <P><LI>For a file, the first (owner) set of bits interacts with the ACL entries
915 that apply to the file in the following way&#58;
916 <UL>
917 <P><LI>If the first <B>r</B> mode bit is not set, no one (including the
918 owner) can read the file, no matter what permissions they have on the
919 ACL. If the bit is set, users also need the <B>r</B>
920 (<B>read</B>) and <B>l</B> permissions on the ACL of the file&#39;s
921 directory to read the file.
922 <P><LI>If the first <B>w</B> mode bit is not set, no one (including the
923 owner) can modify the file. If the <B>w</B> bit is set, users also
924 need the <B>w</B> and <B>l</B> permissions on the ACL of the
925 file&#39;s directory to modify the file.
926 <P><LI>There is no ACL permission directly corresponding to the <B>x</B> mode
927 bit, but to execute a file stored in AFS, the user must also have the
928 <B>r</B> and <B>l</B> permissions on the ACL of the file&#39;s
929 directory.
930 </UL>
931 </UL>
932 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auagd002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auagd019.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Top_Of_Page"><IMG SRC="../top.gif" BORDER="0" ALT="[Top of Topic]"></A> <A HREF="auagd021.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auagd026.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
933 <!-- Begin Footer Records  ========================================== -->
934 <P><HR><B> 
935 <br>&#169; <A HREF="http://www.ibm.com/">IBM Corporation 2000.</A>  All Rights Reserved 
936 </B> 
937 <!-- End Footer Records  ============================================ -->
938 <A NAME="Bot_Of_Page"></A>
939 </BODY></HTML>