Is there any way to make sure that any file created in a specific folder has a certain group as owner?

I know that you can set a directory up so specific groups have access to it, but is there any way to set it up so that any new files created in it automatically have a specific group as the group owner, regardless of who they are created by?


Solution 1:

Add the setgid bit.

chmod g+s /path/to/directory

See http://mywiki.wooledge.org/Permissions