By Andrew
Ubuntu 14.04 LTS LEMP Stack
I’m keeping my VPS simple with the LEMP stack, and I’m running my sites out of my user directory: /home/user1/domain1.com/public
In order to allow WordPress to upload & edit files, I find I have to assign www-data:www-data to all the website files.
Now I want to add a second user (who is less server savvy than me, but still knows FTP) and their user directory is: /home/user2/domain2.com/public . Again I need to assign www-data:www-data to allow their WordPress site to edit/upload files, however because they also use SFTP, by changing the user they no can no longer upload/edit files through SFTP.
So what would be the best user permissions to set to allow www-data to work, but also let them use SFTP to modify files?
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!
This question gets asked quite a bit in one form or another.
Personally, I like to keep my web folders in /var/www/somewebsite
Then, I use this method:
http://blog.netgusto.com/solving-web-file-permissions-problem-once-and-for-all/
to mount the needed web-folder into different users home folder. Works great, keeps permissions from getting tangly, and keeps everyone in their own home folder.
It is a long read, but quite easy to set up. Took me about 5 ~ 10 minutes to have it all working.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.