How to configure VPS so that it is not nessacery to have 777 permissions on public_html for wordpress installation?

  • Posted December 17, 2013

I am doing an installation of Wordpress on my VPS. During isntallation I had to set public_hml permissions to 777. Of course, I changed it back after installation, but how can I prevent this on the next installation?

I am intending to install multiple wordpress sites soon, and want the installation to be as smooth as possible. And of course, I am just curious how this works. My folder and files all have owner of my server, and since 750 on public_html gives enough permission for a owner to install wordpress I am curious how it is possible that I have unsufficient permissions.



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.

Hi, Thanks! Very usefull article, added to favorites. <br> <br>For now, I fixed it by setting owner of all wordpress files to www-data.

Apologies for all these comments, but I found out that on Ubuntu it has to be www-data instead of apache. I have run that command, and restarted apache, but still my I have not sufficient rights to do almost anything. For example, I cannot install plugins and upload files unless I set permissions to 777

Ok, I tried doing this, but user group apache does not exist is what I get…

I have digged in existing questions on this matter, and found this (possible) solutions: <br>sudo usermod -a -G apache username
<br> <br>Is that what I need to do, or has that nothing to do with this? <br>