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.
Windows 2000 and Windows XP have better access control list.
VMS and OpenVMS as well as Microsoft Windows NT and its derivatives (including Windows 2000 and Windows XP), use access control lists (ACLs) to administer a more complex and varied set of permissions.
Classic Mac OSes are similar to DOS variants and DOS based Windows: they do not support permissions, but only a "Protected" file attribute.
Mac OS X, beginning with version 10.4 ("Tiger"), supports the use of NFSv4 ACLs. It also supports "traditional Unix permissions" as used in previous versions of Mac OS X, and the Apple Mac OS X Server version 10.4+ File Services Administration Manual recommends using only traditional Unix permissions if possible. It also still supports the Mac OS Classic's "Protected" attribute.
When a new file is created on a Unix-like system, its permissions are determined from the umask of the process that created it.
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 (other than the owner). It is not necessary that the owner be a member of the file's group. While a particular file can be assigned to only one group, a particular user can be a member of any number of groups, and a group can include any number of users. The "groups" command lists all the groups that include a user; the "members" command lists all the users that are the member of a particular group (Stutz 2004). The system administrator uses "addgroup" to add a user to a 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.
The effect of setting the permissions on a directory (rather than a file) is "one of the most frequently misunderstood file permission issues" (Hatch 2003).
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 umasks.
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.
| First Character | |
|---|---|
| - | a regular file |
| d | a directory |
| l | a symbolic link |
| Three groups of three | |
| first | what the owner can do |
| second | what the group members can do |
| third | what other users can do |
| The triplet | |
| first | r: readable. |
| second | w: writable. |
| third | x: executable. |
| other: see below. | |
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.| Permission | Class | Executable1 | Non-executable2 |
|---|---|---|---|
| Set User ID (setuid) | User | s | S |
| Set Group ID (setgid) | Group | s | S |
| Sticky bit | Others | t | T |
Here is an example:
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:
Here is a summary of the meanings for individual octal digit values:
1 --x execute
2 -w- write
3 -wx write and execute
4 r-- read
5 r-x read and execute
6 rw- read and write
7 rwx read, write and execute
Octal digit values can be added together to make Symbolic Notations:
(4=r)+(1=x) == (5=r-x)
(4=r)+(2=w) == (6=rw-)
(4=r)+(2=w)+(1=x) == (7=rwx)
Here is a summary showing which octal digits affect permissions for user, group, and other:
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 (755, 664, and 500) would be represented as 0755, 0664, and 0500 respectively in four-digit octal notation.
Some system administrators create a new group -- a "user private group" -- for each new user. The "user private group" scheme makes it easier to set up a directory dedicated to each project of that group. Only members of that group can create new files in that directory, and everyone in a group (and only the people in that group) can edit files in that directory.