Permissions

In a multi-user environment, security of user and system data is important. Linux™ has three distinct classes:

  • r - read permission grants the ability to read a file.

  • w - write permission grants the ability to modify a file.

  • x - execute permission grants the ability to execute a file.

The list above shows the symbolic notation of each permission in bold text. Each permission also has an octal notation (is represented by digits from 0 to 7):

  • r - 4

  • w - 2

  • x - 1

Permissions Example

To view permissions, open a terminal by going to K menuApplicationsSystemTerminal (Konsole) and then type

ls -l ~/

This will output a list of the directories and files in the current user's home directory. For example:

drwxr-xr-x 2 username usergroup 4096 2009-12-17 11:10 Documents

The first column, which contains drwxr-xr-x, can be interpreted as follows:

File TypeUser PermissionsGroup PermissionsOthers Permissions
d - directory rwx - read, write, and execute permissions for the user r-x - read and execute permissions for the group r-x - read and execute permissions for all others

Octal to Symbolic Summary

OctalSymbolicDescription
0---no permissions
1--xexecute only
2-w-write only
3 (2+1)-wxwrite and execute
4r--read only
5 (4+1)r-xread and execute
6 (4+2)rw-read and write
7 (4+2+1)rwxread, write, and execute