Subject: [netatalk-admins] My Trash Can problem work-around

From: Neil McAllister <[email-masked]>
Date: Thu, 24 Sep 1998 10:10:05 -0700

Basically, the problems with the Trash Can mentioned on this list (only one
user "owns" the Trash, etc.) have to do with AFP permissions not being
correctly/fully translated into Unix permissions, in the Trash Can.

My work-around for this involves changing the permissions that get assigned
to directories created by netatalk.  NOTE:  The side effect of this is that
every new directory on the server will henceforth always be created with
group write permission on.  If you have a problem with this (e.g. it
defeats your security model) then you probably don't want to do this.  For
me, it's worked fine so far.

This fix assumes that all the Mac users who will be connecting to the
netatalk server belong to at least one group -- in this case the group is
called "macuser".  It also assumes you have one "administrator account", in
this case called "macadmin".

The work-around is as follows.  In the file etc/afpd/unix.c, change line 25
from

#define DIRBITS S_ISGID

to

#define DIRBITS S_ISGID | S_IWGRP

Then go to your netatalk shared directory. Do the following:

rm -rf Network\ Trash\ Folder
mkdir Network\ Trash\ Folder
chown macadmin:macuser Network\ Trash\ Folder
chmod 2777 Network\ Trash\ Folder

Having done this, the Trash Can Usage Map and all the sub-Trash Folders
will get created and deleted properly, i.e. all your users will be able to
make use of the networked Trash as a Mac user expects to.  But remember --
this is a hack, and it may produce directory permissions that are not what
you expect/want on directories *other than the Trash*.

--
Neil McAllister, Systems Administrator
Primo Angeli Inc., San Francisco, CA, USA
http://www.primo.com  mailto:[email-masked]