Chmod 500 Explained
Chmod 500: owner can read and execute, no access for group or others. Protects scripts from accidental modification.
Permission
500
r-x------
chmod 500 filename
Permission Breakdown
| Role | Read (4) | Write (2) | Execute (1) | Octal | Meaning |
|---|---|---|---|---|---|
| Owner | r | - | x | 5 | read, execute |
| Group | - | - | - | 0 | no permissions |
| Others | - | - | - | 0 | no permissions |
Visual Permission Grid
Detailed Explanation
The permission 500 allows the owner to read and execute the file but prevents writing, while blocking all access for group and others.
Octal breakdown:
- 5 (Owner): read (4) + execute (1) = read and execute
- 0 (Group): no access
- 0 (Others): no access
In symbolic notation this is r-x------. The owner can read the file contents and execute it as a program. The owner cannot modify the file without first changing permissions. Group members and other users have no access at all.
This permission is used for executable files that should be protected from accidental modification. By removing the write bit, you create a safeguard against unintentional changes. The file can still be executed, but any attempt to edit it will be denied. This is useful for critical system scripts, deployment scripts, and any executable where stability is more important than convenience.
Use Case
Used for critical deployment scripts, system utilities, and hardened executables that should never be modified accidentally on the running system.