775
Permission Code**
Permission Code: 775 Owner & Group Full, Public Read/Execute
775 grants full access to **owner and group, and read/execute to others:
rwxrwxr-x
This is a collaborative permission mode, useful in controlled Linux environments where the site user and web server group must both manage content.
Technical Definition
| No | Role | Permission Bits | Access | Notes |
|---|---|---|---|---|
| 1 | Owner | rwx | ✓ full | site administrator user |
| 2 | Group | rwx | ✓ full | www-data / lsadm / devs |
| 3 | Others | r-x | ✓ read/execute only | no write |
Practical Behavior
- Owner can read/write/execute
- Web server group can read/write/execute
- Public can only read & traverse folders
- Prevents unauthorized public write access
- Allows multi-user development workflows
WordPress Use Cases
| No | Use Case | Suitability | Notes |
|---|---|---|---|
| 1 | Multi-developer VPS | ✅ recommended | when multiple system users maintain WP |
| 2 | CI/CD deployment environments | ✅ recommended | shared between deploy tool & web server |
| 3 | Single-user WP VPS | ⚠ optional | 755 is simpler and safer |
| 4 | Shared hosting | ❌ avoid | group may include other tenants |
| 5 | Production WP with strict access | ✅ if properly configured | must isolate site group |
Why Choose 775 Instead of 755
755
Only owner has write access
Group has read-only access
775
Group also has write access
Used when **developer + server both must write files
Example scenario:
- You create a system user for site (
wpuser) - Web server runs as
www-data - Both need write access for deployments, updates, cache, uploads
Required Ownership Pattern
To safely use 775, directory must be owned like this:
owner:group = site-user:www-data
Example:
chown -R wpuser:www-data /var/www/your-site
chmod -R 775 wp-content
This ensures only the site user and web server can write.
Commands for WordPress Directory Setup
Set ownership
chown -R wpuser:www-data /var/www/your-site
Apply 775 to directories only (not files)
find wp-content/ -type d -exec chmod 775 {} ;
Ensure files remain 664 or 644
find wp-content/ -type f -exec chmod 664 {} ;
or stricter:
find wp-content/ -type f -exec chmod 644 {} ;
Reality Check Table (Benefits & Risks)
| No | Factor | 775 Outcome | Symbol |
|---|---|---|---|
| 1 | Owner write | allowed | ✅ |
| 2 | Group write | allowed | ✅ |
| 3 | Public write | denied | ✅ |
| 4 | Multi-user dev | supported | 👨💻 |
| 5 | Risk if group misconfigured | high | ⚠️ |
| 6 | Hardening requirement | strict group control | 🔒 |
When to Use vs Avoid
Recommended When
- Dedicated VPS
- You assign a unique group for the website
- Team/deploy tools handle WordPress files
- Git or automation writes into wp-content
Avoid When
- Shared hosting
- Unknown group membership
- You do not control server users
If unsure, default to:
755 for directories
644 for files
600 wp-config.php
Example WordPress Environment Using 775
Scenario
You deploy updates via Git or CI pipeline user, not wp-admin.
Workflow:
groupadd wpdeploy
usermod -aG wpdeploy wpuser
usermod -aG wpdeploy www-data
chown -R wpuser:wpdeploy /var/www/your-site
find . -type d -exec chmod 775 {} ;
find . -type f -exec chmod 664 {} ;
Effect:
- Developer + webserver share controlled access
- Public still restricted
Testing Exercise (Safe Environment)
- Assign group to web server user
chown -R wpuser:www-data /var/www/your-site
- Apply
775to folders
find . -type d -exec chmod 775 {} ;
- Apply
664or644to files
find . -type f -exec chmod 664 {} ;
- Verify access
stat wp-content
stat wp-content/uploads
Key Takeaways
| No | Principle | Value |
|---|---|---|
| 1 | 775 = owner & group full access | ✓ |
| 2 | Requires correct ownership | ✓ |
| 3 | Safer than 777 | ✓ |
| 4 | More flexible than 755 | ✓ |
| 5 | Use only when group trust exists | ✓ |
| 6 | Default for most WP servers still 755 | ✓ |