$linuxjunkies
>

permissions

also: file permissions, access permissions, chmod, mode bits

Permissions are rules that control who can read, write, or execute a file or directory on a Linux system. They are enforced at the filesystem level and assigned to the owner, group, and others.

Linux permissions determine access to files and directories through three categories: owner (user who created the file), group (a set of users), and others (everyone else). Each category can have three types of access: read (r), write (w), and execute (x).

Permissions are displayed in symbolic or numeric form. Symbolic form looks like -rw-r--r--, where the first character indicates file type, followed by three groups of three characters for owner, group, and others. For example, rwx means read, write, and execute allowed. Numeric form uses octal notation: 4 for read, 2 for write, and 1 for execute, added together per category (e.g., 755 means owner can do anything, group and others can read and execute).

Use chmod to change permissions and ls -l to view them. A common practice is setting a script executable with chmod +x script.sh or restricting a file with chmod 600 secret.txt to allow only the owner to read and write.

Related terms