[geeks] FTP daemons?

Greg A. Woods geeks at sunhelp.org
Thu Nov 1 11:59:37 CST 2001


At 03:09 AM 11/1/2001 -0600, Bill Bradford wrote:
> 
> Any good recommendations for FTP daemons?

I would most strongly recommend LukemFTPd:

	ftp://ftp.netbsd.org/pub/NetBSD/misc/lukemftp/

It's basically NetBSD's ftpd with GNU Autoconf portability added on.

> I'm currently using
> ProFTPD, but might be looking at alternatives.  I need to be able
> to chroot() *only certain users* to their home directories, but everyone
> else have "free reign" to change directories, etc.

from ftpd.conf(5):

     Each authenticated user is a member of a class, which is determined by
     ftpusers(5).  class is used to determine which ftpd.conf entries apply to
     the user.  The following special classes exist when parsing entries in
     ftpd.conf:
           all     Matches any class.
           none    Matches no class.

     Each class has a type, which may be one of:

           GUEST   Guests (as per the ``anonymous'' and ``ftp'' logins).  A
                   chroot(2) is performed after login.

           CHROOT  chroot(2)ed users (as per ftpchroot(5)).  A chroot(2) is
                   performed after login.

           REAL    Normal users.

[[....]]

     chroot class [pathformat]
           If pathformat is not given or class is ``none'', use the default
           behaviour (see below).  Otherwise, pathformat is parsed to create a
           directory to create as the root directory with chroot(2) into upon
           login.

           pathformat can contain the following escape strings:
                 Escape  Description
                 %c      Class name.
                 %d      Home directory of user.
                 %u      User name.
                 %%      A ``%'' character.

           The default root directory is:
                 CHROOT  The user's home directory.
                 GUEST   If -a anondir is given, use anondir, otherwise the
                         home directory of the `ftp' user.
                 REAL    By default no chroot(2) is performed.


and from ftpchroot(5):

   /etc/ftpchroot
     The file /etc/ftpchroot is used to determine which users will have their
     session's root directory changed (using chroot(2)), either to the direc-
     tory specified in the ftpd.conf(5) chroot directive (if set), or to the
     home directory of the user.  If the file does not exist, the root direc-
     tory change is not performed.

     The syntax is similar to ftpusers, except that the class argument is ig-
     nored.  If there's a positive match, the session's root directory is
     changed.  No further comparisons are attempted after the first successful
     match.  This syntax is backward-compatible with the old syntax.



there are a _lot_ more very well integrated features too!

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods at acm.org>     <woods at robohack.ca>
Planix, Inc. <woods at planix.com>;   Secrets of the Weird <woods at weird.com>



More information about the geeks mailing list