RWX File Permissions Notation on Linux

Share

On Linux, sometimes file permissions are written in a notation of three characters, rwx, which represent the read, write, and execute permissions, respectively. In such case, if a permission exists, it's written as the letter, and if it's missing, it's written as a dash (-), e.g. r-- means only the read permission, and not write or execute.

Furthermore, a single file on Linux has 3 sets of permissions: one for the owner of the file, one for the group of the file, and one for others. These three permissions are normally shown in this order, so there is also a notation of writing all the permissions as a triplet of rwx characters, e.g. rwxrwxrwx. If you ever see a text code with 9 characters in this format on Linux, it's likely this is what it means.

NotationOwnerGroupOthers
rwxrw-r--All permissions.Can't execute.Read only.
rw-r-----Can't execute.Read-only.No permissions.
rwxrwxrwxAll permissions.Same.Same.
---------No permissions.No permissions.No permissions.
Examples of file permission notations on Linux.

Comments

Leave a Reply

Leave your thoughts! Required fields are marked *