Report this

What is the reason for this report?

Adding files with sFTP to /etc/shared/nginx/html changes group to myname:myname

Posted on August 28, 2014

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.

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.

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.