Chmod 755 for Directories
Learn how chmod 755 works for directories. Owner full access, others can list and traverse. The standard web server directory permission.
Permission
755
rwxr-xr-x
chmod 755 filename
Permission Breakdown
| Role | Read (4) | Write (2) | Execute (1) | Octal | Meaning |
|---|---|---|---|---|---|
| Owner | r | w | x | 7 | read, write, execute |
| Group | r | - | x | 5 | read, execute |
| Others | r | - | x | 5 | read, execute |
Visual Permission Grid
Detailed Explanation
The permission 755 is the standard permission for directories on Unix systems, especially for web server document roots and application directories.
Octal breakdown:
- 7 (Owner): read (4) + write (2) + execute (1) = full access
- 5 (Group): read (4) + execute (1) = read and execute
- 5 (Others): read (4) + execute (1) = read and execute
In symbolic notation this is rwxr-xr-x.
For directories, the permission bits have different meanings than for files:
- Read (r): List the directory contents (
lscommand) - Write (w): Create, delete, and rename files in the directory
- Execute (x): Traverse into the directory (
cdcommand) and access files by path
Permission 755 allows the owner to create and manage files, while group and others can browse the directory and access its files. The web server needs both read (to list contents for directory indexes) and execute (to traverse into the directory to find requested files) permissions.
Important: Even if a directory is 755, the files inside still need appropriate permissions (typically 644) to be readable. A restrictive directory permission overrides permissive file permissions, but not the other way around.
Use Case
The standard permission for web server directories (/var/www), application installation directories, and any public directory that serves content to users or web servers.