Linux file permissions

File permissions are stored together with the data on a disk. The Linux kernel uses them to decide which users and processes can access what file.

This page can be considered as a good cheat sheet, while the underlying articles explain how to use this information.

Main permissions

  • Read (r): Allows users to view the contents of a file or directory
  • Write (w): Grants users the ability to modify the contents of a file or directory
  • Execute (x): Enables users to execute a file or access the contents of a directory
PermissionAbbreviationOctal value
Readr4
Writew2
Executex1

Possible combinations:

PermissionsOctal Value
---0
--x1
-w-2
-wx3
r--4
r-x5
rw-6
rwx7

Entities

  • User (u): The user who owns the file or directory, or the owner of the file
  • Group (g): A collection of users who share common permissions
  • Others (o): Everyone else who is not the owner or a member of the group

How to change file permissions

Learn how to change the file permissions of files and directories on a Linux system. Follow the examples and make your system more secure.

Introduction in Linux file permissions

Learn the basics of how a Linux system applies file permissions. We look at examples to demystify the permissions mean and learn to troubleshoot common issues.

Relevant linux file permissions commands

Like to learn more about the commands used in this section? Have a look at the cheat sheets or the related command page.

  • chmod
  • ls