I created a fresh LAMP stack droplet. Now I have to provide my co-worker with access to server web directory (/var/www/) via SFTP. How could it be done right way?
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!
You can simply add a new linux user for him and grant him access to write to /var/www. <br> <br><ul><li>Create a linux user for him: <a href=“https://www.digitalocean.com/community/articles/how-to-add-and-delete-users-on-ubuntu-12-04-and-centos-6”>https://www.digitalocean.com/community/articles/how-to-add-and-delete-users-on-ubuntu-12-04-and-centos-6</a></li> <br><li>Grant him access to write to /var/www. You can do that by adding a new group called e.g. “developers”, adding both your users to it, setting all of the files in /var/www to be owned by the developers groups, and granting it write access:<pre>#create group: <br>groupadd developers <br>#add your users to it <br>usermod -a -G developers username1 <br>usermod -a -G developers username2 <br>#chgrp /var/www to devvelopers <br>chgrp -R developers /var/www <br>#grant its users write access <br>chown -R g+w /var/www</pre></li> <br></ul> <br> <br>Hope that helps!
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.