Unix File Permissions |
||||||||||
|
Permission Fields |
Permissions indicate who is allowed to read, write, or execute a file. The first character tells what kind of file you have, such as d for directory. The next nine characters are the actual permissions.
Three fields of permission are available on a Unix file: the file owner, group members and everyone else . Each of these three fields has three types of permissions. They can read: r, write to: w, or execute: x the file. Only the owner of the file can set the access permissions for the file. In the above example, the owner can read, write to, and execute the file. Members of the owner's group and all others can execute the file, but cannot read or write to the file. |
|||||||||
|
Changing Permissions |
To change access permissions, use the chmod (change mode) command. This allows you to add or subtract permissions, as in the following example:
The g following chmod tells the computer to change permissions for the owner's group. The plus sign will add permission for the specified user class. The rwx refers to the read, write and execute options. And scr is the file in question. Using a minus sign will remove permissions. The following explains the shorthand:
|
| For more information on UNIX Permissions one can look at: |
|---|
|