How can I make sure that newly created files in a shared directory are owned by a specific group?
Updated -
In order to do this, you can set the shared directory's gid
bit. The following commands should make any newly created files in the shared directory, /data/shared
, owned by the group admins
:
chgrp -R admins /data/shared
chmod 2775 /data/shared
Below is a sample session that illustrates the effect of setting the gid bit of a d...
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.