Updated on January 20, 2026.
In websites, users can read files, run scripts but their access to editing files is blocked or limited. In contrast to anonymous users, the website managers can edit, move and delete files. Linux controls access to files and folders through three specific permissions: Read, Write, and Execute. These attributes determine exactly what a user can or cannot do with a specific item.
Linux recognizes three categories of users. Thus, for the following two factors,
- Actions (3 types)
- Users (3 categories)
Permissions for actions 🡱
Linux provides permissions for only three types of actions on files and folders. Permission for these three actions are abbreviated by a single letter and are assigned a numerical value as shown in Table 1 below. Understanding the numeric values is essential because file permissions are generally modified by commands that use numeric codes.
| Permission | Symbol | Value |
|---|---|---|
| Read | r | 4 |
| Write | w | 2 |
| Execute | x | 1 |
| None | - | 0 |
The permissions of a file or a folder can be seen in a file manager under the "Properties" section - assuming that the user has the right credentials (permissions)!
Permissions to users 🡱
Linux recognizes three categories of users with the following names and symbols:
| Category | Symbol |
|---|---|
| User (Owner) | u |
| Group | g |
| Others | o |
| All (user, group, others) | a |
Each of these three categories of users can be provided permissions for three types of ACTIONS noted above: Read, Write and Execute.
The permission profile for a single user is represented by a 3-letter string and by the sum of the values of each permission. For example, the permission profile of a user who can read, write and execute a file will be rwx. In numeric values the total for this user will be 4+2+1=7.
| Permission names | Permission string | Values | Final value |
|---|---|---|---|
| read, write, execute | rwx | 4+2+1 | 7 |
| read, write | rw- | 4+2+0 | 6 |
| read, execute | r-x | 4+0+1 | 5 |
| read | r-- | 4+0+0 | 4 |
| write, execute | -wx | 0+2+1 | 3 |
| write | -w- | 0+2+0 | 2 |
| execute | --x | 0+0+1 | 1 |
| none | --- | 0+0+0 | 0 |
Viewing permissions in Directory listing 🡱
Since each of the three user types (Owner, Group, Others) may have permission for three types of actions (Read, Write, Execute) on a specific file, each file and folder should have altogether nine (3×3=9) permission attributes covering all three types of users.
To view the permissions of files, enter the command ls -l. In the directory list that appears, each line starts with a string of 10 characters. Example: drwxrwxrwx. The first character in the string specifies the file type. The following nine characters in the string are the standard rwx permissions for the Owner, Group, and Others.
Example 1:
For a directory (folder) entry, if all three types of users have full permission for all three actions, the string will be rwx and the numeric value will be 4+2+1=7 for each user as shown in the table below. The "d" in the first column symbolizes that the item "type" is directory. The last column shows the final permission in string and numeric formats.
| Type* | Owner | Group | Others | Final code | ||
|---|---|---|---|---|---|---|
| String | d | rwx | rwx | rwx | rwxrwxrwx | |
| Numeric | 7 | 7 | 7 | 777 | ||
* The first file Type character (d) is not part of the permission code. | ||||||
Example 2:
For a file entry, if all three types of users have only read permission, the string will be r‑-. The hyphens specify that the user does not have Write (w) or Execute (x) permission for the specific file. The numeric value will be 4+0+0=4 for each user as shown in the table below. The first "-" (hyphen) symbolizes that the item "type" is file. The last column shows the final permission in string and numeric formats.
| Type | Owner | Group | Others | Final code | ||
|---|---|---|---|---|---|---|
| String | - | r-- | r-- | r-- | r--r--r-- | |
| Numeric | 4 | 4 | 4 | 444 |
Numeric versus String permission codes 🡱
The two examples above illustrate the simplicity of the numeric code formed by three digits, as compared to nine characters for the string representation of the file permission. In the numeric code, each digit represents one user's permission. The numeric code is most commonly used with the chmod (change mode) command presented on page Changing Permissions.
Other file types
We noted above that in a directory listing, the first character in the 10-character string specifies the file type. Table 4 below shows the symbols for different file types recognized by Linux. Note that none of the symbols specify an executable "program". In Linux, a program is classified as a file similar to a text file or image file.
| First letter | File type |
|---|---|
| - (hyphen) | a regular file |
| d | a directory |
| l | a symbolic link |
| c | a character device file |
| b | a block device file |
| p | a named pipe (FIFO) |
| s | a socket |
• Next: Changing Permissions