Question

Questions installing WP on LEMP

I’m almost to finish the WP installation on my brand new LEMP server, but I’m stacked on this step. I will copy what the tutorial says:

<^>The group that nginx operates under is www-data. For the user portion, enter your user account name. We will demonstrate with an account called demo here:

sudo chown -R demo:www-data /var/www/html/*
```<^>

Then by user (demo on the example) I don't know which user I should put. Is the user that I'm using on the SSH? 

Thanks.

Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Thanks it finally works with that command. But for newbies, I think that tutorial should be edited, since if you follow the exact steps, you can’t grant full permissions to the user to upload.

If you are logging in via ssh as root or have not set up an additional user you can use the following command:

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

This will set the ownership to the user and group that nginx runs as and you should not encounter any permission problems. You may need to run this again if you upload any files using SFTP since they would be owned by root upon upload.