John Oliver wrote:
> Is there a way to have all directories created in a given group given
> certain permissions and group ownership?  Users' umasks are, of course,
> 022, and that's fine... but I'd like that umask to become an effective
> 002 in one particular directory, so that any directories created in that
> group will automatically be writable by all group members.
> 
> This seems like a really obvious thing, and lots of questions are asked
> about it, but all of the responses veer off on wild tangents.
> 

I often use the bsd-inspired magic of making the dir su for the group
  chgrp sharegroup somedir
  chmod g+rwxs somedir
if the dir already exists, you want to do
  find somedir -type d -print0 | xargs -n0 chgrp sharegroup
  find somedir -type d -print0 | xargs -n0 chmod g+rwxs

Don' know offhand the best reference to the su-bit on group, but in
brief, it forces files & dirs to be group-owned by the specified group,
and propagates the group-perms to new dirs.

Hope I've got that right. (commands from memory -- be sure to test)

Regards,
..jim


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to