I have a few users under the same group.

However, when they all work on the same folder via winscp, whenever they open a new file, they open it with themselves, as the owner.

Thus, when someone else is trying to save the file, if it's his own fine, but if not, it does save, and gives an error "Upload successful, error occurred while setting the permissions and/or timestamp".

How can I set it in a way, that whoever is in a group (let's call it "web"), save new files and edit them under the web owner? or alternately, be able to change the file permissions as well as the file content?


1 Answer 1


You can assign the sticky bit to the working directory:

chmod g+s ...

That way whenever a file is created, it is assigned to that group. You can then edit the users' umask to allow group members to edit files by default.

  • Yes I already did that. But I want to be able to force it to also change the owner to web, not just the group. Commented Jun 17, 2015 at 9:01
  • The group should be enough for what you have to do (provided groups can write to files) but to fulfil your desire you could make a script using chown -R and associate it with an hourly cron or incron
    – Enos
    Commented Jun 18, 2015 at 16:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .