Understanding Permissions and Ownership in Bash
Understanding Permissions and Ownership in Bash
This file explains basic concepts of file permissions and ownership in Linux/Bash.
1. Understanding Permissions
- Linux uses a three-tiered permission system: User (owner), Group, and Others (everyone
else).
- For each tier, there are three types of permissions: Read (r), Write (w), and Execute (x).
- Permissions are typically displayed in the long listing (`ls -l`) as a string like `-rw-r--r--` or
`drwxr-xr-x`.
- The first character indicates the file type (`-` for regular file, `d` for directory).
- The next three characters are the user's permissions.
- The following three are the group's permissions.
- The last three are the others' permissions.
Understanding and managing permissions and ownership is crucial for system security and
proper file access control.