File Attributes

Permission flags:

r = READ w = WRITE x = EXECUTE

The very first permission flag for a file is a special flag that shows what type of file it is. After that, there are three groups of three flags. These are meant to represent "Owner", "Group" and "Others".

For example, let's say a file is listed with the permission status of: -rw-r-----

You can break this down by separating the groups. The very first flag is a "-" and represents the type of file this is (see below). The next group of three flags are "rw-" which means that the Owner of this file has both read and write access. The second group of three flags are "r--" which means that the Group for this file has only read access. The last group of three is "---" and shows that everyone else (Other) has no access to this file at all.

As mentioned above, the beginning flag shows the type of file according to this structure:

"-" = regular file "d" = directory "l" = link "c" = character file
"b" = block file "P" = pipe "D" = door "s" = socket

Thus a directory's permissions could be show as: drwxr-xr-x

When using the "chmod" command, another way of representing the permissions of a file is with octet number values as shown below:

7 = rwx 6 = rw- 5 = r-x 4 = r--
3 = -wx 2 = -w- 1 = --x 0 = ---

Thus a file with the permissions in the above example could be shown by the numerals: 640

Engineering Network Services home page link College of Engineering home page link