Skip to main content

600

600 Permission Code**

Permission Code: 600 Owner Read/Write Only (Highly Sensitive Files)

600 grants **read + write to the owner and **no access at all to group and others.

rw-------

This mode is used for the most sensitive files in a WordPress VPS environment especially those containing credentials or private keys.

It ensures only the file owner can read or modify the file, preventing access by any other user or process.

Technical Structure

NoRoleBitsAccessAllowed?
1Ownerrw-read/write
2Group---no access
3Others---no access

Behavior

  • Only the owner can read and modify the file
  • No other system user or service can even read it
  • Prevents privilege escalation through configuration exposure
  • Essential when storing database credentials, private keys, tokens

WordPress Use Cases

NoFile / LocationSuitabilityReason
1wp-config.phpprevents DB & secret leakage
2.env config filesprotects environment secrets
3Private keys (id_rsa)SSH security requirement
4Sensitive backup credential filesblocks unauthorized reads
5SSL private key filesprotects certificates

This mode helps protect against local privilege attacks, malware, and accidental exposure.

Compare vs Other Modes

NoModeOwnerGroupOthersUse
1644rw-r--r--normal WP files
2640rw-r-----hardened WP settings
3600rw-------maximum protection

Correct Command Examples

Secure wp-config.php

chmod 600 wp-config.php

Secure environment file

chmod 600 .env

Secure SSH private key

chmod 600 ~/.ssh/id_rsa

Ensure correct ownership

chown wpuser:www-data wp-config.php

The web server often does not need to read wp-config.php directly PHP executes it as the user running the PHP process, so this mode typically works correctly on a VPS.

Practical Recommendations

Most secure baseline for WordPress:

Directories: 755
Files: 644
wp-config.php: 600

Hardened security setup (private VPS)

Directories: 750
Files: 640
wp-config.php: 600

Troubleshooting

NoSymptomCauseFix
1Site fails to loadPHP-FPM runs under different user than file ownerset correct owner/group
2WP CLI cannot access configrunning CLI as wrong userrun as correct user or adjust group perms
3Config cannot be editedexpected behavioredit as owner

If PHP is executed under the web server user instead of site owner, group read (640) may be required instead of 600.

Verification

stat wp-config.php

Expected output:

Access: (0600/-rw-------)

Also check execution user:

ps aux | grep php
id $(whoami)

Hands-On Exercise

  1. Set wp-config.php to strict mode

    chmod 600 wp-config.php

  2. Reload site to test

  3. Run WP CLI as correct user

    wp option get home

  4. Try reading config as another user denied

Key Takeaways

NoStatementStatus
1600 protects secrets from other users
2Required for private keys and sensitive configs
3Ideal for wp-config.php on VPS
4Must pair with correct ownership
5Breaks systems where server user must read file✅ (rare w/ correct VPS setup)

Summary:

Use 600 for critical security files like wp-config.php, SSH keys, and environment secrets.