Subject: Re: Thanks so far and here is one more question

From: [email-masked]
Date: Thu, 23 Feb 1995 18:43:06 -0700 (MST)

Jonathan Zamick writes:

>Thank you for the help. Moving ftp.h into /usr/include/arpa was exactly
>the fix needed.

As an alternative, modification of ftpd.c to include "../support/ftp.h"
rather than <arpa/ftp.h> will also work, and avoids tweaking the
vendor's include files.

>I've set up the ftp directories and files as the documentation explains,
>and everything is moving smoothly except one thing.
>
>Anonymous connects are refused using both 'anonymous' and 'ftp'.
>
>In the ~ftp/etc/passwd file, there is a user ftp defined. ftp is group
>nobody, has no password, has its home directory set to the root of ~ftp,
>and has /bin/false set as its shell (which is one of the shells listed
>in /etc/shell.) I used bin/false since of course this isn't to be a shell
>account.

An entry in the real password file (/etc/passwd) for the user ftp is
needed.  The ~ftp/etc/passwd file is only used by programs (eg. ls) that run
after the chroot/chdir calls are preformed for the anonymous user (ftp).
We have, in both files:

ftp:x:123:123:Anonymous ftp account:/usr/ftp:/bin/true

You may also need a shadow password entry in /etc/shadow; ours is:

ftp:NP:::::::

Of course you may recall that our site is busted for anonymous, so you
may want to take all this with a grain of salt.   8^)

The both group files need entries too.  Our /etc/group:

ftponly::123:
 
and ~ftp/etc/group:

ftp::123:

I know this is inconsistent, and I will change it "pretty soon now";
but it is interesting that ftp's ls shows the ftponly gid on long
listings.  I suspect this is due to running YP (aka NIS).  (Makes me
wonder if either of ~ftp/etc/{passwd,group} are really needed.)

--
Mark Walker               UNM/EECE, 7-3688, [email-masked]

      "Trust me, I know what I'm doing."     -- Sledge Hammer

---

From: Jonathan Zamick <[email-masked]>
Date: Thu, 23 Feb 1995 13:59:57 -0800

The response given at the input of anonymous of ftp for username is:

530 Uesr anonymous access denied.

That is about the whole of it. Hopefully there is just something small I
missed. (I'm thinking it might be something in the ftpaccess file, but if
so, I haven't found it. I used the ftpaccess.heavy example as a basis for
what my final ftpaccess file.)

Thank you again for your good advice so far :)
Jonathan