Linux File Permissions Explained: Read, Write, Execute (and Those Numbers)
What 'rwxr-xr-x' and 'chmod 755' actually mean, demystified once and for all.
Why permissions exist
Linux was built from the start to be a multi-user system, many people using one machine, so it needs rules about who can do what to each file. That's what permissions are: they control who can read, change, or run each file and folder. This keeps users from interfering with each other and protects critical system files from accidental or malicious changes. Even on a single-user laptop, permissions matter for security and for understanding error messages like 'permission denied.' Once you grasp the logic, the cryptic symbols become easy to read.
The three permissions: read, write, execute
Every file has three basic permission types. 'Read' (r) lets you view a file's contents (or list a folder's contents). 'Write' (w) lets you modify or delete a file (or add/remove files in a folder). 'Execute' (x) lets you run a file as a program (or, for a folder, enter it). These three, r, w, x, are the building blocks. A file might allow reading but not writing (so you can view but not change it), or allow execution (so it can run). Understanding these three actions is most of the battle.
The three groups: owner, group, others
Permissions are set separately for three categories of people. The 'owner' (usually the user who created the file), the 'group' (a set of users who share access), and 'others' (everyone else on the system). So a file can, say, let its owner read and write, let the group only read, and let others do nothing. This is why permission listings have three sets of rwx, one for each category. It lets you share a file with some people while restricting others, all with a single, compact set of rules.
Reading 'rwxr-xr-x'
Now the scary-looking string makes sense. When you run 'ls -l', you see something like '-rwxr-xr-x.' Ignore the first character (it indicates file type; '-' is a file, 'd' a directory). The remaining nine characters are three groups of three: the first 'rwx' is the owner's permissions (read, write, execute), the next 'r-x' is the group's (read, execute, no write), and the last 'r-x' is others' (same). A dash means that permission is off. Read it in three chunks, owner, group, others, and you can decode any permission line at a glance.
The numbers: what 755 and 644 mean
Those permission numbers are just a shorthand. Each permission has a value: read = 4, write = 2, execute = 1. Add them per category. So 'rwx' = 4+2+1 = 7, 'r-x' = 4+0+1 = 5, and 'r--' = 4. That's why '755' means owner rwx (7), group r-x (5), others r-x (5), a common setting for programs and folders. '644' means owner rw- (6), group r-- (4), others r-- (4), typical for regular files. Once you know the 4-2-1 values, translating numbers to permissions becomes quick mental math.
Changing permissions: chmod and chown
Two commands manage all this. 'chmod' (change mode) sets permissions: 'chmod 755 script.sh' applies the numeric permissions above, and you can also use letter syntax like 'chmod +x file' to add execute. 'chown' (change owner) changes who owns a file: 'sudo chown user file.txt.' You'll use these often, for example, making a downloaded script executable, or fixing ownership after copying files. Be careful using them with 'sudo' on system files, wrong permissions can break things, but for your own files, they're everyday tools once you understand the model above.
Related on Skillo
See also: Essential Linux terminal commands for beginners, Linux package managers explained: apt, dnf, pacman.
Sources
Published date reflects the original event date (2026-04-26). This article is original Skillo editorial written from the sources above; facts were verified in September 2026.
Written by
Skillo Staff
0 Comments
Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.