I am running Worpdress on an CentOS Webserver.

Now, to enable wordpress to be able to upload/write files to the default webserver directory


I had to do the following change on the server as root user:

[user@host ~]$ chown apache /path/to/upload/dir
[user@host ~]$ chmod 755 /path/to/upload/dir

What security implications does this have?

I know I can move all my files to say the /home/ directory and point Apache to it, but it is too much effort...

Can I keep it like this or it it unsafe to do so?


This is fine. I had to do the same on my setup as well so that files could be uploaded.

The biggest risk is that if there is a vulnerability in Wordpress, then this is a directory that a would be attacker could put payloads. But arguably they've already gained access to your Wordpress installation so you're already in trouble.

Part of the price of maintaining a Wordpress installation is that you have to keep up with the updates.

  • OK cool, thank you. that makes sense. I have one more problem however - I cannot edit any files in wordpress - say i want to edit the style.css, it says: You need to make this file writable before you can save your changes. See the Codex for more information – DextrousDave Jul 9 '13 at 6:53
  • @DextrousDave - yes you'll need to make those files writable as well for the user that the web server is running as - wordpress.org/support/topic/… – slm Jul 9 '13 at 6:57
  • @DextrousDave - not sure if you should've started this question: unix.stackexchange.com/questions/82309/…, they're too related/similar. Bottom line is you're having a permissions problem. – slm Jul 9 '13 at 9:50
  • @DextrousDave - if this answers your question please mark it as accepted if it resolved your question so that others know that it's been resolved. – slm Jul 9 '13 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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