Report this

What is the reason for this report?

Questions installing WP on LEMP

Posted on April 3, 2015

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.


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!

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.

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.

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.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.