UNIX File Protections To allow access to the contents of a file or a directory, the permission fields are used. There are three types of permissions and three types of people for the purposes of access. By default, all your files are created 'private'; no one else on the system can read any of your files unless you allow them to. * the permission types are read (r), write (w), and execute (x) * the people types are user (u), group (g), and others (o) To see the current settings, use the command "ls -lg". That is the command ls for listing files with options, (l) for long format and (g) for group names. Here's a sample: -rw-r--r-- 1 mer staff 1551 Nov 4 14:32 notes -rw-rw---- 1 mer staff 95 Oct 15 17:33 agenda drwxr-xr-x 2 mer staff 512 Nov 5 19:54 shipping The permission field appears at the very left and is the portion we are discussing. The first bit indicates the file type. In the above example, there are two regular files indicated by a '-' in the first space and one directory indicated by 'd'. The next nine bits are three sets of the three permission types, one set for each of the three types of people. read, write, execute for user | | read, write, execute for group | | | | read, write, execute for others | | | -rwxrwxrwx The command 'chmod' allows you to add (+) or remove (-) individual permissions for the each of the people types; the user [yourself] (u), members of your group (g), or others on the system (o). The shorthand notation might seem a bit cryptic at first but let's give it a try: Adding read access to group and others: chmod go+r filename (group and other, plus read) Removing read access to group and others: chmod go-r filename (group and other, minus read) Adding read and execute permission to group and others: chmod go+rx filename (group and other, plus read and execute) Removing read and execute permission to group and others: chmod go-rx filename (group and other, minus read and execute) Modifying directories: All directories must have the execute bit set in order to use them properly. When modifying a directory's permissions be certain to allow execute permission. Adding read access to group and others: chmod go+rx directory Removing read access to group and others: chmod go-rx directory For futher details, check the manual page for chmod. The command chmod works in two modes, absolute and symbolic. The brief overview we did here describes the symbolic mode. The manual page for ls has additional information about the file types shown by that first character in the long listing (usually a - as most files are text files). The UNIX command 'umask' will allow you to modify the default file protections which your account uses. To understand this command you must be familiar with the absolute modes which are fully described in the man page on chmod