Subject: [netatalk-admins] netatalk-1.4b2+asun2.0a17.2

From: Gustav Kristoffer Ek <[email-masked]>
Date: Thu, 06 Nov 1997 19:06:36 +0100

I am running linux 2.0.30 on a i586 and netatalk-14b2 + the afp/tcp
patches to 1.4b2.

When I try to make the netatalk-1.4b2+asun2.0a17.2.tar.gz got from
ftp://ftp.u.washington.edu/public/asun/ installed in
/usr/src/netatalk-1.4b2+asun2.0a17.2/ it compiles fine until the
following:

make -w CC="gcc " ADDLIBS="" DEFS="" \
    OPTOPTS="-O5 -fomit-frame-pointer -fsigned-char -Wunused
-Wuninitialized" DESTDIR="/usr/local/atalk" DESDIR="/usr/l\
    SBINDIR="/usr/local/atalk/etc" BINDIR="/usr/local/atalk/bin"
RESDIR="/usr/local/atalk/etc" \
    ETCDIR="/usr/local/atalk/etc" LIBDIR="/usr/local/atalk/lib"
INCDIR="/usr/local/atalk/include" \
    PAMDIR="/usr" TCPWRAPDIR="/usr" \
    KRBLIBS="${KRBLIBS}" KRBLIBDIRS="${KRBLIBDIRS}" \
    KRBINCPATH="${KRBINCPATH}" KRBDEFS="${KRBDEFS}" \
    AFSLIBS="${AFSLIBS}" AFSLIBDIRS="${AFSLIBDIRS}" \
    DESLIBS="${DESLIBS}" DESLIBDIRS="${DESLIBDIRS}" \
    PAMLIBS="${PAMLIBS}" PAMLIBDIRS="${PAMLIBDIRS}" \
    TCPWRAPLIBS="${TCPWRAPLIBS}" TCPWRAPLIBDIRS="${TCPWRAPLIBDIRS}" \
    DESINCPATH="${DESINCPATH}" DESDEFS="${DESDEFS}" \
    PAMINCPATH="${PAMINCPATH}" PAMDEFS="${PAMDEFS}" \
    AFSINCPATH="${AFSINCPATH}" AFSDEFS="${AFSDEFS}" \
    afpd
make[4]: Entering directory
`/usr/src/netatalk-1.4b2+asun2.0a17.2/etc/afpd'
gcc     -DUAM_RNDNUM -O5 -fomit-frame-pointer -fsigned-char -Wunused
-Wuninitialized -I../../include   -I/usr/local/inco
unix.c:58: sys/quota.h: No such file or directory
make[4]: *** [unix.o] Error 1
make[4]: Leaving directory
`/usr/src/netatalk-1.4b2+asun2.0a17.2/etc/afpd'
make[3]: *** [all] Error 2
make[3]: Leaving directory
`/usr/src/netatalk-1.4b2+asun2.0a17.2/etc/afpd'
make[2]: *** [afpd] Error 2
make[2]: Leaving directory `/usr/src/netatalk-1.4b2+asun2.0a17.2/etc'
make[1]: *** [../../etc] Error 2
make[1]: Leaving directory
`/usr/src/netatalk-1.4b2+asun2.0a17.2/sys/linux'
make: *** [all] Error 2

I have not modified any Makefiles when I copy
/usr/src/linux-2.0.30/include/linux/quota.h to /usr/include/sys/quota.h
it seams to go a little better:

make -w CC="gcc " ADDLIBS="" DEFS="" \
    OPTOPTS="-O5 -fomit-frame-pointer -fsigned-char -Wunused
-Wuninitialized" DESTDIR="/usr/local/atalk" DESDIR="/usr/l\
    SBINDIR="/usr/local/atalk/etc" BINDIR="/usr/local/atalk/bin"
RESDIR="/usr/local/atalk/etc" \
    ETCDIR="/usr/local/atalk/etc" LIBDIR="/usr/local/atalk/lib"
INCDIR="/usr/local/atalk/include" \
    PAMDIR="/usr" TCPWRAPDIR="/usr" \
    KRBLIBS="${KRBLIBS}" KRBLIBDIRS="${KRBLIBDIRS}" \
    KRBINCPATH="${KRBINCPATH}" KRBDEFS="${KRBDEFS}" \
    AFSLIBS="${AFSLIBS}" AFSLIBDIRS="${AFSLIBDIRS}" \
    DESLIBS="${DESLIBS}" DESLIBDIRS="${DESLIBDIRS}" \
    PAMLIBS="${PAMLIBS}" PAMLIBDIRS="${PAMLIBDIRS}" \
    TCPWRAPLIBS="${TCPWRAPLIBS}" TCPWRAPLIBDIRS="${TCPWRAPLIBDIRS}" \
    DESINCPATH="${DESINCPATH}" DESDEFS="${DESDEFS}" \
    PAMINCPATH="${PAMINCPATH}" PAMDEFS="${PAMDEFS}" \
    AFSINCPATH="${AFSINCPATH}" AFSDEFS="${AFSDEFS}" \
    afpd
make[4]: Entering directory
`/usr/src/netatalk-1.4b2+asun2.0a17.2/etc/afpd'
gcc     -DUAM_RNDNUM -O5 -fomit-frame-pointer -fsigned-char -Wunused
-Wuninitialized -I../../include   -I/usr/local/inco
gcc     -DUAM_RNDNUM -O5 -fomit-frame-pointer -fsigned-char -Wunused
-Wuninitialized -I../../include   -I/usr/local/inco
gcc     -DUAM_RNDNUM -O5 -fomit-frame-pointer -fsigned-char -Wunused
-Wuninitialized -I../../include   -I/usr/local/inco
gcc     -DUAM_RNDNUM -O5 -fomit-frame-pointer -fsigned-char -Wunused
-Wuninitialized -I../../include   -I/usr/local/inco
send_to_kdc.c:17: warning: `rcsid_send_to_kdc_c' defined but not used
gcc     -DUAM_RNDNUM -O5 -fomit-frame-pointer -fsigned-char -Wunused
-Wuninitialized -I../../include   -I/usr/local/inco
gcc     -DUAM_RNDNUM -O5 -fomit-frame-pointer -fsigned-char -Wunused
-Wuninitialized -I../../include   -I/usr/local/inco
gcc     -DUAM_RNDNUM -O5 -fomit-frame-pointer -fsigned-char -Wunused
-Wuninitialized -I../../include   -I/usr/local/inco
gcc     -DUAM_RNDNUM -O5 -fomit-frame-pointer -fsigned-char -Wunused
-Wuninitialized -I../../include   -I/usr/local/inco
gcc     -DUAM_RNDNUM -O5 -fomit-frame-pointer -fsigned-char -Wunused
-Wuninitialized -I../../include   -I/usr/local/inco
auth.c:120: des.h: No such file or directory
make[4]: *** [auth.o] Error 1
make[4]: Leaving directory
`/usr/src/netatalk-1.4b2+asun2.0a17.2/etc/afpd'
make[3]: *** [all] Error 2
make[3]: Leaving directory
`/usr/src/netatalk-1.4b2+asun2.0a17.2/etc/afpd'
make[2]: *** [afpd] Error 2
make[2]: Leaving directory `/usr/src/netatalk-1.4b2+asun2.0a17.2/etc'
make[1]: *** [../../etc] Error 2
make[1]: Leaving directory
`/usr/src/netatalk-1.4b2+asun2.0a17.2/sys/linux'
make: *** [all] Error 2

but at this point I'am lost, do any og you know a solution?

- gustav

---------------------------------------------------------------------
Gustav Kristoffer Ek - Netcetera - Finsensvej 80 - 2000 Frederiksberg
tlf 38 88 32 22 / 20 40 00 05 / 38 88 20 38 ext 341 - Fax 38 88 30 38
Webdesign, Webhotel, Mailhotel, UUCP og mere http://www.netcetera.dk/

---

From: Jeff Wiegley <[email-masked]>
Date: Thu, 06 Nov 1997 11:17:03 -0800

Since netatalk was designed to *share* files between
multiple users it seems pretty silly to me that there
is no way to modify what file permissions are set on
files and directories when netatalk creates them.

A for instance:

I want *all* my directories to have a chmod of 2770.
This way any files a user creates inherits the group
that the directory belongs to and thus any members of
that group can access the files in this directory.

and files which are created should get a mode of at
least 0660.

all well and good for files, which seem to work correctly,
except if netatalk creates a subdirectory
then the subdirectory inherits the proper user.group from the
parent directory but it gets a mode of just 0770 efectively
loosing the 's' bits. Now if the user creates files in the
subdirectory they don't inherit any useful permissions and
other users cannot access these files.

There is no way a mac user can change the permissions of
the files/directories so I have to keep doing it manually
on the netatalk server which is a pain. At least I can't find
it.

How do I modify netatalk (afpd I guess in particular) to
change the default modes it gives to new files and directories?
I want all directories to have at least 2770 and all files to
have at least 0660.

samba had nice configuration parameters "force create mode"
and "force directory mode" to fix this for the samba users but
my netatalk users are still screwing up the permissions.

I'm sure somebody else has had this same problem. How did you
fix it?

- Jeff Wiegley

---

From: Andrew McNabb <[email-masked]>
Date: Thu, 6 Nov 1997 17:32:38 -0600 (CST)

I thought that you could modify permissions from File:Sharing on the mac.

---------------------------
--     Andrew McNabb     --
--   [email-masked]    --
---------------------------

---

From: Jeff Wiegley <[email-masked]>
Date: Thu, 06 Nov 1997 17:09:29 -0800

> I thought that you could modify permissions from File:Sharing on the mac.

I know very little about macs but I *highly* doubt you can change the
suid/guid
bits of a directory. (and I'm right since I checked)

and I certainly don't want to force my users to have to change
permissions all
the time on something that should be done automagically for them in
shared
directories.

I'm currently working on modifying the source code directly to create
directories
(in etc/afpd/directory.c) to create them with a mode of 06777. But it's
not going
well at all. the initial mkdir() calls does the job correctly but
something later
which I can't find resets the permission bits. grrr....

On further inspection this is why netatalk's file permissions suck...

Macs can't specify/change any of the following permission bits:

#define S_ISUID  0004000    /* set user id bit  */
#define S_ISGID  0002000    /* set group is bit */
#define S_ISVTX  0001000    /* sticky bit       */
#define S_IXUSR  0000100    /* owner executable bit */
#define S_IXGRP  0000010    /* group executable bit */
#define S_IXOTH  0000001    /* other executable bit */

The proper thing that netatalk *should* be doing is setting the bits
that
a Mac filesystem *can* specify and allow the remaing, unspecifiable bits
(as described above) to be inherited from the parent directory and users
umask.

But alas this isn't the way its done and as a result I have to either
1) tell people to set *world* read/write permissions on everything they
   create.  group is not sufficient because by default files don't
   inherit the group of the parent directory because netatalk dropped
the
   sgid bit when it was created and users can't bring it back. or they
   can go around changing the group on everything they create of course
   by either way its a waste of the employees time and patience.
2) sit here all day long doing nothing but periodically turning sgid
bits
   on for the directories they create. Or,
3) run a cron job every few minutes to go through nearly 12gigabytes of
   filesystem to automatically do 2) for me. Good thing we have a hyper
fast
   server.
 
I can't believe the other users of netatalk have put up with this broken
behavior without fixing it.

I'm trying my damn hardest to implement a fix to provide the inheritance
of
the nonspecifiable bits but I know nothing about the AFP protocol and
even
less about the layout and workings of netatalk since it has such sparse
code documentation.

- Jeff