read, write and execute permissions
The three basic permissions in a file mode: read (r, 4) to view, write (w, 2) to change and execute (x, 1) to run.
In more detail
On a regular file, execute lets the kernel run it as a program. On a directory the bits mean something different: read lists names, write adds or removes entries, and execute allows search, meaning you may pass through it to reach what is inside. The octal values add up per class, so rwx is 7 and r-x is 5.
Related terms
- file mode — The set of permission bits stored with each file that says what the owner, the group and everyone else may do with it.
- search permission — The execute bit on a directory, which allows a process to pass through it to reach files and subdirectories inside.
- octal mode — Writing a file mode as base-8 digits, one per class, where each digit is the sum of read 4, write 2 and execute 1.
- permission class — One of the three audiences a file mode gives separate permissions to: the owner (u), the owning group (g) and everyone else (o).
Taught in
- Reading And Setting A File Mode — Linux Fundamentals & Systems Administration
- Directories, Umask And The Sticky Bit — Linux Fundamentals & Systems Administration