Subject: [netatalk-admins] setting umask

From: Ulf Mehlig <[email-masked]>
Date: Wed, 15 Dec 1999 23:09:41 +0100

Hello netatalk specialists, I hope this is not a FAQ that I
overlooked: 

We have a linux 2.2.12 machine with netatalk-1.4b2+asun2.1.3 serving a
number of Macintosh clients. We also run Samba (2.06), and in Samba,
there is a very nice feature letting you set the umask for file- and
directory creation for every SMB share.  E.g., I can specify that
(Unix-) group "XY" is the only group that can access share "A", and
that the file creation mask is 0660 for files in "A", and 0770 for
directories, respectively. Also, there is a feature called "force
group" which forces a user who is member of more than one group to
create his or her files explicitly as "user.XY".

Is there a possibility to achieve the same behaviour with netatalk
volumes? I already know that I can grant access to a special group
with the "access" parameter in "AppleVolumes.default".  BTW, I have
observed that folders created via netatalk usually have setuid bits
set -- why? 

Many thanks for your attention,
Ulf

P.S.: Please CC: me or send post directly to my address, I'm not on
      the list at the moment! Thanks!

-- 
======================================================================
Ulf Mehlig    <[email-masked]>
              Center for Tropical Marine Ecology/ZMT, Bremen, Germany
----------------------------------------------------------------------

---

From: "P T Withington" <[email-masked]>
Date: Thu, 16 Dec 1999 13:01:00 -0500

[Question on ow to do the equivalent of Samba "force group" for netatalk]

Isn't this built in to Linux as "sticky groups"?  It seems to work for me.

---

Sticky groups:  if a directory has the setgid bit on, then all files and folders created in it will be given the group of the directory (provided the creator is in that group).

So to create a share foo that can be shared by the XY group:

chgroup -R XY foo
chmod -R g+s foo

make the default umask 002.  Give each login a private group as their default group, thus even with an 002 umask they will not share their private files, but any files they create below foo will be shared with group XY.