Yea, the setuid/setgid bits are probably one of the more confusing
aspects of a UNIX filesystem permissions. Basically you need to make
the directory setgid, and set the group of the directory to whatever
you want the files in it to be created as.

# cd /tmp
# mkdir test
# chgrp audio test
# chmod g+ws test

joeuser$ touch /tmp/test/testfile
joeuser$ ll /tmp/test/testfile
total 0
-rw-r--r--    1 cfandre  audio           0 Feb  7 04:57 testfile

Hmmm, maybe this would be a good topic at the next "newbie" meeting.
;-)


On Tue, 29 Jan 2002, Tim Wilson wrote:

> Hey everyone,
> 
> Here's a very common sysadmin task that I want to make sure I do exactly
> right. My wife is home fulltime for the time being taking care of our
> new baby. While she's home she's got to use "my" computer. That makes
> her a Linux and KDE user by default. :-) I've got StarOffice all set up
> and she's having no trouble.
> 
> I want to create a shared folder for "household" documents. Things that
> should be commonly owned by both of us. I've created a 'family' group
> and added the right user to the group, but I'm not sure how to set up
> the permission on the shared directory so that any files added will
> automatically have group ownership set to 'family'. <confession
> type="bold">I never really have understood all the stuff about sticky
> bits very well.</confession>
> 
> I figure that I'll just leave the new family folder in my account and
> symlink to it from her /home.
> 
> Any suggestions or hints?
> 
> -Tim
> 
> --
> Tim Wilson      |   Visit Sibley online:   | Check out:
> Henry Sibley HS |  http://www.isd197.org   | http://www.zope.com
> W. St. Paul, MN |                          | http://slashdot.org
> wilson at visi.com |  <dtml-var pithy_quote>  | http://linux.com
> 
> _______________________________________________
> Twin Cities Linux Users Group Mailing List - Minneapolis/St. Paul, Minnesota
> http://www.mn-linux.org
> tclug-list at mn-linux.org
> https://mailman.mn-linux.org/mailman/listinfo/tclug-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://shadowknight.real-time.com/pipermail/tclug-list/attachments/20020207/c3bb4825/attachment.pgp