Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / doc / xml / UserGuide / auusg004.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <chapter id="HDRWQ2">
3 <title>An Introduction to OpenAFS</title>
4
5 <para>This chapter introduces basic AFS concepts and terms. It assumes that you are already familiar with standard UNIX commands,
6 file protection, and pathname conventions.</para>
7
8 <sect1 id="HDRWQ3">
9 <title>AFS Concepts</title>
10
11 <para>AFS makes it easy for people to work together on the same files, no matter where the files are located. AFS users do not
12 have to know which machine is storing a file, and administrators can move files from machine to machine without interrupting
13 user access. Users always identify a file by the same pathname and AFS finds the correct file automatically, just as happens in
14 the local file system on a single machine. While AFS makes file sharing easy, it does not compromise the security of the shared
15 files. It provides a sophisticated protection scheme. <indexterm><primary>AFS</primary><secondary>sharing information</secondary></indexterm> <indexterm><primary>AFS</primary><secondary>transparent access</secondary></indexterm></para>
16
17 <sect2 id="Header_9">
18 <title>Client/Server Computing</title>
19
20 <para>AFS uses a <emphasis>client/server computing</emphasis> model. In client/server computing, there are two types of
21 machines. <emphasis>Server machines</emphasis> store data and perform services for client machines. <emphasis>Client
22 machines</emphasis> perform computations for users and access data and services provided by server machines. Some machines act
23 as both clients and servers. In most cases, you work on a client machine, accessing files stored on a file server machine.
24 <indexterm><primary>client/server computing</primary></indexterm> <indexterm><primary>client machine</primary></indexterm> <indexterm><primary>server machines defined</primary></indexterm> <indexterm><primary>machines</primary><secondary>server</secondary></indexterm> <indexterm><primary>machines</primary><secondary>client</secondary></indexterm> <indexterm><primary>communication</primary><secondary>between clients and servers</secondary></indexterm></para>
25 </sect2>
26
27 <sect2 id="Header_10">
28 <title>Distributed File Systems</title>
29
30 <para>AFS is a <emphasis>distributed file system</emphasis> which joins together the file systems of multiple file server
31 machines, making it as easy to access files stored on a remote file server machine as files stored on the local disk. A
32 distributed file system has two main advantages over a conventional centralized file system: <indexterm><primary>distributed file system</primary></indexterm>
33
34 <itemizedlist>
35 <listitem>
36 <para>Increased availability: A copy of a popular file, such as the binary for an application program, can be stored on
37 many file server machines. An outage on a single machine or even multiple machines does not necessarily make the file
38 unavailable. Instead, user requests for the program are routed to accessible machines. With a centralized file system, the
39 loss of the central file storage machine effectively shuts down the entire system.</para>
40 </listitem>
41
42 <listitem>
43 <para>Increased efficiency: In a distributed file system, the work load is distributed over many smaller file server
44 machines that tend to be more fully utilized than the larger (and usually more expensive) file storage machine of a
45 centralized file system.</para>
46 </listitem>
47 </itemizedlist>
48 </para>
49
50 <para>AFS hides its distributed nature, so working with AFS files looks and feels like working with files stored on your local
51 machine, except that you can access many more files. And because AFS relies on the power of users' client machines for
52 computation, increasing the number of AFS users does not slow AFS performance appreciably, making it a very efficient
53 computing environment.</para>
54 </sect2>
55
56 <sect2 id="HDRWQ4">
57 <title>AFS Filespace and Local Filespace</title>
58
59 <indexterm><primary>local machine</primary></indexterm>
60
61 <para>AFS acts as an extension of your machine's local UNIX file system. Your system administrator creates a directory on the
62 local disk of each AFS client machine to act as a gateway to AFS. By convention, this directory is called <emphasis
63 role="bold">/afs</emphasis>, and it functions as the root of the <emphasis>AFS filespace</emphasis>. <indexterm><primary>AFS</primary><secondary>filespace as extension of local filespace</secondary></indexterm>
64 <indexterm><primary>afs (/afs) directory</primary><secondary>as root of AFS filespace</secondary></indexterm> <indexterm><primary>root of AFS filespace</primary></indexterm></para>
65
66 <para>Just like the UNIX file system, AFS uses a hierarchical file structure (a tree). Under the <emphasis
67 role="bold">/afs</emphasis> root directory are subdirectories created by your system administrator, including your home
68 directory. Other directories that are at the same level of the local file system as <emphasis role="bold">/afs</emphasis>,
69 such as <emphasis role="bold">/usr</emphasis>, <emphasis role="bold">/etc</emphasis>, or <emphasis
70 role="bold">/bin</emphasis>, can either be located on your local disk or be links to AFS directories. Files relevant only to
71 the local machine are usually stored on the local machine. All other files can be stored in AFS, enabling many users to share
72 them and freeing the local machine's disk space for other uses.</para>
73
74 <note>
75 <para>You can use AFS commands only on files in the AFS filespace or the local directories that are links to the AFS
76 filespace.</para>
77 </note>
78 </sect2>
79
80 <sect2 id="HDRWQ5">
81 <title>Cells and Sites</title>
82
83 <para>The <emphasis>cell</emphasis> is the administrative domain in AFS. Each cell's administrators determine how client
84 machines are configured and how much storage space is available to each user. The organization corresponding to a cell can be
85 a company, a university department, or any defined group of users. From a hardware perspective, a cell is a grouping of client
86 machines and server machines defined to belong to the same cell. <indexterm><primary>cells</primary><secondary>defined</secondary></indexterm> An AFS <emphasis>site</emphasis> is a
87 grouping of one or more related cells. For example, the cells at the Example Corporation form a single site. <indexterm><primary>site defined</primary></indexterm></para>
88
89 <para>By convention, the subdirectories of the <emphasis role="bold">/afs</emphasis> directory are cellular filespaces, each
90 of which contains subdirectories and files that belong to a single cell. For example, directories and files relevant to the
91 Example Corporation cell are stored in the subdirectory <emphasis role="bold">/afs/example.com</emphasis>.</para>
92
93 <para>While each cell organizes and maintains its own filespace, it can also connect with the filespace of other AFS cells.
94 The result is a huge filespace that enables file sharing within and across cells. <indexterm><primary>communication</primary><secondary>among cells and sites</secondary></indexterm></para>
95
96 <para>The cell to which your client machine belongs is called your <emphasis>local cell</emphasis>. All other cells in the AFS
97 filespace are termed <emphasis>foreign cells</emphasis>. <indexterm><primary>local cell, defined</primary></indexterm> <indexterm><primary>foreign cells</primary><secondary>defined</secondary></indexterm> <indexterm><primary>cells</primary><secondary>local vs. foreign</secondary></indexterm></para>
98 </sect2>
99
100 <sect2 id="HDRWQ6">
101 <title>Volumes and Mount Points</title>
102
103 <para>The storage disks in a computer are divided into sections called <emphasis>partitions</emphasis>. AFS further divides
104 partitions into units called <emphasis>volumes</emphasis>, each of which houses a subtree of related files and directories.
105 The volume provides a convenient container for storing related files and directories. Your system administrators can move
106 volumes from one file server machine to another without your noticing, because AFS automatically tracks a volume's location.
107 <indexterm><primary>volumes</primary><secondary>defined</secondary></indexterm> <indexterm><primary>disk partition</primary><secondary>use in AFS</secondary></indexterm></para>
108
109 <para>You access the contents of a volume by accessing its <emphasis>mount point</emphasis> in the AFS filespace. A mount
110 point is a special file system element that looks and acts like a regular UNIX directory, but tells AFS the volume's name.
111 When you change to a different directory (by using the <emphasis role="bold">cd</emphasis> command, for example) you sometimes
112 <emphasis>cross</emphasis> a mount point and start accessing the contents of a different volume than before. You normally do
113 not notice the crossing, however, because AFS automatically interprets mount points and retrieves the contents of the new
114 directory from the appropriate volume. You do not need to track which volume, partition, or file server machine is housing a
115 directory's contents. If you are interested, though, you can learn a volume's location; for instructions, see <link
116 linkend="HDRWQ40">Locating Files and Directories</link>. <indexterm><primary>mount points defined</primary></indexterm> <indexterm><primary>volumes</primary><secondary>accessing via mount points</secondary></indexterm></para>
117
118 <para>If your system administrator has followed the conventional practice, your home directory corresponds to one volume,
119 which keeps its contents together on one partition of a file server machine. User volumes are typically named <emphasis
120 role="bold">user.</emphasis><replaceable>username</replaceable>. For example, the volume for a user named <emphasis
121 role="bold">smith</emphasis> in the cell <emphasis role="bold">example.com</emphasis> is called <emphasis
122 role="bold">user.smith</emphasis> and is mounted at the directory <emphasis role="bold">/afs/example.com/usr/smith</emphasis>.
123 <indexterm><primary>examples</primary><secondary>volume/mount point interaction</secondary></indexterm></para>
124
125 <para>Because AFS volumes are stored on different file server machines, when a machine becomes unavailable only the volumes on
126 that machine are inaccessible. Volumes stored on other machines are still accessible. However, if a volume's mount point
127 resides in a volume that is stored on an unavailable machine, the former volume is also inaccessible. For that reason, volumes
128 containing frequently used directories (for example, <emphasis role="bold">/afs</emphasis> and <emphasis
129 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>) are often copied and distributed to many file server
130 machines.</para>
131 </sect2>
132
133 <sect2 id="HDRWQ7">
134 <title>Volume Quotas</title>
135
136 <indexterm><primary>volumes</primary><secondary>volume/mount point interaction</secondary></indexterm>
137
138 <para>Each volume has a size limit, or <emphasis>quota</emphasis>, assigned by the system administrator. A volume's quota
139 determines the maximum amount of disk space the volume can consume. If you attempt to exceed a volume's quota, you receive an
140 error message. For instructions on checking volume quota, see <link linkend="HDRWQ39">Displaying Volume Quota</link>.</para>
141
142 <para>Volumes have completely independent quotas. For example, say that the current working directory is <emphasis
143 role="bold">/afs/example.com/usr/smith</emphasis>, which is the mount point for the <emphasis role="bold">user.smith</emphasis>
144 volume with 1000 free blocks. You try to copy a 500 block file from the current working directory to the <emphasis
145 role="bold">/afs/example.com/usr/pat</emphasis> directory, the mount point for the volume <emphasis
146 role="bold">user.pat</emphasis>. However, you get an error message saying there is not enough space. You check the volume
147 quota for <emphasis role="bold">user.pat</emphasis>, and find that the volume only has 50 free blocks.</para>
148 </sect2>
149 </sect1>
150
151 <sect1 id="HDRWQ8">
152 <title>Using Files in AFS</title>
153
154 <sect2 id="HDRWQ9">
155 <title>The Cache Manager</title>
156
157 <para>You can access the AFS filespace only when working on an AFS client machine. The <emphasis>Cache Manager</emphasis> on
158 that machine is your agent in accessing information stored in the AFS filespace. When you access a file, the Cache Manager on
159 your client machine requests the file from the appropriate file server machine and stores (<emphasis>caches</emphasis>) a copy
160 of it on your client machine's local disk. Application programs on your client machine use the local, cached copy of the file.
161 This improves performance because it is much faster to use a local file than to send requests for file data across the network
162 to the file server machine. <indexterm><primary>caching files</primary></indexterm> <indexterm><primary>Cache Manager</primary><secondary>described</secondary></indexterm> <indexterm><primary>client machine</primary></indexterm> <indexterm><primary>files</primary><secondary>caching</secondary></indexterm></para>
163
164 <para>Because application programs use the cached copy of a file, any changes you make are not necessarily stored permanently
165 to the central version stored on the file server machine until the file closes. At that point, the Cache Manager writes your
166 changes back to the file server machine, where they replace the corresponding parts of the existing file. Some application
167 programs close a file in this way each time you issue their <emphasis role="bold">save</emphasis> command (and then
168 immediately reopen the file so that you can continue working). With other programs, issuing the <emphasis
169 role="bold">save</emphasis> command writes the changes only to the local cached copy. If you use the latter type of text
170 editor, you need to close the file periodically to make sure your changes are stored permanently.</para>
171
172 <para>If a file server machine becomes inaccessible, you can continue working with the local, cached copy of a file fetched
173 from that machine, but you cannot save your changes permanently until the server machine is again accessible.</para>
174 </sect2>
175
176 <sect2 id="HDRWQ10">
177 <title>Updating Copies of Cached Files</title>
178
179 <indexterm><primary>files</primary><secondary>updating</secondary></indexterm>
180
181 <indexterm><primary>callbacks</primary></indexterm>
182
183 <para>When the central version of a file changes on the file server machine, the AFS <emphasis>File Server</emphasis> process
184 running on that machine advises all other Cache Managers with copies of that file that their version is no longer valid. AFS
185 has a special mechanism for performing these notifications efficiently. When the File Server sends the Cache Manager a copy of
186 a modifiable file, it also sends a <emphasis>callback</emphasis>. A callback functions as a promise from the File Server to
187 contact the Cache Manager if the centrally stored copy of the file is changed while it is being used. If that happens, the
188 File Server <emphasis>breaks</emphasis> the callback. If you run a program that requests data from the changed file, the Cache
189 Manager notices the broken callback and gets an updated copy of the file from the File Server. Callbacks ensure that you are
190 working with the most recent copy of a file.</para>
191
192 <note>
193 <para>The callback mechanism does not guarantee that you immediately see the changes someone else makes to a file you are
194 using. Your Cache Manager does not notice the broken callback until your application program asks it for more data from the
195 file.</para>
196 </note>
197 </sect2>
198
199 <sect2 id="Header_18">
200 <title>Multiple Users Modifying Files</title>
201
202 <indexterm><primary>files</primary><secondary>denying access</secondary></indexterm>
203
204 <indexterm><primary>files</primary><secondary>sharing</secondary></indexterm>
205
206 <para>Like a standard UNIX file system, AFS preserves only the changes to a file that are saved last, regardless of who made
207 the changes. When collaborating with someone on the same files, you must coordinate your work to avoid overwriting each
208 other's changes. You can use AFS access control lists (ACLs) to limit the ability of other users to access or change your
209 files, and so prevent them from accidentally overwriting your files. See <link linkend="HDRWQ44">Protecting Your Directories
210 and Files</link>.</para>
211 </sect2>
212 </sect1>
213
214 <sect1 id="HDRWQ11">
215 <title>AFS Security</title>
216
217 <indexterm><primary>AFS</primary><secondary>security</secondary></indexterm>
218
219 <indexterm><primary>security in AFS</primary></indexterm>
220
221 <para>AFS makes it easy for many users to access the same files, but also uses several mechanisms to ensure that only authorized
222 users access the AFS filespace. The mechanisms include the following:
223
224 <itemizedlist>
225 <listitem>
226 <para>Passwords and mutual authentication ensure that only authorized users access AFS filespace</para>
227 </listitem>
228
229 <listitem>
230 <para>Access control lists enable users to restrict or permit access to their own directories</para>
231 </listitem>
232 </itemizedlist>
233 </para>
234
235 <sect2 id="HDRWQ12">
236 <title>Passwords and Mutual Authentication</title>
237
238 <indexterm><primary>mutual authentication</primary></indexterm>
239
240 <indexterm><primary>authentication</primary><secondary>mutual</secondary></indexterm>
241
242 <indexterm><primary>password</primary></indexterm>
243
244 <para>AFS uses two related mechanisms to ensure that only authorized users access the filespace: passwords and mutual
245 authentication. Both mechanisms require that a user prove his or her identity.</para>
246
247 <para>When you first identify yourself to AFS, you must provide the password associated with your username, to prove that you
248 are who you say you are. When you provide the correct password, you become <emphasis>authenticated</emphasis> and your Cache
249 Manager receives a <emphasis>token</emphasis>. A token is a package of information that is scrambled by an AFS authentication
250 program using your AFS password as a key. Your Cache Manager can unscramble the token because it knows your password and AFS's
251 method of scrambling. <indexterm><primary>tokens</primary><secondary>as proof of authentication</secondary></indexterm> <indexterm><primary>authentication</primary><secondary>defined</secondary></indexterm></para>
252
253 <para>The token acts as proof to AFS server programs that you are authenticated as a valid AFS user. It serves as the basis
254 for the second means through which AFS creates security, called <emphasis>mutual authentication</emphasis>. Under mutual
255 authentication, both parties communicating across the network prove their identities to one another. AFS requires mutual
256 authentication whenever a server and client (most often, a Cache Manager) communicate with each other.</para>
257
258 <para>The mutual authentication protocol that AFS uses is designed to make it very difficult for people to authenticate
259 fraudulently. When your Cache Manager contacts a File Server on your behalf, it sends the token you obtained when you
260 authenticated. The token is encrypted with a key that only an AFS File Server can know. If the File Server can decrypt your
261 token, it can communicate with your Cache Manager. In turn, the Cache Manager accepts the File Server as genuine because the
262 File Server can decrypt and use the information in the token. <indexterm><primary>tokens</primary><secondary>use in mutual authentication</secondary></indexterm></para>
263 </sect2>
264
265 <sect2 id="Header_21">
266 <title>Access Control Lists</title>
267
268 <indexterm><primary>ACL</primary><secondary>described</secondary></indexterm>
269
270 <para>AFS uses <emphasis>access control lists</emphasis> (<emphasis>ACLs</emphasis>) to determine who can access the
271 information in the AFS filespace. Each AFS directory has an ACL to specify what actions different users can perform on that
272 directory and its files. An ACL can contain up to about 20 entries for users, groups, or both; each entry lists a user or
273 group and the permissions it possesses.</para>
274
275 <para>The owner of a directory and system administrators can always administer an ACL. Users automatically own their home
276 directories and subdirectories. Other non-owner users can define a directory's ACL only if specifically granted that
277 permission on the ACL. For more information on ACLs, see <link linkend="HDRWQ44">Protecting Your Directories and Files</link>
278 .</para>
279
280 <para>A group is composed of one or more users and client machines. If a user belongs to a group that appears on an ACL, the
281 user gets all of the permissions granted to that group, just as if the user were listed directly on the ACL. Similarly, if a
282 user is logged into a client machine that belongs to a group, the user has all of the permissions granted to that group. For
283 instructions on defining and using groups, see <link linkend="HDRWQ60">Using Groups</link>.</para>
284
285 <para>All users who can access your cell's filespace, authenticated or not, are automatically assigned to a group called
286 <emphasis role="bold">system:anyuser</emphasis>. For a discussion of placing the <emphasis
287 role="bold">system:anyuser</emphasis> group on ACLs, see <link linkend="HDRWQ51">Extending Access to Users from Foreign
288 Cells</link>.</para>
289
290 <note>
291 <para>You can use the UNIX mode bits to control access on specific files within an AFS directory; however, the effect of
292 these mode bits is different under AFS than in the standard UNIX file system. See <link linkend="HDRWQ16">File and Directory
293 Protection</link>.</para>
294 </note>
295 </sect2>
296 </sect1>
297
298 <sect1 id="HDRWQ13">
299 <title>Differences Between UNIX and AFS</title>
300
301 <para>AFS is designed to be similar to the UNIX file system. For instance, many of the basic UNIX file manipulation commands
302 (<emphasis role="bold">cp</emphasis> for copy, <emphasis role="bold">rm</emphasis> for remove, and so on) are the same in AFS as
303 they are as in UNIX. All of your application programs work as they did before. The following sections describe some of the
304 differences between a standard UNIX file system and AFS.</para>
305
306 <sect2 id="HDRWQ14">
307 <title>File Sharing</title>
308
309 <indexterm><primary>UNIX, differences with AFS</primary><secondary>file transfer</secondary></indexterm>
310
311 <indexterm><primary>UNIX, differences with AFS</primary><secondary>sharing files</secondary></indexterm>
312
313 <indexterm><primary>files</primary><secondary>sharing</secondary></indexterm>
314
315 <para>AFS enables users to share remote files as easily as local files. To access a file on a remote machine in AFS, you
316 simply specify the file's pathname. In contrast, to access a file in a remote machine's UNIX file system, you must log into
317 the remote machine or create a mount point on the local machine that points to a directory in the remote machine's UNIX file
318 system.</para>
319
320 <para>AFS users can see and share all the files under the <emphasis role="bold">/afs</emphasis> root directory, given the
321 appropriate privileges. An AFS user who has the necessary privileges can access a file in any AFS cell, simply by specifying
322 the file's pathname. File sharing in AFS is not restricted by geographical distances or operating system differences.</para>
323 </sect2>
324
325 <sect2 id="HDRWQ15">
326 <title>Login and Authentication</title>
327
328 <indexterm><primary>UNIX, differences with AFS</primary><secondary>login</secondary></indexterm>
329
330 <para>To become an authenticated AFS user, you need to provide a password to AFS.
331
332 <itemizedlist>
333 <listitem>
334 <para>On machines that use an AFS-modified login utility, logging in is a one-step process; your initial login
335 automatically authenticates you with AFS.</para>
336 </listitem>
337
338 <listitem>
339 <para>On machines that do not use an AFS-modified login utility, you must perform three steps.
340
341 <orderedlist>
342 <listitem>
343 <para>Log in to your local machine.</para>
344 </listitem>
345
346 <listitem>
347 <para>Issue the <emphasis role="bold">kinit</emphasis> command to obtain a kerberos Ticket Granting Ticket or
348 <emphasis role="bold">TGT</emphasis>. If the kinit is compiled with AFS support, it may automatically get a
349 token for you. However to ensure that you get an afs token, you will need to run a second command.</para>
350 </listitem>
351 <listitem>
352 <para>OpenAFS provides the <emphasis role="bold">aklog</emphasis> command to allow you to obtain a token,
353 or AFS service ticket using your kerberos TGT. A kinit with AFS support will run this as part of it's execution,
354 but if you issue the aklog command that will ensure you have an AFS token.</para>
355 </listitem>
356
357 </orderedlist>
358 </para>
359 </listitem>
360 </itemizedlist>
361 </para>
362
363 <para>Your system administrator can tell you whether your machine uses an AFS-modified login utility or not. Then see the
364 login instructions in <link linkend="HDRWQ21">Logging in and Authenticating with AFS</link>.</para>
365
366 <para>AFS uses the kerberos authentication protocol, rather than storing passwords in the local password file (<emphasis
367 role="bold">/etc/passwd</emphasis> or equivalent). If your machine uses an AFS-modified login utility, you can change your
368 password with a single command. If your machine does not use an AFS-modified login utility, you must issue separate commands
369 to change your AFS and local passwords. See <link linkend="HDRWQ36">Changing Your Password</link>. <indexterm><primary>UNIX, differences with AFS</primary><secondary>passwords</secondary></indexterm>
370 <indexterm><primary>local password file (/etc/passwd)</primary></indexterm> <indexterm><primary>passwd</primary><secondary>file</secondary></indexterm></para>
371 </sect2>
372
373 <sect2 id="HDRWQ16">
374 <title>File and Directory Protection</title>
375
376 <indexterm><primary>ACL</primary><secondary>compared to UNIX mode bits</secondary></indexterm>
377
378 <indexterm><primary>UNIX, differences with AFS</primary><secondary>file access/protection</secondary></indexterm>
379
380 <para>AFS does not rely on the mode bit protections of a standard UNIX system (though its protection system does interact with
381 these mode bits). Instead, AFS uses an access control list (ACL) to control access to each directory and its contents. The
382 following list summarizes the differences between the two methods:
383
384 <itemizedlist>
385 <listitem>
386 <para>UNIX mode bits specify three types of access permissions: <emphasis role="bold">r</emphasis> (<emphasis
387 role="bold">read</emphasis>), <emphasis role="bold">w</emphasis> (<emphasis role="bold">write</emphasis>), and <emphasis
388 role="bold">x</emphasis> (<emphasis role="bold">execute</emphasis>). An AFS ACL uses seven types of permissions: <emphasis
389 role="bold">r</emphasis> (<emphasis role="bold">read</emphasis>), <emphasis role="bold">l</emphasis> (<emphasis
390 role="bold">lookup</emphasis>), <emphasis role="bold">i</emphasis> (<emphasis role="bold">insert</emphasis>), <emphasis
391 role="bold">d</emphasis> (<emphasis role="bold">delete</emphasis>), <emphasis role="bold">w</emphasis> (<emphasis
392 role="bold">write</emphasis>), <emphasis role="bold">k</emphasis> (<emphasis role="bold">lock</emphasis>), and <emphasis
393 role="bold">a</emphasis> (<emphasis role="bold">administer</emphasis>). For more information, see <link
394 linkend="HDRWQ46">The AFS ACL Permissions</link> and <link linkend="HDRWQ59">How AFS Uses the UNIX Mode
395 Bits</link>.</para>
396 </listitem>
397
398 <listitem>
399 <para>The three sets of mode bits on each UNIX file or directory enable you to grant permissions to three users or groups
400 of users: the file or directory's owner, the group that owns the file or directory, and all other users. An ACL can
401 accommodate up to about 20 entries, each of which extends certain permissions to a user or group. Unlike standard UNIX, a
402 user can belong to an unlimited number of groups, and groups can be defined by both users and system administrators. See
403 <link linkend="HDRWQ60">Using Groups</link>.</para>
404 </listitem>
405
406 <listitem>
407 <para>UNIX mode bits are set individually on each file and directory. An ACL applies to all of the files in a directory.
408 While at first glance the AFS method possibly seems less precise, in actuality (given a proper directory structure) there
409 are no major disadvantages to directory-level protections and they are easier to establish and maintain.</para>
410 </listitem>
411 </itemizedlist>
412 </para>
413 </sect2>
414
415 <sect2 id="HDRWQ17">
416 <title>Machine Outages</title>
417
418 <para>The kinds of failures you experience when a standard UNIX file system goes down are different than when one or more
419 individual AFS file server machines become unavailable. When a standard UNIX file system is inaccessible, the system simply
420 locks up and you can lose changes to any files with which you were working.</para>
421
422 <para>When an AFS file server machine becomes inaccessible, you cannot access the files on that machine. If a copy of the file
423 is available from another file server machine, however, you do not necessarily even notice the server outage. This is because
424 AFS gives your cell's system administrators the ability to store copies of popular programs on multiple file servers. The
425 Cache Manager chooses between the copies automatically; when one copy becomes unavailable, the Cache Manager simply chooses
426 another.</para>
427
428 <para>If there are no other copies of a file that is stored on an inaccessible server machine, you can usually continue to use
429 the copy stored in your client machine's local AFS cache. However, you cannot save changes to files stored on an inaccessible
430 file server machine until it is accessible again.</para>
431 </sect2>
432
433 <sect2 id="HDRWQ18">
434 <title>Remote Commands</title>
435
436 <para>
437 <indexterm><primary>SSH, differences with AFS</primary><secondary>commands</secondary></indexterm>
438 <indexterm><primary>remote commands</primary></indexterm>
439 <indexterm><primary>commands</primary><secondary>ssh</secondary></indexterm>
440 <indexterm><primary>ftp command</primary></indexterm>
441 <indexterm><primary>commands</primary><secondary>scp</secondary></indexterm>
442 <indexterm><primary>scp command</primary></indexterm>
443 The <emphasis>ssh</emphasis> and <emphasis>scp</emphasis> commands enable you
444 to run programs on a remote machine or copy files to/from a remote machine. ssh commands can work seamlessly with AFS, depending
445 on how your administrators have configured them. For the recent versions of OpenSSH, you need to have a kerberos ticket on the machine you are
446 connecting from and support in the ssh client to forward that ticket to the remote machine. The remote machine needs to be configured
447 to use that ticket to obtain a token after it is forwarded.
448 </para>
449
450 <para>Most current unix OS's come with a version of OpenSSH that understands the necessary GSSAPI protocol that can use kerberos to forward
451 TGT's, but this ability is generally not enabled by default. In order to configure your ssh client to use this you need to add the
452 following lines to your ~/.ssh/config file.</para>
453 <programlisting>
454 GSSAPIAuthentication yes
455 GSSAPIDelegateCredentials yes
456 GSSAPITrustDNS yes
457 </programlisting>
458 <para>See the ssh_config man page on your system for more details about these configuration options. In particular, you may
459 want to limit them to specific hosts or domains.</para>
460
461
462 <para>If you do not have an ssh client that can do TGT forwarding, when you login into a remote machine, you will have access to
463 native UNIX file system. However, since you are not authenticated to AFS, you can only
464 access the AFS directories that grant access to the <emphasis
465 role="bold">system:anyuser</emphasis> group, but you cannot access protected AFS directories. You can enable this access by
466 following the kinit/aklog procedure listed above.</para>
467 </sect2>
468
469 <sect2 id="Header_28">
470 <title>Differences in the Semantics of Standard UNIX Commands</title>
471
472 <para>This section summarizes differences in the functionality of some commonly issued UNIX commands.</para>
473
474 <variablelist>
475 <varlistentry>
476 <term><emphasis role="bold">chmod <indexterm><primary>chmod command</primary></indexterm> <indexterm><primary>commands</primary><secondary>chmod</secondary></indexterm> </emphasis></term>
477
478 <listitem>
479 <para>Only members of the <emphasis role="bold">system:administrators</emphasis> group can use this command to turn on
480 the setuid, setgid or sticky mode bits on AFS files. (For more information about this group, see <link
481 linkend="HDRWQ50">Using the System Groups on ACLs</link>.)</para>
482 </listitem>
483 </varlistentry>
484
485 <varlistentry>
486 <term><emphasis role="bold">chown <indexterm><primary>chown command</primary></indexterm> <indexterm><primary>commands</primary><secondary>chown</secondary></indexterm> </emphasis></term>
487
488 <listitem>
489 <para>Only members of the <emphasis role="bold">system:administrators</emphasis> group can issue this command on AFS
490 files.</para>
491 </listitem>
492 </varlistentry>
493
494 <varlistentry>
495 <term><emphasis role="bold">chgrp <indexterm><primary>chgrp command</primary></indexterm> <indexterm><primary>commands</primary><secondary>chgrp</secondary></indexterm> </emphasis></term>
496
497 <listitem>
498 <para>Only members of the <emphasis role="bold">system:administrators</emphasis> group can issue this command on AFS
499 files and directories.</para>
500 </listitem>
501 </varlistentry>
502
503 <varlistentry>
504 <term><emphasis role="bold">groups <indexterm><primary>groups command</primary></indexterm> <indexterm><primary>commands</primary><secondary>groups</secondary></indexterm> </emphasis></term>
505
506 <listitem>
507 <para>If the user's AFS tokens are identified by a process authentication group (PAG), the output of this command
508 includes two large numbers. For a description of PAGs, see <link linkend="HDRWQ24">Authenticating with
509 AFS</link>.</para>
510 </listitem>
511 </varlistentry>
512
513 <varlistentry>
514 <term><emphasis role="bold">login utilities <indexterm><primary>login utility</primary></indexterm> </emphasis></term>
515
516 <listitem>
517 <para>In general, most systems will use a combination of PAM modules to provide both kerberos enabled logins and automatic AFS tokens on login. Often these PAM modules will also be used with screenlockers and graphic logins at the console.</para>
518 </listitem>
519 </varlistentry>
520
521 <varlistentry>
522 <term><emphasis role="bold">ln <indexterm><primary>ln command</primary></indexterm> <indexterm><primary>commands</primary><secondary>ln</secondary></indexterm> </emphasis></term>
523
524 <listitem>
525 <para>You cannot use this command to create a hard link between files that reside in different AFS directories. You must
526 add the <emphasis role="bold">-s</emphasis> option to create a symbolic link instead.</para>
527 </listitem>
528 </varlistentry>
529 </variablelist>
530 </sect2>
531 </sect1>
532
533 <sect1 id="HDRWQ19">
534 <title>Using OpenAFS with NFS</title>
535
536 <para>Some cells use the Networking File System (NFS) in addition to AFS. If you work on an NFS client machine, your system
537 administrator can configure it to access the AFS filespace through a program called the <emphasis>NFS/AFS
538 Translator</emphasis><superscript>TM</superscript>. See <link linkend="HDRWQ80">Appendix A, Using the NFS/AFS
539 Translator</link>.</para>
540 </sect1>
541 </chapter>