Subject: Re: [netatalk-admins] the big step...

From: Rick Zeman <[email-masked]>
Date: Sun, 21 Mar 1999 08:53:23 -0500

On 3/21/99 9:17 AM, Eddie Irvine <[email-masked]> said:

>Hi, Rick.
>
>I think you need to look at setting the "sticky bit" on any
>"global" directory - that is, any directory that is mounted
>by everyone - I assume you mean a directory called "/mac".
>man chmod.

Correct.  I actually just added another filesystem with /mac being the 
mountpoint with perms of 667. man chmod doesn't mention anything about a 
sticky bit.  I do see on my home Network Trash Folder perms of 
drwx--Srwx.  I don't grok the capital S--nor do I see any mention of THAT 
in man.  Could that be the elusive sticky bit?
 
>But, if users are just mounting their "home" directory,
>(and every user has their own user name and 
>home directory - the usual unix way of doing things,)
>unless I've missed something over the last three years
>what you want is really the default.'

Sorry for the confusion.  Home directory mounting, perms, and trash work 
perfectly.

I just haven't managed to comprehend unix perms yet; they're too alien 
from what I know (Netware).

---

From: Palle Girgensohn <[email-masked]>
Date: Sun, 21 Mar 1999 15:44:13 +0100

Rick Zeman wrote:
> sticky bit. 

Aren't you running Unix? Sorry, but what dialect of Un*x does not
mention sticky bits in chmod(1)? Sounds funny... try chmod(2), perhaps?
Here's excerpts from one of my chmod(1)s:

     1000    (the sticky bit) When set on a directory, unprivileged
             users can delete and rename only those files in the direc-
             tory that are owned by them, regardless of the permissions
             on the directory.  Under FreeBSD, the sticky bit is ignored
             for executable files and may only be set for directories
             (see sticky(8)).

and sticky(8):

NAME
     sticky - sticky text and append-only directories

DESCRIPTION
     A special file mode, called the sticky bit (mode S_ISVTX), is used
to in-
     dicate special treatment for directories. It is ignored for regular
     files.  See chmod(2) or the file /usr/include/sys/stat.h for an
explana-
     tion of file modes.

STICKY DIRECTORIES
     A directory whose `sticky bit' is set becomes an append-only
directory,
     or, more accurately, a directory in which the deletion of files is
re-
     stricted.  A file in a sticky directory may only be removed or
renamed by
     a user if the user has write permission for the directory and the
user is
     the owner of the file, the owner of the directory, or the
super-user.
     This feature is usefully applied to directories such as /tmp which
must
     be publicly writable but should deny users the license to
arbitrarily
     delete or rename each others' files.

     Any user may create a sticky directory.  See chmod(1) for details
about
     modifying file modes.

-

I use sticky bits a lot to share stuff between a group of users.
Usually, i use the sticky group bit ( chmod g+s ) and add all users to
that unix group, and somehow force an umask of 002. The umask stuff
cannot be modified with netatalk, but it seems to use 002 by default, so
that's OK. It would be great to have a config for this in netatalk,
though... I use it with samba on the same volume.

/Palle