The Permissions Numbering System

As previously mentioned, directory listings display permissions as three sets of characters—one for the owner of the file, one for the group that the file belongs to, and one for everyone else, as shown below:

user (u)    group (g)  others (o)

rwx         rwx        rwx

Each possible combination of permissions for a set can be represented by a numeric value, 0-7, like so:

Value

Permission

Directory Listing

0

No read, no write, no execute

---

1

No read, no write, execute

--x

2

No read, write, no execute

-w-

3

No read, write, execute

-wx

4

Read, no write, no execute

r--

5

Read, no write, execute

r-x

6

Read, write, no execute

rw-

7

 Read, write, execute

rwx

A full set of permissions is then represented by a three-digit number; for example, 664 corresponds to the following file permissions:

-rw-rw-r--

Recall that the first character denotes the type of resource, which in this case is a file.

Following are some of the more common chmod numbers and their corresponding permission sets:

chmod 557 =  -r-xr-xrwx

chmod 600 =  -rw-------

chmod 644 =  -rw-r--r--

chmod 664 =  -rw-rw-r--

chmod 700 =  -rwx------

chmod 755 =  -rwxr-xr-x

chmod 775 =  -rwxrwxr-x