autoconf-updates-for-ac-check-lib-quoting-20010629
[openafs.git] / doc / html / AdminReference / auarf157.htm
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4//EN">
2 <HTML><HEAD>
3 <TITLE>Administration Reference</TITLE>
4 <!-- Begin Header Records  ========================================== -->
5 <!-- /tmp/idwt3672/auarf000.scr converted by idb2h R4.2 (359) ID      -->
6 <!-- Workbench Version (AIX) on 3 Oct 2000 at 16:18:30                -->
7 <META HTTP-EQUIV="updated" CONTENT="Tue, 03 Oct 2000 16:18:29">
8 <META HTTP-EQUIV="review" CONTENT="Wed, 03 Oct 2001 16:18:29">
9 <META HTTP-EQUIV="expires" CONTENT="Thu, 03 Oct 2002 16:18:29">
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 Reference</H1>
16 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf156.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="auarf158.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
17 <P>
18 <H2><A NAME="HDRFS_SETACL" HREF="auarf002.htm#ToC_171">fs setacl</A></H2>
19 <A NAME="IDX4924"></A>
20 <A NAME="IDX4925"></A>
21 <A NAME="IDX4926"></A>
22 <A NAME="IDX4927"></A>
23 <A NAME="IDX4928"></A>
24 <A NAME="IDX4929"></A>
25 <A NAME="IDX4930"></A>
26 <A NAME="IDX4931"></A>
27 <A NAME="IDX4932"></A>
28 <A NAME="IDX4933"></A>
29 <A NAME="IDX4934"></A>
30 <A NAME="IDX4935"></A>
31 <A NAME="IDX4936"></A>
32 <P><STRONG>Purpose</STRONG>
33 <P>Sets the ACL for a directory
34 <P><STRONG>Synopsis</STRONG>
35 <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>  
36           [<B>-clear</B>]  [<B>-negative</B>]  [<B>-id</B>]  [<B>-if</B>]  [<B>-help</B>]
37     
38 <B>fs sa -d</B> &lt;<VAR>directory</VAR>><SUP>+</SUP>  <B>-a</B> &lt;<VAR>access&nbsp;list&nbsp;entries</VAR>><SUP>+</SUP>  
39       [<B>-c</B>]  [<B>-n</B>]  [<B>-id</B>]  [<B>-if</B>]  [<B>-h</B>] 
40       
41 <B>fs seta -d</B> &lt;<VAR>directory</VAR>><SUP>+</SUP>  <B>-a</B> &lt;<VAR>access&nbsp;list&nbsp;entries</VAR>><SUP>+</SUP>  
42         [<B>-c</B>]  [<B>-n</B>]  [<B>-id</B>]  [<B>-if</B>]  [<B>-h</B>]
43 </PRE>
44 <P><STRONG>Description</STRONG>
45 <P>The <B>fs setacl</B> command adds the access control list (ACL) entries
46 specified with the <B>-acl</B> argument to the ACL of each directory named
47 by the <B>-dir</B> argument.
48 <P>If the <B>-dir</B> argument designates a pathname in DFS filespace
49 (accessed via the AFS/DFS Migration Toolkit Protocol Translator), it can be a
50 file as well as a directory. The ACL must already include an entry for
51 <B>mask_obj</B>, however. For more details, refer to the <I>IBM
52 AFS/DFS Migration Toolkit Administration Guide and Reference</I>.
53 <P>Only user and group entries are acceptable values for the <B>-acl</B>
54 argument. Do not place machine entries (IP addresses) directly on an
55 ACL; instead, make the machine entry a group member and place the group
56 on the ACL.
57 <P>To completely erase the existing ACL before adding the new entries, provide
58 the <B>-clear</B> flag. To add the specified entries to the
59 <TT>Negative</TT> <TT>rights</TT> section of the ACL (deny rights to
60 specified users or groups), provide the <B>-negative</B> flag.
61 <P>To display an ACL, use the <B>fs listacl</B> command. To copy an
62 ACL from one directory to another, use the <B>fs copyacl</B>
63 command.
64 <P><STRONG>Cautions</STRONG>
65 <P>If the ACL already grants certain permissions to a user or group, the
66 permissions specified with the <B>fs setacl</B> command replace the
67 existing permissions, rather than being added to them.
68 <P>Setting negative permissions is generally unnecessary and not
69 recommended. Simply omitting a user or group from the <TT>Normal</TT>
70 <TT>rights</TT> section of the ACL is normally adequate to prevent
71 access. In particular, note that it is futile to deny permissions that
72 are granted to members of the <B>system:anyuser</B> group on the
73 same ACL; the user needs only to issue the <B>unlog</B> command to
74 receive the denied permissions.
75 <P>When including the <B>-clear</B> option, be sure to reinstate an entry
76 for each directory's owner that includes at least the <B>l</B>
77 (<B>lookup</B>) permission. Without that permission, it is
78 impossible to resolve the "dot" ( . ) and "dot dot" ( . .
79 ) shorthand from within the directory. (The directory's owner does
80 implicitly have the <B>a</B> [<B>administer</B>] permission even on a
81 cleared ACL, but must know to use it to add other permissions.)
82 <P><STRONG>Options</STRONG>
83 <DL>
84 <P><DT><B>-dir
85 </B><DD>Names each AFS directory, or DFS directory or file, for which the set the
86 ACL. Partial pathnames are interpreted relative to the current working
87 directory.
88 <P>Specify the read/write path to each directory (or DFS file), to avoid the
89 failure that results from attempting to change a read-only volume. By
90 convention, the read/write path is indicated by placing a period before the
91 cell name at the pathname's second level (for example,
92 <B>/afs/.abc.com</B>). For further discussion of the
93 concept of read/write and read-only paths through the filespace, see the
94 <B>fs mkmount</B> reference page.
95 <P><DT><B>-acl
96 </B><DD>Defines a list of one or more ACL entries, each a pair that names 
97 <UL>
98 <P><LI>A user name or group name as listed in the Protection Database
99 <P><LI>One or more ACL permissions, indicated either by combining the individual
100 letters or by one of the four acceptable shorthand words
101 </UL>
102 <P>
103 <P>in that order, separated by a space (thus every instance of this argument
104 has two parts). The accepted AFS abbreviations and shorthand words, and
105 the meaning of each, are as follows: 
106 <DL>
107 <P><DT><B>a
108 </B><DD>(<B>administer</B>): change the entries on the ACL
109 <P><DT><B>d
110 </B><DD>(<B>delete</B>): remove files and subdirectories from the
111 directory or move them to other directories
112 <P><DT><B>i
113 </B><DD>(<B>insert</B>): add files or subdirectories to the directory by
114 copying, moving or creating
115 <P><DT><B>k
116 </B><DD>(<B>lock</B>): set read locks or write locks on the files in the
117 directory
118 <P><DT><B>l
119 </B><DD>(<B>lookup</B>): list the files and subdirectories in the
120 directory, stat the directory itself, and issue the <B>fs listacl</B>
121 command to examine the directory's ACL
122 <P><DT><B>r
123 </B><DD>(<B>read</B>): read the contents of files in the directory;
124 issue the <B>ls -l</B> command to stat the elements in the directory
125 <P><DT><B>w
126 </B><DD>(<B>write</B>): modify the contents of files in the directory,
127 and issue the UNIX <B>chmod</B> command to change their mode bits
128 <P><DT><B>A, B, C, D, E, F, G, H
129 </B><DD>Have no default meaning to the AFS server processes, but are made
130 available for applications to use in controlling access to the
131 directory's contents in additional ways. The letters must be
132 uppercase.
133 <P><DT><B>all
134 </B><DD>Equals all seven permissions (<B>rlidwka</B>).
135 <A NAME="IDX4937"></A>
136 <A NAME="IDX4938"></A>
137 <A NAME="IDX4939"></A>
138 <A NAME="IDX4940"></A>
139 <P><DT><B>none
140 </B><DD>No permissions. Removes the user/group from the ACL, but does not
141 guarantee they have no permissions if they belong to groups that remain on the
142 ACL.
143 <A NAME="IDX4941"></A>
144 <A NAME="IDX4942"></A>
145 <P><DT><B>read
146 </B><DD>Equals the <B>r</B> (<B>read</B>) and <B>l</B>
147 (<B>lookup</B>) permissions.
148 <A NAME="IDX4943"></A>
149 <A NAME="IDX4944"></A>
150 <P><DT><B>write
151 </B><DD>Equals all permissions except <B>a</B> (<B>administer</B>), that
152 is, <B>rlidwk</B>.
153 <A NAME="IDX4945"></A>
154 <A NAME="IDX4946"></A>
155 </DL>
156 <P>
157 <P>It is acceptable to mix entries that combine the individual letters with
158 entries that use the shorthand words, but not use both types of notation
159 within an individual pairing of user or group and permissions. 
160 <P>To learn the proper format and acceptable values for DFS ACL entries, see
161 the <I>IBM AFS/DFS Migration Toolkit Administration Guide and
162 Reference</I>.
163 <P><DT><B>-clear
164 </B><DD>Removes all existing entries on each ACL before adding the entries
165 specified with the <B>-acl</B> argument.
166 <P><DT><B>-negative
167 </B><DD>Places the specified ACL entries in the <TT>Negative</TT>
168 <TT>rights</TT> section of each ACL, explicitly denying the rights to the
169 user or group, even if entries on the accompanying <TT>Normal</TT>
170 <TT>rights</TT> section of the ACL grant them permissions.
171 <P>This argument is not supported for DFS files or directories, because DFS
172 does not implement negative ACL permissions.
173 <P><DT><B>-id
174 </B><DD>Places the ACL entries on the Initial Container ACL of each DFS directory,
175 which are the only file system objects for which this flag is
176 supported.
177 <P><DT><B>-if
178 </B><DD>Places the ACL entries on the Initial Object ACL of each DFS directory,
179 which are the only file system objects for which this flag is
180 supported.
181 <P><DT><B>-help
182 </B><DD>Prints the online help for this command. All other valid options
183 are ignored.
184 </DL>
185 <P><STRONG>Examples</STRONG>
186 <P>The following example adds two entries to the <TT>Normal rights</TT>
187 section of the current working directory's ACL: the first entry
188 grants <B>r</B> (<B>read</B>) and <B>l</B> (<B>lookup</B>)
189 permissions to the group <B>pat:friends</B>, while the other (using
190 the <B>write</B> shorthand) gives all permissions except <B>a</B>
191 (<B>administer</B>) to the user <B>smith</B>.
192 <PRE>   % <B>fs setacl -dir . -acl pat:friends rl smith write</B>
193    
194    % <B>fs listacl -path </B>.
195    Access list for . is
196    Normal rights:
197       pat:friends rl
198       smith rlidwk
199    
200 </PRE>
201 <P>The following example includes the <B>-clear</B> flag, which removes
202 the existing permissions (as displayed with the <B>fs listacl</B> command)
203 from the current working directory's <B>reports</B> subdirectory and
204 replaces them with a new set.
205 <PRE>   % <B>fs listacl -dir reports</B>
206    Access list for reports is
207    Normal rights:
208       system:authuser rl
209       pat:friends rlid
210       smith rlidwk
211       pat rlidwka
212    Negative rights:
213       terry rl
214    
215    % <B>fs setacl -clear -dir reports -acl pat all smith write system:anyuser rl</B>
216    
217    % <B>fs listacl -dir reports</B>
218    Access list for reports is
219    Normal rights:
220       system:anyuser rl
221       smith rlidwk
222       pat rlidwka
223    
224 </PRE>
225 <P>The following example use the <B>-dir</B> and <B>-acl</B> switches
226 because it sets the ACL for more than one directory (both the current working
227 directory and its <B>public</B> subdirectory).
228 <PRE>   % <B>fs setacl -dir . public -acl pat:friends rli</B>
229       
230    % <B>fs listacl -path . public</B>
231    Access list for . is
232    Normal rights:
233       pat rlidwka
234       pat:friends rli
235    Access list for public is
236    Normal rights:
237       pat rlidwka
238       pat:friends rli
239    
240 </PRE>
241 <P><STRONG>Privilege Required</STRONG>
242 <P>The issuer must have the <B>a</B> (<B>administer</B>) permission on
243 the directory's ACL; the directory's owner and the members of
244 the <B>system:administrators</B> group have the right implicitly,
245 even if it does not appear on the ACL.
246 <P><STRONG>Related Information</STRONG>
247 <P><A HREF="auarf136.htm#HDRFS_COPYACL">fs copyacl</A>
248 <P><A HREF="auarf148.htm#HDRFS_LISTACL">fs listacl</A>
249 <P><A HREF="auarf153.htm#HDRFS_MKMOUNT">fs mkmount</A>
250 <P><I>IBM AFS/DFS Migration Toolkit Administration Guide and Reference</I>
251 <P>
252 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf156.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="auarf158.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
253 <!-- Begin Footer Records  ========================================== -->
254 <P><HR><B> 
255 <br>&#169; <A HREF="http://www.ibm.com/">IBM Corporation 2000.</A>  All Rights Reserved 
256 </B> 
257 <!-- End Footer Records  ============================================ -->
258 <A NAME="Bot_Of_Page"></A>
259 </BODY></HTML>