Wordpress permission problem

August 15, 2014 2k views

Hello guys,
I'm working with ubuntu 14.04 with LEMP and WordPress in it, and now that everything is working (it's my first unmanaged host), I'm having a permission problem with wordpress.

It doesn't let me edit the theme files inside wordpress panel (You need to make this file writable before you can save your changes.), and I think that's only the beginning. I haven't tried plug-ins yet, but I'll probably have problems with that too.

My theme files are using 644 permissions, and the only way to be able to edit them is changing these permissions to 664 (adding group write permissions). This is a problem with the wordpress user in ubuntu? How can I fix this without having to edit permissions everytime(using only 644)? The folders are using 755 permission and the files 644 (wordpress default).

Thank you!

1 Answer

I was able to fix this problem using this:

chown -R www-data:www-data /var/www/html/

This is giving ownership of the whole website directory to "www-data" user, right? The thing is... Is that secure?

Have another answer? Share your knowledge.