Question

Wordpress installation problem, no permissions to write (Ubuntu / NGINX).

Here’s my setup:

  • Fresh Ubuntu 14.04 64x installation.
  • Fresh NGINX / MYSQL / PHP5-FPM / PHPMYADMIN installation.
  • Installed POSTFIX and VSFTPD.
  • umask has been changed to 002.
  • the owner/group of the wordpress directory is myusername:myusername.
  • myusername is also in the www-data group.
  • All directories inside of wordpress are 775 with files being 664.

Regardless of the above, wordpress still cannot write config. This is a more underlining permisssion issue apparently, but I can’t figure out why. My solution are to chown -R the wordpress folder www-data:www-data and just go from there, however for security and work flow reasons that’s highly undesirable.

php is also running on www-data, and when I change the unix name/group to my username, any and all files can also write, but from what I read this is also highly undesirable.

I’d like a solution that doesn’t require me to do either of those. Any help would be appreciated.

Subscribe
Share

This was super useful, however say I wanted to keep files 644 and folders 755, would this mess with bindfs?

This comment has been deleted

I have had a lot of success using this method:

http://blog.netgusto.com/solving-web-file-permissions-problem-once-and-for-all/

I use the method he describes to mount the /var/www folder in my user home folder as www. That way I have access to it, and anything I create gets the proper permissions for www-data, while still giving my user access.

Took me all of 5 minutes to set up, and has been working for me for the last few weeks with no problem.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This question was answered by @sierracircle:

I have had a lot of success using this method:

http://blog.netgusto.com/solving-web-file-permissions-problem-once-and-for-all/

I use the method he describes to mount the /var/www folder in my user home folder as www. That way I have access to it, and anything I create gets the proper permissions for www-data, while still giving my user access.

Took me all of 5 minutes to set up, and has been working for me for the last few weeks with no problem.

View the original comment