Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 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?

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
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
cool, thank you. appreciate – DextrousDave Jul 9 '13 at 12:05
@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 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.