After creating a LEMP on Ubuntu droplet, I added two users to the sudo group, to give my colleague (hisname) and I (myname) admin rights on the droplet. After this, I changed the ownership of the /etc/shared/nginx/html folder to myname:sudo and set the permissions to 775.
sudo chown -R myname:sudo /etc/shared/nginx/html
sudo chmod -R 775 /etc/shared/nginx/html
The idea behind this is that multiple people should be able to change the production website. So, as long as they were part of the sudo group, they would be able to change the website.
However, when my colleague connects to the droplet with sFTP (client: Transmit), and adds the appropriate website files, all ownership and permissions are changed to hisname:hisname. This means that I can’t alter any of those files.
We’re not sure whether this is something that is configured in the sFTP client, or on the droplet itself. Does anyone know how I can make sure that files changed/added by the sFTP client are set to user:sudo with 775?
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!
Accepted Answer
This comment has been deleted
I solved it by using an ACL (Access Control List) as described in the top-voted answer in this unix.stackexchange.com answer:
http://unix.stackexchange.com/a/12847/82382
I used this answer to avoid having to alter the umask for every new user that I created.
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.