xml-docbook-documentation-first-pass-20060915
[openafs.git] / doc / xml / UserGuide / c113.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >An Introduction to AFS</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
9 REL="HOME"
10 TITLE="AFS User Guide"
11 HREF="book1.html"><LINK
12 REL="PREVIOUS"
13 TITLE="About This Guide"
14 HREF="f24.html"><LINK
15 REL="NEXT"
16 TITLE="Using AFS"
17 HREF="c569.html"></HEAD
18 ><BODY
19 CLASS="chapter"
20 BGCOLOR="#FFFFFF"
21 TEXT="#000000"
22 LINK="#0000FF"
23 VLINK="#840084"
24 ALINK="#0000FF"
25 ><DIV
26 CLASS="NAVHEADER"
27 ><TABLE
28 SUMMARY="Header navigation table"
29 WIDTH="100%"
30 BORDER="0"
31 CELLPADDING="0"
32 CELLSPACING="0"
33 ><TR
34 ><TH
35 COLSPAN="3"
36 ALIGN="center"
37 >AFS User Guide: Version 3.6</TH
38 ></TR
39 ><TR
40 ><TD
41 WIDTH="10%"
42 ALIGN="left"
43 VALIGN="bottom"
44 ><A
45 HREF="f24.html"
46 ACCESSKEY="P"
47 >Prev</A
48 ></TD
49 ><TD
50 WIDTH="80%"
51 ALIGN="center"
52 VALIGN="bottom"
53 ></TD
54 ><TD
55 WIDTH="10%"
56 ALIGN="right"
57 VALIGN="bottom"
58 ><A
59 HREF="c569.html"
60 ACCESSKEY="N"
61 >Next</A
62 ></TD
63 ></TR
64 ></TABLE
65 ><HR
66 ALIGN="LEFT"
67 WIDTH="100%"></DIV
68 ><DIV
69 CLASS="chapter"
70 ><H1
71 ><A
72 NAME="HDRWQ2"
73 ></A
74 >Chapter 1. An Introduction to AFS</H1
75 ><P
76 >This chapter introduces basic AFS concepts and terms. It assumes that you are already familiar with standard UNIX commands,
77   file protection, and pathname conventions.</P
78 ><DIV
79 CLASS="sect1"
80 ><H1
81 CLASS="sect1"
82 ><A
83 NAME="HDRWQ3"
84 >AFS Concepts</A
85 ></H1
86 ><P
87 >AFS makes it easy for people to work together on the same files, no matter where the files are located. AFS users do not
88     have to know which machine is storing a file, and administrators can move files from machine to machine without interrupting
89     user access. Users always identify a file by the same pathname and AFS finds the correct file automatically, just as happens in
90     the local file system on a single machine. While AFS makes file sharing easy, it does not compromise the security of the shared
91     files. It provides a sophisticated protection scheme.  </P
92 ><DIV
93 CLASS="sect2"
94 ><H2
95 CLASS="sect2"
96 ><A
97 NAME="Header_9"
98 >Client/Server Computing</A
99 ></H2
100 ><P
101 >AFS uses a <SPAN
102 CLASS="emphasis"
103 ><I
104 CLASS="emphasis"
105 >client/server computing</I
106 ></SPAN
107 > model. In client/server computing, there are two types of
108       machines. <SPAN
109 CLASS="emphasis"
110 ><I
111 CLASS="emphasis"
112 >Server machines</I
113 ></SPAN
114 > store data and perform services for client machines. <SPAN
115 CLASS="emphasis"
116 ><I
117 CLASS="emphasis"
118 >Client
119       machines</I
120 ></SPAN
121 > perform computations for users and access data and services provided by server machines. Some machines act
122       as both clients and servers. In most cases, you work on a client machine, accessing files stored on a file server machine.
123            </P
124 ></DIV
125 ><DIV
126 CLASS="sect2"
127 ><H2
128 CLASS="sect2"
129 ><A
130 NAME="Header_10"
131 >Distributed File Systems</A
132 ></H2
133 ><P
134 >AFS is a <SPAN
135 CLASS="emphasis"
136 ><I
137 CLASS="emphasis"
138 >distributed file system</I
139 ></SPAN
140 > which joins together the file systems of multiple file server
141       machines, making it as easy to access files stored on a remote file server machine as files stored on the local disk. A
142       distributed file system has two main advantages over a conventional centralized file system: 
143
144       <UL
145 ><LI
146 ><P
147 >Increased availability: A copy of a popular file, such as the binary for an application program, can be stored on
148           many file server machines. An outage on a single machine or even multiple machines does not necessarily make the file
149           unavailable. Instead, user requests for the program are routed to accessible machines. With a centralized file system, the
150           loss of the central file storage machine effectively shuts down the entire system.</P
151 ></LI
152 ><LI
153 ><P
154 >Increased efficiency: In a distributed file system, the work load is distributed over many smaller file server
155           machines that tend to be more fully utilized than the larger (and usually more expensive) file storage machine of a
156           centralized file system.</P
157 ></LI
158 ></UL
159 >
160 </P
161 ><P
162 >AFS hides its distributed nature, so working with AFS files looks and feels like working with files stored on your local
163       machine, except that you can access many more files. And because AFS relies on the power of users' client machines for
164       computation, increasing the number of AFS users does not slow AFS performance appreciably, making it a very efficient
165       computing environment.</P
166 ></DIV
167 ><DIV
168 CLASS="sect2"
169 ><H2
170 CLASS="sect2"
171 ><A
172 NAME="HDRWQ4"
173 >AFS Filespace and Local Filespace</A
174 ></H2
175 ><P
176 >AFS acts as an extension of your machine's local UNIX file system. Your system administrator creates a directory on the
177       local disk of each AFS client machine to act as a gateway to AFS. By convention, this directory is called <SPAN
178 CLASS="bold"
179 ><B
180 CLASS="emphasis"
181 >/afs</B
182 ></SPAN
183 >, and it functions as the root of the <SPAN
184 CLASS="emphasis"
185 ><I
186 CLASS="emphasis"
187 >AFS filespace</I
188 ></SPAN
189 >. 
190        </P
191 ><P
192 >Just like the UNIX file system, AFS uses a hierarchical file structure (a tree). Under the <SPAN
193 CLASS="bold"
194 ><B
195 CLASS="emphasis"
196 >/afs</B
197 ></SPAN
198 > root directory are subdirectories created by your system administrator, including your home
199       directory. Other directories that are at the same level of the local file system as <SPAN
200 CLASS="bold"
201 ><B
202 CLASS="emphasis"
203 >/afs</B
204 ></SPAN
205 >,
206       such as <SPAN
207 CLASS="bold"
208 ><B
209 CLASS="emphasis"
210 >/usr</B
211 ></SPAN
212 >, <SPAN
213 CLASS="bold"
214 ><B
215 CLASS="emphasis"
216 >/etc</B
217 ></SPAN
218 >, or <SPAN
219 CLASS="bold"
220 ><B
221 CLASS="emphasis"
222 >/bin</B
223 ></SPAN
224 >, can either be located on your local disk or be links to AFS directories. Files relevant only to
225       the local machine are usually stored on the local machine. All other files can be stored in AFS, enabling many users to share
226       them and freeing the local machine's disk space for other uses.</P
227 ><DIV
228 CLASS="note"
229 ><BLOCKQUOTE
230 CLASS="note"
231 ><P
232 ><B
233 >Note: </B
234 >You can use AFS commands only on files in the AFS filespace or the local directories that are links to the AFS
235         filespace.</P
236 ></BLOCKQUOTE
237 ></DIV
238 ></DIV
239 ><DIV
240 CLASS="sect2"
241 ><H2
242 CLASS="sect2"
243 ><A
244 NAME="HDRWQ5"
245 >Cells and Sites</A
246 ></H2
247 ><P
248 >The <SPAN
249 CLASS="emphasis"
250 ><I
251 CLASS="emphasis"
252 >cell</I
253 ></SPAN
254 > is the administrative domain in AFS. Each cell's administrators determine how client
255       machines are configured and how much storage space is available to each user. The organization corresponding to a cell can be
256       a company, a university department, or any defined group of users. From a hardware perspective, a cell is a grouping of client
257       machines and server machines defined to belong to the same cell.  An AFS <SPAN
258 CLASS="emphasis"
259 ><I
260 CLASS="emphasis"
261 >site</I
262 ></SPAN
263 > is a
264       grouping of one or more related cells. For example, the cells at the ABC Corporation form a single site. </P
265 ><P
266 >By convention, the subdirectories of the <SPAN
267 CLASS="bold"
268 ><B
269 CLASS="emphasis"
270 >/afs</B
271 ></SPAN
272 > directory are cellular filespaces, each
273       of which contains subdirectories and files that belong to a single cell. For example, directories and files relevant to the
274       ABC Corporation cell are stored in the subdirectory <SPAN
275 CLASS="bold"
276 ><B
277 CLASS="emphasis"
278 >/afs/abc.com</B
279 ></SPAN
280 >.</P
281 ><P
282 >While each cell organizes and maintains its own filespace, it can also connect with the filespace of other AFS cells.
283       The result is a huge filespace that enables file sharing within and across cells. </P
284 ><P
285 >The cell to which your client machine belongs is called your <SPAN
286 CLASS="emphasis"
287 ><I
288 CLASS="emphasis"
289 >local cell</I
290 ></SPAN
291 >. All other cells in the AFS
292       filespace are termed <SPAN
293 CLASS="emphasis"
294 ><I
295 CLASS="emphasis"
296 >foreign cells</I
297 ></SPAN
298 >.   </P
299 ></DIV
300 ><DIV
301 CLASS="sect2"
302 ><H2
303 CLASS="sect2"
304 ><A
305 NAME="HDRWQ6"
306 >Volumes and Mount Points</A
307 ></H2
308 ><P
309 >The storage disks in a computer are divided into sections called <SPAN
310 CLASS="emphasis"
311 ><I
312 CLASS="emphasis"
313 >partitions</I
314 ></SPAN
315 >. AFS further divides
316       partitions into units called <SPAN
317 CLASS="emphasis"
318 ><I
319 CLASS="emphasis"
320 >volumes</I
321 ></SPAN
322 >, each of which houses a subtree of related files and directories.
323       The volume provides a convenient container for storing related files and directories. Your system administrators can move
324       volumes from one file server machine to another without your noticing, because AFS automatically tracks a volume's location.
325        </P
326 ><P
327 >You access the contents of a volume by accessing its <SPAN
328 CLASS="emphasis"
329 ><I
330 CLASS="emphasis"
331 >mount point</I
332 ></SPAN
333 > in the AFS filespace. A mount
334       point is a special file system element that looks and acts like a regular UNIX directory, but tells AFS the volume's name.
335       When you change to a different directory (by using the <SPAN
336 CLASS="bold"
337 ><B
338 CLASS="emphasis"
339 >cd</B
340 ></SPAN
341 > command, for example) you sometimes
342       <SPAN
343 CLASS="emphasis"
344 ><I
345 CLASS="emphasis"
346 >cross</I
347 ></SPAN
348 > a mount point and start accessing the contents of a different volume than before. You normally do
349       not notice the crossing, however, because AFS automatically interprets mount points and retrieves the contents of the new
350       directory from the appropriate volume. You do not need to track which volume, partition, or file server machine is housing a
351       directory's contents. If you are interested, though, you can learn a volume's location; for instructions, see <A
352 HREF="c1095.html#HDRWQ40"
353 >Locating Files and Directories</A
354 >.  </P
355 ><P
356 >If your system administrator has followed the conventional practice, your home directory corresponds to one volume,
357       which keeps its contents together on one partition of a file server machine. User volumes are typically named <SPAN
358 CLASS="bold"
359 ><B
360 CLASS="emphasis"
361 >user.</B
362 ></SPAN
363 ><VAR
364 CLASS="replaceable"
365 >username</VAR
366 >. For example, the volume for a user named <SPAN
367 CLASS="bold"
368 ><B
369 CLASS="emphasis"
370 >smith</B
371 ></SPAN
372 > in the cell <SPAN
373 CLASS="bold"
374 ><B
375 CLASS="emphasis"
376 >abc.com</B
377 ></SPAN
378 > is called <SPAN
379 CLASS="bold"
380 ><B
381 CLASS="emphasis"
382 >user.smith</B
383 ></SPAN
384 > and is mounted at the directory <SPAN
385 CLASS="bold"
386 ><B
387 CLASS="emphasis"
388 >/afs/abc.com/usr/smith</B
389 ></SPAN
390 >.
391       </P
392 ><P
393 >Because AFS volumes are stored on different file server machines, when a machine becomes unavailable only the volumes on
394       that machine are inaccessible. Volumes stored on other machines are still accessible. However, if a volume's mount point
395       resides in a volume that is stored on an unavailable machine, the former volume is also inaccessible. For that reason, volumes
396       containing frequently used directories (for example, <SPAN
397 CLASS="bold"
398 ><B
399 CLASS="emphasis"
400 >/afs</B
401 ></SPAN
402 > and <SPAN
403 CLASS="bold"
404 ><B
405 CLASS="emphasis"
406 >/afs/</B
407 ></SPAN
408 ><VAR
409 CLASS="replaceable"
410 >cellname</VAR
411 >) are often copied and distributed to many file server
412       machines.</P
413 ></DIV
414 ><DIV
415 CLASS="sect2"
416 ><H2
417 CLASS="sect2"
418 ><A
419 NAME="HDRWQ7"
420 >Volume Quotas</A
421 ></H2
422 ><P
423 >Each volume has a size limit, or <SPAN
424 CLASS="emphasis"
425 ><I
426 CLASS="emphasis"
427 >quota</I
428 ></SPAN
429 >, assigned by the system administrator. A volume's quota
430       determines the maximum amount of disk space the volume can consume. If you attempt to exceed a volume's quota, you receive an
431       error message. For instructions on checking volume quota, see <A
432 HREF="c1095.html#HDRWQ39"
433 >Displaying Volume Quota</A
434 >.</P
435 ><P
436 >Volumes have completely independent quotas. For example, say that the current working directory is <SPAN
437 CLASS="bold"
438 ><B
439 CLASS="emphasis"
440 >/afs/abc.com/usr/smith</B
441 ></SPAN
442 >, which is the mount point for the <SPAN
443 CLASS="bold"
444 ><B
445 CLASS="emphasis"
446 >user.smith</B
447 ></SPAN
448 >
449       volume with 1000 free blocks. You try to copy a 500 block file from the current working directory to the <SPAN
450 CLASS="bold"
451 ><B
452 CLASS="emphasis"
453 >/afs/abc.com/usr/pat</B
454 ></SPAN
455 > directory, the mount point for the volume <SPAN
456 CLASS="bold"
457 ><B
458 CLASS="emphasis"
459 >user.pat</B
460 ></SPAN
461 >. However, you get an error message saying there is not enough space. You check the volume
462       quota for <SPAN
463 CLASS="bold"
464 ><B
465 CLASS="emphasis"
466 >user.pat</B
467 ></SPAN
468 >, and find that the volume only has 50 free blocks.</P
469 ></DIV
470 ></DIV
471 ><DIV
472 CLASS="sect1"
473 ><H1
474 CLASS="sect1"
475 ><A
476 NAME="HDRWQ8"
477 >Using Files in AFS</A
478 ></H1
479 ><DIV
480 CLASS="sect2"
481 ><H2
482 CLASS="sect2"
483 ><A
484 NAME="HDRWQ9"
485 >The Cache Manager</A
486 ></H2
487 ><P
488 >You can access the AFS filespace only when working on an AFS client machine. The <SPAN
489 CLASS="emphasis"
490 ><I
491 CLASS="emphasis"
492 >Cache Manager</I
493 ></SPAN
494 > on
495       that machine is your agent in accessing information stored in the AFS filespace. When you access a file, the Cache Manager on
496       your client machine requests the file from the appropriate file server machine and stores (<SPAN
497 CLASS="emphasis"
498 ><I
499 CLASS="emphasis"
500 >caches</I
501 ></SPAN
502 >) a copy
503       of it on your client machine's local disk. Application programs on your client machine use the local, cached copy of the file.
504       This improves performance because it is much faster to use a local file than to send requests for file data across the network
505       to the file server machine.    </P
506 ><P
507 >Because application programs use the cached copy of a file, any changes you make are not necessarily stored permanently
508       to the central version stored on the file server machine until the file closes. At that point, the Cache Manager writes your
509       changes back to the file server machine, where they replace the corresponding parts of the existing file. Some application
510       programs close a file in this way each time you issue their <SPAN
511 CLASS="bold"
512 ><B
513 CLASS="emphasis"
514 >save</B
515 ></SPAN
516 > command (and then
517       immediately reopen the file so that you can continue working). With other programs, issuing the <SPAN
518 CLASS="bold"
519 ><B
520 CLASS="emphasis"
521 >save</B
522 ></SPAN
523 > command writes the changes only to the local cached copy. If you use the latter type of text
524       editor, you need to close the file periodically to make sure your changes are stored permanently.</P
525 ><P
526 >If a file server machine becomes inaccessible, you can continue working with the local, cached copy of a file fetched
527       from that machine, but you cannot save your changes permanently until the server machine is again accessible.</P
528 ></DIV
529 ><DIV
530 CLASS="sect2"
531 ><H2
532 CLASS="sect2"
533 ><A
534 NAME="HDRWQ10"
535 >Updating Copies of Cached Files</A
536 ></H2
537 ><P
538 >When the central version of a file changes on the file server machine, the AFS <SPAN
539 CLASS="emphasis"
540 ><I
541 CLASS="emphasis"
542 >File Server</I
543 ></SPAN
544 > process
545       running on that machine advises all other Cache Managers with copies of that file that their version is no longer valid. AFS
546       has a special mechanism for performing these notifications efficiently. When the File Server sends the Cache Manager a copy of
547       a modifiable file, it also sends a <SPAN
548 CLASS="emphasis"
549 ><I
550 CLASS="emphasis"
551 >callback</I
552 ></SPAN
553 >. A callback functions as a promise from the File Server to
554       contact the Cache Manager if the centrally stored copy of the file is changed while it is being used. If that happens, the
555       File Server <SPAN
556 CLASS="emphasis"
557 ><I
558 CLASS="emphasis"
559 >breaks</I
560 ></SPAN
561 > the callback. If you run a program that requests data from the changed file, the Cache
562       Manager notices the broken callback and gets an updated copy of the file from the File Server. Callbacks ensure that you are
563       working with the most recent copy of a file.</P
564 ><DIV
565 CLASS="note"
566 ><BLOCKQUOTE
567 CLASS="note"
568 ><P
569 ><B
570 >Note: </B
571 >The callback mechanism does not guarantee that you immediately see the changes someone else makes to a file you are
572         using. Your Cache Manager does not notice the broken callback until your application program asks it for more data from the
573         file.</P
574 ></BLOCKQUOTE
575 ></DIV
576 ></DIV
577 ><DIV
578 CLASS="sect2"
579 ><H2
580 CLASS="sect2"
581 ><A
582 NAME="Header_18"
583 >Multiple Users Modifying Files</A
584 ></H2
585 ><P
586 >Like a standard UNIX file system, AFS preserves only the changes to a file that are saved last, regardless of who made
587       the changes. When collaborating with someone on the same files, you must coordinate your work to avoid overwriting each
588       other's changes. You can use AFS access control lists (ACLs) to limit the ability of other users to access or change your
589       files, and so prevent them from accidentally overwriting your files. See <A
590 HREF="c1444.html"
591 >Protecting Your Directories
592       and Files</A
593 >.</P
594 ></DIV
595 ></DIV
596 ><DIV
597 CLASS="sect1"
598 ><H1
599 CLASS="sect1"
600 ><A
601 NAME="HDRWQ11"
602 >AFS Security</A
603 ></H1
604 ><P
605 >AFS makes it easy for many users to access the same files, but also uses several mechanisms to ensure that only authorized
606     users access the AFS filespace. The mechanisms include the following:
607
608     <UL
609 ><LI
610 ><P
611 >Passwords and mutual authentication ensure that only authorized users access AFS filespace</P
612 ></LI
613 ><LI
614 ><P
615 >Access control lists enable users to restrict or permit access to their own directories</P
616 ></LI
617 ></UL
618 >
619 </P
620 ><DIV
621 CLASS="sect2"
622 ><H2
623 CLASS="sect2"
624 ><A
625 NAME="HDRWQ12"
626 >Passwords and Mutual Authentication</A
627 ></H2
628 ><P
629 >AFS uses two related mechanisms to ensure that only authorized users access the filespace: passwords and mutual
630       authentication. Both mechanisms require that a user prove his or her identity.</P
631 ><P
632 >When you first identify yourself to AFS, you must provide the password associated with your username, to prove that you
633       are who you say you are. When you provide the correct password, you become <SPAN
634 CLASS="emphasis"
635 ><I
636 CLASS="emphasis"
637 >authenticated</I
638 ></SPAN
639 > and your Cache
640       Manager receives a <SPAN
641 CLASS="emphasis"
642 ><I
643 CLASS="emphasis"
644 >token</I
645 ></SPAN
646 >. A token is a package of information that is scrambled by an AFS authentication
647       program using your AFS password as a key. Your Cache Manager can unscramble the token because it knows your password and AFS's
648       method of scrambling.  </P
649 ><P
650 >The token acts as proof to AFS server programs that you are authenticated as a valid AFS user. It serves as the basis
651       for the second means through which AFS creates security, called <SPAN
652 CLASS="emphasis"
653 ><I
654 CLASS="emphasis"
655 >mutual authentication</I
656 ></SPAN
657 >. Under mutual
658       authentication, both parties communicating across the network prove their identities to one another. AFS requires mutual
659       authentication whenever a server and client (most often, a Cache Manager) communicate with each other.</P
660 ><P
661 >The mutual authentication protocol that AFS uses is designed to make it very difficult for people to authenticate
662       fraudulently. When your Cache Manager contacts a File Server on your behalf, it sends the token you obtained when you
663       authenticated. The token is encrypted with a key that only an AFS File Server can know. If the File Server can decrypt your
664       token, it can communicate with your Cache Manager. In turn, the Cache Manager accepts the File Server as genuine because the
665       File Server can decrypt and use the information in the token. </P
666 ></DIV
667 ><DIV
668 CLASS="sect2"
669 ><H2
670 CLASS="sect2"
671 ><A
672 NAME="Header_21"
673 >Access Control Lists</A
674 ></H2
675 ><P
676 >AFS uses <SPAN
677 CLASS="emphasis"
678 ><I
679 CLASS="emphasis"
680 >access control lists</I
681 ></SPAN
682 > (<SPAN
683 CLASS="emphasis"
684 ><I
685 CLASS="emphasis"
686 >ACLs</I
687 ></SPAN
688 >) to determine who can access the
689       information in the AFS filespace. Each AFS directory has an ACL to specify what actions different users can perform on that
690       directory and its files. An ACL can contain up to about 20 entries for users, groups, or both; each entry lists a user or
691       group and the permissions it possesses.</P
692 ><P
693 >The owner of a directory and system administrators can always administer an ACL. Users automatically own their home
694       directories and subdirectories. Other non-owner users can define a directory's ACL only if specifically granted that
695       permission on the ACL. For more information on ACLs, see <A
696 HREF="c1444.html"
697 >Protecting Your Directories and Files</A
698 >
699       .</P
700 ><P
701 >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
702       user gets all of the permissions granted to that group, just as if the user were listed directly on the ACL. Similarly, if a
703       user is logged into a client machine that belongs to a group, the user has all of the permissions granted to that group. For
704       instructions on defining and using groups, see <A
705 HREF="c2454.html"
706 >Using Groups</A
707 >.</P
708 ><P
709 >All users who can access your cell's filespace, authenticated or not, are automatically assigned to a group called
710       <SPAN
711 CLASS="bold"
712 ><B
713 CLASS="emphasis"
714 >system:anyuser</B
715 ></SPAN
716 >. For a discussion of placing the <SPAN
717 CLASS="bold"
718 ><B
719 CLASS="emphasis"
720 >system:anyuser</B
721 ></SPAN
722 > group on ACLs, see <A
723 HREF="c1444.html#HDRWQ51"
724 >Extending Access to Users from Foreign
725       Cells</A
726 >.</P
727 ><DIV
728 CLASS="note"
729 ><BLOCKQUOTE
730 CLASS="note"
731 ><P
732 ><B
733 >Note: </B
734 >You can use the UNIX mode bits to control access on specific files within an AFS directory; however, the effect of
735         these mode bits is different under AFS than in the standard UNIX file system. See <A
736 HREF="c113.html#HDRWQ16"
737 >File and Directory
738         Protection</A
739 >.</P
740 ></BLOCKQUOTE
741 ></DIV
742 ></DIV
743 ></DIV
744 ><DIV
745 CLASS="sect1"
746 ><H1
747 CLASS="sect1"
748 ><A
749 NAME="HDRWQ13"
750 >Differences Between UNIX and AFS</A
751 ></H1
752 ><P
753 >AFS is designed to be similar to the UNIX file system. For instance, many of the basic UNIX file manipulation commands
754     (<SPAN
755 CLASS="bold"
756 ><B
757 CLASS="emphasis"
758 >cp</B
759 ></SPAN
760 > for copy, <SPAN
761 CLASS="bold"
762 ><B
763 CLASS="emphasis"
764 >rm</B
765 ></SPAN
766 > for remove, and so on) are the same in AFS as
767     they are as in UNIX. All of your application programs work as they did before. The following sections describe some of the
768     differences between a standard UNIX file system and AFS.</P
769 ><DIV
770 CLASS="sect2"
771 ><H2
772 CLASS="sect2"
773 ><A
774 NAME="HDRWQ14"
775 >File Sharing</A
776 ></H2
777 ><P
778 >AFS enables users to share remote files as easily as local files. To access a file on a remote machine in AFS, you
779       simply specify the file's pathname. In contrast, to access a file in a remote machine's UNIX file system, you must log into
780       the remote machine or create a mount point on the local machine that points to a directory in the remote machine's UNIX file
781       system.</P
782 ><P
783 >AFS users can see and share all the files under the <SPAN
784 CLASS="bold"
785 ><B
786 CLASS="emphasis"
787 >/afs</B
788 ></SPAN
789 > root directory, given the
790       appropriate privileges. An AFS user who has the necessary privileges can access a file in any AFS cell, simply by specifying
791       the file's pathname. File sharing in AFS is not restricted by geographical distances or operating system differences.</P
792 ></DIV
793 ><DIV
794 CLASS="sect2"
795 ><H2
796 CLASS="sect2"
797 ><A
798 NAME="HDRWQ15"
799 >Login and Authentication</A
800 ></H2
801 ><P
802 >To become an authenticated AFS user, you need to provide a password to AFS.
803
804       <UL
805 ><LI
806 ><P
807 >On machines that use an AFS-modified login utility, logging in is a one-step process; your initial login
808           automatically authenticates you with AFS.</P
809 ></LI
810 ><LI
811 ><P
812 >On machines that do not use an AFS-modified login utility, you must perform two steps.
813
814           <OL
815 TYPE="1"
816 ><LI
817 ><P
818 >Log in to your local machine.</P
819 ></LI
820 ><LI
821 ><P
822 >Issue the <SPAN
823 CLASS="bold"
824 ><B
825 CLASS="emphasis"
826 >klog</B
827 ></SPAN
828 > command with the <SPAN
829 CLASS="bold"
830 ><B
831 CLASS="emphasis"
832 >-setpag</B
833 ></SPAN
834 >
835               argument to authenticate with AFS and get your token.</P
836 ></LI
837 ></OL
838 >
839 </P
840 ></LI
841 ></UL
842 >
843 </P
844 ><P
845 >Your system administrator can tell you whether your machine uses an AFS-modified login utility or not. Then see the
846       login instructions in <A
847 HREF="c569.html#HDRWQ21"
848 >Logging in and Authenticating with AFS</A
849 >.</P
850 ><P
851 >AFS authentication passwords are stored in special AFS database, rather than in the local password file (<SPAN
852 CLASS="bold"
853 ><B
854 CLASS="emphasis"
855 >/etc/passwd</B
856 ></SPAN
857 > or equivalent). If your machine uses an AFS-modified login utility, you can change your
858       password with a single command. If your machine does not use an AFS-modified login utility, you must issue separate commands
859       to change your AFS and local passwords. See <A
860 HREF="c569.html#HDRWQ36"
861 >Changing Your Password</A
862 >. 
863        </P
864 ></DIV
865 ><DIV
866 CLASS="sect2"
867 ><H2
868 CLASS="sect2"
869 ><A
870 NAME="HDRWQ16"
871 >File and Directory Protection</A
872 ></H2
873 ><P
874 >AFS does not rely on the mode bit protections of a standard UNIX system (though its protection system does interact with
875       these mode bits). Instead, AFS uses an access control list (ACL) to control access to each directory and its contents. The
876       following list summarizes the differences between the two methods:
877
878       <UL
879 ><LI
880 ><P
881 >UNIX mode bits specify three types of access permissions: <SPAN
882 CLASS="bold"
883 ><B
884 CLASS="emphasis"
885 >r</B
886 ></SPAN
887 > (<SPAN
888 CLASS="bold"
889 ><B
890 CLASS="emphasis"
891 >read</B
892 ></SPAN
893 >), <SPAN
894 CLASS="bold"
895 ><B
896 CLASS="emphasis"
897 >w</B
898 ></SPAN
899 > (<SPAN
900 CLASS="bold"
901 ><B
902 CLASS="emphasis"
903 >write</B
904 ></SPAN
905 >), and <SPAN
906 CLASS="bold"
907 ><B
908 CLASS="emphasis"
909 >x</B
910 ></SPAN
911 > (<SPAN
912 CLASS="bold"
913 ><B
914 CLASS="emphasis"
915 >execute</B
916 ></SPAN
917 >). An AFS ACL uses seven types of permissions: <SPAN
918 CLASS="bold"
919 ><B
920 CLASS="emphasis"
921 >r</B
922 ></SPAN
923 > (<SPAN
924 CLASS="bold"
925 ><B
926 CLASS="emphasis"
927 >read</B
928 ></SPAN
929 >), <SPAN
930 CLASS="bold"
931 ><B
932 CLASS="emphasis"
933 >l</B
934 ></SPAN
935 > (<SPAN
936 CLASS="bold"
937 ><B
938 CLASS="emphasis"
939 >lookup</B
940 ></SPAN
941 >), <SPAN
942 CLASS="bold"
943 ><B
944 CLASS="emphasis"
945 >i</B
946 ></SPAN
947 > (<SPAN
948 CLASS="bold"
949 ><B
950 CLASS="emphasis"
951 >insert</B
952 ></SPAN
953 >), <SPAN
954 CLASS="bold"
955 ><B
956 CLASS="emphasis"
957 >d</B
958 ></SPAN
959 > (<SPAN
960 CLASS="bold"
961 ><B
962 CLASS="emphasis"
963 >delete</B
964 ></SPAN
965 >), <SPAN
966 CLASS="bold"
967 ><B
968 CLASS="emphasis"
969 >w</B
970 ></SPAN
971 > (<SPAN
972 CLASS="bold"
973 ><B
974 CLASS="emphasis"
975 >write</B
976 ></SPAN
977 >), <SPAN
978 CLASS="bold"
979 ><B
980 CLASS="emphasis"
981 >k</B
982 ></SPAN
983 > (<SPAN
984 CLASS="bold"
985 ><B
986 CLASS="emphasis"
987 >lock</B
988 ></SPAN
989 >), and <SPAN
990 CLASS="bold"
991 ><B
992 CLASS="emphasis"
993 >a</B
994 ></SPAN
995 > (<SPAN
996 CLASS="bold"
997 ><B
998 CLASS="emphasis"
999 >administer</B
1000 ></SPAN
1001 >). For more information, see <A
1002 HREF="c1444.html#HDRWQ46"
1003 >The AFS ACL Permissions</A
1004 > and <A
1005 HREF="c1444.html#HDRWQ59"
1006 >How AFS Uses the UNIX Mode
1007           Bits</A
1008 >.</P
1009 ></LI
1010 ><LI
1011 ><P
1012 >The three sets of mode bits on each UNIX file or directory enable you to grant permissions to three users or groups
1013           of users: the file or directory's owner, the group that owns the file or directory, and all other users. An ACL can
1014           accommodate up to about 20 entries, each of which extends certain permissions to a user or group. Unlike standard UNIX, a
1015           user can belong to an unlimited number of groups, and groups can be defined by both users and system administrators. See
1016           <A
1017 HREF="c2454.html"
1018 >Using Groups</A
1019 >.</P
1020 ></LI
1021 ><LI
1022 ><P
1023 >UNIX mode bits are set individually on each file and directory. An ACL applies to all of the files in a directory.
1024           While at first glance the AFS method possibly seems less precise, in actuality (given a proper directory structure) there
1025           are no major disadvantages to directory-level protections and they are easier to establish and maintain.</P
1026 ></LI
1027 ></UL
1028 >
1029 </P
1030 ></DIV
1031 ><DIV
1032 CLASS="sect2"
1033 ><H2
1034 CLASS="sect2"
1035 ><A
1036 NAME="HDRWQ17"
1037 >Machine Outages</A
1038 ></H2
1039 ><P
1040 >The kinds of failures you experience when a standard UNIX file system goes down are different than when one or more
1041       individual AFS file server machines become unavailable. When a standard UNIX file system is inaccessible, the system simply
1042       locks up and you can lose changes to any files with which you were working.</P
1043 ><P
1044 >When an AFS file server machine becomes inaccessible, you cannot access the files on that machine. If a copy of the file
1045       is available from another file server machine, however, you do not necessarily even notice the server outage. This is because
1046       AFS gives your cell's system administrators the ability to store copies of popular programs on multiple file servers. The
1047       Cache Manager chooses between the copies automatically; when one copy becomes unavailable, the Cache Manager simply chooses
1048       another.</P
1049 ><P
1050 >If there are no other copies of a file that is stored on an inaccessible server machine, you can usually continue to use
1051       the copy stored in your client machine's local AFS cache. However, you cannot save changes to files stored on an inaccessible
1052       file server machine until it is accessible again.</P
1053 ></DIV
1054 ><DIV
1055 CLASS="sect2"
1056 ><H2
1057 CLASS="sect2"
1058 ><A
1059 NAME="HDRWQ18"
1060 >Remote Commands</A
1061 ></H2
1062 ><P
1063 >    
1064          The UNIX <SPAN
1065 CLASS="emphasis"
1066 ><I
1067 CLASS="emphasis"
1068 >remote commands</I
1069 ></SPAN
1070 > enable you
1071       to run programs on a remote machine without establishing a connection to it by using a program such as <SPAN
1072 CLASS="bold"
1073 ><B
1074 CLASS="emphasis"
1075 >telnet</B
1076 ></SPAN
1077 >. Many of the remote commands (such as <SPAN
1078 CLASS="bold"
1079 ><B
1080 CLASS="emphasis"
1081 >ftp</B
1082 ></SPAN
1083 >, <SPAN
1084 CLASS="bold"
1085 ><B
1086 CLASS="emphasis"
1087 >rcp</B
1088 ></SPAN
1089 >, and <SPAN
1090 CLASS="bold"
1091 ><B
1092 CLASS="emphasis"
1093 >rsh</B
1094 ></SPAN
1095 >) remain available in AFS, depending on how your
1096       administrators have configured them. If the remote machine has a Cache Manager, your token is used there also and you are
1097       authenticated while the remote command runs. If the remote machine does not run a Cache Manager, you receive the following
1098       message:</P
1099 ><PRE
1100 CLASS="programlisting"
1101 >&#13;   Warning: unable to authenticate.
1102 </PRE
1103 ><P
1104 >In this case, you are logged into the remote machine's UNIX file system, but you are not authenticated to AFS. You can
1105       access the local files on the remote machine and the AFS directories that grant access to the <SPAN
1106 CLASS="bold"
1107 ><B
1108 CLASS="emphasis"
1109 >system:anyuser</B
1110 ></SPAN
1111 > group, but you cannot access protected AFS directories.</P
1112 ></DIV
1113 ><DIV
1114 CLASS="sect2"
1115 ><H2
1116 CLASS="sect2"
1117 ><A
1118 NAME="Header_28"
1119 >Differences in the Semantics of Standard UNIX Commands</A
1120 ></H2
1121 ><P
1122 >This section summarizes differences in the functionality of some commonly issued UNIX commands.
1123
1124       <DIV
1125 CLASS="variablelist"
1126 ><DL
1127 ><DT
1128 ><SPAN
1129 CLASS="bold"
1130 ><B
1131 CLASS="emphasis"
1132 >chmod   </B
1133 ></SPAN
1134 ></DT
1135 ><DD
1136 ><P
1137 >Only members of the <SPAN
1138 CLASS="bold"
1139 ><B
1140 CLASS="emphasis"
1141 >system:administrators</B
1142 ></SPAN
1143 > group can use this command to turn on
1144             the setuid, setgid or sticky mode bits on AFS files. (For more information about this group, see <A
1145 HREF="c1444.html#HDRWQ50"
1146 >Using the System Groups on ACLs</A
1147 >.)</P
1148 ></DD
1149 ><DT
1150 ><SPAN
1151 CLASS="bold"
1152 ><B
1153 CLASS="emphasis"
1154 >chown   </B
1155 ></SPAN
1156 ></DT
1157 ><DD
1158 ><P
1159 >Only members of the <SPAN
1160 CLASS="bold"
1161 ><B
1162 CLASS="emphasis"
1163 >system:administrators</B
1164 ></SPAN
1165 > group can issue this command on AFS
1166             files.</P
1167 ></DD
1168 ><DT
1169 ><SPAN
1170 CLASS="bold"
1171 ><B
1172 CLASS="emphasis"
1173 >chgrp   </B
1174 ></SPAN
1175 ></DT
1176 ><DD
1177 ><P
1178 >Only members of the <SPAN
1179 CLASS="bold"
1180 ><B
1181 CLASS="emphasis"
1182 >system:administrators</B
1183 ></SPAN
1184 > group can issue this command on AFS
1185             files and directories.</P
1186 ></DD
1187 ><DT
1188 ><SPAN
1189 CLASS="bold"
1190 ><B
1191 CLASS="emphasis"
1192 >groups   </B
1193 ></SPAN
1194 ></DT
1195 ><DD
1196 ><P
1197 >If the user's AFS tokens are identified by a process authentication group (PAG), the output of this command
1198             includes two large numbers. For a description of PAGs, see <A
1199 HREF="c569.html#HDRWQ24"
1200 >Authenticating with
1201             AFS</A
1202 >.</P
1203 ></DD
1204 ><DT
1205 ><SPAN
1206 CLASS="bold"
1207 ><B
1208 CLASS="emphasis"
1209 >inetd   </B
1210 ></SPAN
1211 ></DT
1212 ><DD
1213 ><P
1214 >The AFS version of this daemon authenticates remote issuers of the AFS-modified <SPAN
1215 CLASS="bold"
1216 ><B
1217 CLASS="emphasis"
1218 >rcp</B
1219 ></SPAN
1220 > and <SPAN
1221 CLASS="bold"
1222 ><B
1223 CLASS="emphasis"
1224 >rsh</B
1225 ></SPAN
1226 > commands with AFS.</P
1227 ></DD
1228 ><DT
1229 ><SPAN
1230 CLASS="bold"
1231 ><B
1232 CLASS="emphasis"
1233 >login utilities  </B
1234 ></SPAN
1235 ></DT
1236 ><DD
1237 ><P
1238 >AFS-modified login utilities both log you into the local UNIX file system and authenticate you with AFS.</P
1239 ></DD
1240 ><DT
1241 ><SPAN
1242 CLASS="bold"
1243 ><B
1244 CLASS="emphasis"
1245 >ln   </B
1246 ></SPAN
1247 ></DT
1248 ><DD
1249 ><P
1250 >You cannot use this command to create a hard link between files that reside in different AFS directories. You must
1251             add the <SPAN
1252 CLASS="bold"
1253 ><B
1254 CLASS="emphasis"
1255 >-s</B
1256 ></SPAN
1257 > option to create a symbolic link instead.</P
1258 ></DD
1259 ></DL
1260 ></DIV
1261 >
1262 </P
1263 ></DIV
1264 ></DIV
1265 ><DIV
1266 CLASS="sect1"
1267 ><H1
1268 CLASS="sect1"
1269 ><A
1270 NAME="HDRWQ19"
1271 >Using AFS with NFS</A
1272 ></H1
1273 ><P
1274 >Some cells use the Networking File System (NFS) in addition to AFS. If you work on an NFS client machine, your system
1275     administrator can configure it to access the AFS filespace through a program called the <SPAN
1276 CLASS="emphasis"
1277 ><I
1278 CLASS="emphasis"
1279 >NFS/AFS
1280     Translator</I
1281 ></SPAN
1282 ><SUP
1283 >TM</SUP
1284 >. See <A
1285 HREF="a3632.html"
1286 >Appendix A, Using the NFS/AFS
1287     Translator</A
1288 >.</P
1289 ></DIV
1290 ></DIV
1291 ><DIV
1292 CLASS="NAVFOOTER"
1293 ><HR
1294 ALIGN="LEFT"
1295 WIDTH="100%"><TABLE
1296 SUMMARY="Footer navigation table"
1297 WIDTH="100%"
1298 BORDER="0"
1299 CELLPADDING="0"
1300 CELLSPACING="0"
1301 ><TR
1302 ><TD
1303 WIDTH="33%"
1304 ALIGN="left"
1305 VALIGN="top"
1306 ><A
1307 HREF="f24.html"
1308 ACCESSKEY="P"
1309 >Prev</A
1310 ></TD
1311 ><TD
1312 WIDTH="34%"
1313 ALIGN="center"
1314 VALIGN="top"
1315 ><A
1316 HREF="book1.html"
1317 ACCESSKEY="H"
1318 >Home</A
1319 ></TD
1320 ><TD
1321 WIDTH="33%"
1322 ALIGN="right"
1323 VALIGN="top"
1324 ><A
1325 HREF="c569.html"
1326 ACCESSKEY="N"
1327 >Next</A
1328 ></TD
1329 ></TR
1330 ><TR
1331 ><TD
1332 WIDTH="33%"
1333 ALIGN="left"
1334 VALIGN="top"
1335 >About This Guide</TD
1336 ><TD
1337 WIDTH="34%"
1338 ALIGN="center"
1339 VALIGN="top"
1340 >&nbsp;</TD
1341 ><TD
1342 WIDTH="33%"
1343 ALIGN="right"
1344 VALIGN="top"
1345 >Using AFS</TD
1346 ></TR
1347 ></TABLE
1348 ></DIV
1349 ></BODY
1350 ></HTML
1351 >