| File System Permissions |
Article Index for File |
Website Links For File System |
Information AboutFile System Permissions |
| CATEGORIES ABOUT FILE SYSTEM PERMISSIONS | |
| computer file systems | |
|
DIFFERENCES BETWEEN OPERATING SYSTEMS Unix-like and otherwise POSIX -compliant systems have a simple system for managing individual file permissions. POSIX also specifies a system of Access Control List s, but it is only implemented by certain file systems and operating systems. DOS variants (including the Microsoft products MS-DOS , Windows 95 , Windows 98 , and Windows Me ) do not have permissions. There is a "read-only" attribute that can be set or unset on a file by any user or program. Mac OS X , Microsoft Windows NT and its derivatives (including Windows 2000 and Windows XP ), as well as VMS and OpenVMS use Access Control List s (ACLs) to administer a more complex and varied set of permissions. TRADITIONAL UNIX PERMISSIONS Permissions on Unix-like systems are managed in three distinct ''classes''. These classes are known as ''user'', ''group'', and ''others''. In effect, Unix permissions are a simplified form of Access Control List s (ACLs). Classes On Unix File System s, every File and Directory is ''owned'' by a specific user. The owner of an object comprises its ''user class''. Permissions assigned to the user class only apply to that specific user. A file or directory is also assigned a group, which comprises its ''group class.'' Permissions assigned to the group class only apply to members of that group. Users who are not otherwise represented by the other two classes comprise a file's others class. The ''effective permissions'' that have applied to a specific user in relation to a file are determined in logical precedence. For example, the user who owns the file will have the effective permissions given to the user class regardless of those assigned to the group or others class. Basic Permissions There are three specific permissions on Unix-like systems that apply to every class:
When a permission is not set, the rights it would grant are denied. Unlike ACL -based systems, permissions on a Unix-like system are not ''inherited''. Files created within a directory will not necessarily have the same permissions as that directory. The permissions to be assigned are determined using Umask s. Additional Permissions Unix-like systems typically employ three additional permissions or modes. These special permissions are set for a file or directory overall, not by a class.
These additional permissions are also referred to as ''setuid bit'', ''setgid bit'', and ''sticky bit'' respectively, due to the fact that they each occupy only one bit. PERMISSION NOTATION Symbolic notation There are many ways by which Unix permission schemes are represented. The most common form is symbolic notation. This scheme represents permissions as a series of 10 characters. The first character indicates the file type:
Each class of permissions is represented by three characters. The first set of characters represents the user class. The second set represents the group class. The third and final set of three characters represents the others class. Each of the three characters represent the read, write, and execute permissions respectively:
The following are some examples of symbolic notation: #"-rwxr-xr-x" for a regular file whose user class has full permissions and whose group and others classes have only the read and execute permissions. #"crw-rw-r--" for a character special file whose user and group classes have the read and write permissions and whose others class has only the read permission. #"dr-x --" for a directory whose user class has read and execute permissions and whose group and others classes have no permissions. Symbolic notation and additional permissions The additional permissions complicate the symbolic notation somewhat. Because they are not often set by unprivileged users, knowledge of their specific convention is not necessary for an understanding of symbolic notation in general.
Here is an example:
Octal notation Another common method for representing Unix permissions is '' Octal notation''. Octal notation consists of a three- or four-digit Base -8 value. With three-digit octal notation, each numeral represents a different component of the permission set: user class, group class, and "others" class respectively. Each of these digits is the sum of its component bits (see also Binary Numeral System ). As a result, specific bits add to the sum as it is represented by a numeral:
These values never produce ambiguous combinations; each sum represents a specific set of permissions. These are the examples from the Symbolic Notation section given in octal notation:
Octal notation and additional permissions There is also a ''four-digit'' form of octal notation. In this scheme, the standard three digits described above become the last three digits. The first digit represents the additional permissions. On some systems, this first digit cannot be omitted; it is therefore common to use all four digits (where the first digit is zero). This first digit is also the sum of component bits:
The example from the ''Symbolic notation and additional permissions'' section, "-rwsr-Sr-x" would be represented as 6745 in four-digit octal. In addition, the examples in the previous section would be represented as 0755, 0664, and 0500 respectively in four-digit octal notation. SEE ALSO
|
|
|