Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have set a directory's SGID and every file created in this directory get the directory's group instead of the users one. That works perfect. But i want to do the same when a user edits the file. Right now when a user edits and saves the file, the file takes user's group instead.

Shouldn't SGID take care of this as well?

share|improve this question

1 Answer 1

SGID should take care of this. As far as file is created within directory with SGID it inherits its group. The same for files being copied to dir.

Maybe, this could be caused by the way editor updates file after being saved - for example, if it maintains temporary edit buffer elsewhere, then saves it and then moves it to directory (although it seems weird). In such case, files being moved to dir with sgid keep their original group.

share|improve this answer
    
the change in this file happens through sftp..maybe this has something to do with it?or i might have screw up sth else..it supposed to work:/ –  rootatwc Mar 24 '12 at 22:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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