Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I changed the owner/group of the wp-config.php file to www-data (Apache's user).

I changed the file permission to 0500.

Is that more secure than leaving my normal user as the owner and file permission of 0755?

share|improve this question
up vote 0 down vote accepted

"More secure" is relative - making apache the owner opens the file for potential remote access more so than if it were owned by your user. After all, I assume there's no process listening on an open socket running with your user credentials?

Pedantry aside, the file permissions themselves could preferably be 0400, as apache/mod_php only needs to read and not execute the file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.