Information Technology Reference
In-Depth Information
Standard File Permissions
Files and directories can have read, write, and execution permissions.
Permissions can be assigned to three classes of system accounts: the user
account that owns the file, the group account that has group permissions,
and everyone else. These are referred to as user , group , and other permissions.
The read, write, and execution for user, group, and other can be set inde-
pendently of one another.
Two types of notation are used to specify file permissions (also known as the
file access mode )—absolute mode and symbolic mode. Absolute mode is also
referred to as octal mode. Absolute mode is a numeric value assigned to each
permission per account class. Table 4.1 lists the absolute modes.
Table 4.1
Absolute File Permission Modes
Absolute Mode
Description
001
Other execution
002
Other write
004
Other read
010
Group execution
020
Group write
040
Group read
100
User execution
200
User write
400
User read
The access mode of a file is determined by adding these absolute modes (user
permissions plus group permissions plus other permissions). For example, a
file with user read (400) and user write (200) without any other permissions
for group or other would have an access mode of 400 + 200, or 600. Adding
group read (040) and group write (020) to this file would result in an access
mode of 600 + 060, or 660. Adding other read (004) and other write (002)
would result in 666. Adding user execution (100) results in a file access mode
of 766.
The other type of notation is symbolic mode. Using this mode, read access
is represented by the letter r , write by the letter w , and execution by the let-
ter x . Also the letters u , g , and o are used to represent user, group, and other
permissions. Symbolic mode supports adding permissions, “ + ”, removing
permissions, “ - ”, and set only the specified permissions, “ = ”.
Search WWH ::




Custom Search