chmod 755 Explained — Owner Full, Others Read+Execute
Understand the 755 permission in Linux. Owner gets read, write, and execute; group and others get read and execute. The standard for executables and public directories.
Detailed Explanation
What Does chmod 755 Mean?
The permission 755 is one of the most commonly used Linux file permissions. It breaks down into three octal digits, each representing a sum of permission bits:
| Role | Octal | Binary | Symbolic | Permissions |
|---|---|---|---|---|
| Owner | 7 | 111 | rwx | Read + Write + Execute |
| Group | 5 | 101 | r-x | Read + Execute |
| Others | 5 | 101 | r-x | Read + Execute |
Why 755?
Permission 755 follows the principle of least privilege for public resources:
- The owner (typically the user who created the file or a service account) has full control: they can read the content, modify it, and execute it.
- Group members and other users can read and execute but cannot modify. This prevents accidental or malicious changes while still allowing the file to be used.
Where Is 755 Used?
# Executable scripts and binaries
chmod 755 /usr/local/bin/my-script.sh
# Public directories (web root, project dirs)
chmod 755 /var/www/html
# System directories
ls -ld /usr /usr/bin /usr/local
# drwxr-xr-x ...
755 for Directories vs Files
For directories, execute permission means the ability to cd into the directory and access files within it. Without execute on a directory, users cannot traverse it even if they have read permission.
For files, execute permission means the file can be run as a program. Regular data files (text, images, configs) should typically NOT have execute permission.
Security Considerations
Permission 755 is generally safe for files that are intended to be publicly readable and executable. However, configuration files containing secrets should use more restrictive permissions like 600 or 640.
Use Case
Use 755 for shell scripts, compiled binaries, and directories that need to be accessible by all users. This is the default for most system executables in /usr/bin and public web directories. It is also the standard permission for CGI scripts.
Try It — Linux Permission Reference
Related Topics
chmod 644 Explained — Owner Read-Write, Others Read-Only
Common Permissions
chmod 700 Explained — Owner-Only Full Access
Common Permissions
Why chmod 777 Is Dangerous — Security Risks Explained
Common Permissions
Web Server File Permissions — Apache, Nginx, and PHP
Directory & Web
Linux Directory Permissions Explained — How rwx Differs for Directories
Directory & Web