1

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?

3

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. – Jacob Cohen Jun 17 '15 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 D'Andrea Jun 18 '15 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.