Is it safe to have Apache as owner of /www/html? (wp)
I'm on centos 6.3 with the latest wordpress.
I ended up doing
chown apache:apache /var/www/html/.htaccess (so it can insert the code for mod_rewrite)
and
chown apache:apache /var/www/html/wp-content/ -R (so it can upload content, pretty useful feature on a CMS
All the other permissions are set to what they were prior, ie chmod 755 /var/www/html/
Question: is this 'bad' or 'insecure' and if so why.
I can't for the love of everything that's good figure out a way to make wordpress behave without the above.
Thank you.
3 Replies
Is it secure? It depends on your CMS. If you're running the latest version of Wordpress then you're probably OK… until the next Wordpress exploit is discovered. If you're not, then a malicious person could use a known exploit to upload their content to your server, or do something else perhaps worse.
Kepp your Wordpress up-to-date.
the other way was to have all the wordpress files writeable by apache, but this isn't desirable, so use sftp.