next up previous contents index
Next: E-Mail Up: Shell Basics Previous: Simple File Operations   Contents   Index

File Permissions

Another one of the strengths of Unix is the ability to share files with other users (but not necessarily everyone). Every file and directory has permissions associated with it. These permissions determine who has access to the file or directory. There are three types of access: read (r), write (w), and execute (x). There are also three categories of folks: user (u), group (g), and others (o). When you do a full listing of a file you might see something like this:


-rw-r-r- 1 joeblow  target 9698 May 29 15:54 intro.tex
The first field (-rw-r--r--) defines the file permissions. In this example the file is readable by user, group, and others, but is only writeable by the user. You can change the file permissions with the chmod command. Explaining the intracacies of file ownership and access is somewhat beyond the scope of this document. Check the references in Section I.7 for more information on these topics.



Mohammad Ahmed 2003-07-23