Symbolic: rwxr-xr--
Octal: 755
chmod -R 755 filename
755
- Standard for directories that don't need write access by group/others775
- Directories that need group write access700
- Private directories (owner access only)644
- Standard for regular files664
- Files that need group write access600
- Private/sensitive files755
- Executable filesFile/Directory Type | Recommended Permission | Reasoning |
---|---|---|
SSL Private Keys | 600 | Contains highly sensitive data |
Log Directories | 775 | Needs write access for application |
Backup Files | 600 | Often contain sensitive data |
Public Content | 644 | Read access needed by web server |
Avoid using 777
(full access for everyone) as it poses significant security risks. If you think you need 777
, there's likely a better solution involving proper user/group ownership.