Linux — File Permissions

Tony
4 min readFeb 22, 2024

What is Linux File Permissions

Linux file permissions are a critical security feature that governs the accessibility and modifiability of files and directories in the Linux operating system.

Permissions in Linux are categorized into three levels, ranging from specific to general:

  • User: Refers to the file’s owner.
  • Group: A collective that may include one or several members.
  • Other: Encompasses all users not included in the first two categories.

Access to files and directories is governed by three primary types of permissions:

  • Read (r): For files, this permission enables viewing of the file’s contents. For directories, it allows listing the names of the files contained within.
  • Write (w): For files, this permits altering or deleting the file. For directories, it grants the ability to add, rename, or remove files inside the directory.
  • Execute (x): For files, this allows the execution of the file, provided the user also has read access to it. For directories, it enables access to the directory’s file metadata, allowing actions like changing into the directory (cd) or listing its contents (ls).

Note:

s is the setuid/setgid permission…

--

--