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!
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.
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.