twoftpd
Simple secure efficient FTP server
Bruce Guenter <bruce@untroubled.org>
Version 1.43
2015-02-04

This is twoftpd, an FTP server that strives to be secure, simple, and
efficient.  None of the back end commands can cause execution of other
programs, and the normal model of execution does a chroot to the logged
in user's directory immediately after authentication.

The name "twoftpd" comes from the fact that there were two parts to the
server -- an authenticating front end, which contains no file or data
transfer code, and a back end, which contains all the data transfer
code.

A mailing list has been set up to discuss this and other packages.
To subscribe, send an email to:
	bgware-subscribe@lists.untroubled.org
A mailing list archive is available at:
	http://lists.untroubled.org/?list=bgware

Development versions of twoftpd are available at:
	https://github.com/bruceg/twoftpd

Development of this version has been sponsored by FutureQuest, Inc.
ossi@FutureQuest.net  http://www.FutureQuest.net/

Installation:

Check the build settings in the conf-* files and run "make".  As root,
run "make install".

On 32-bit Linux, to allow access to files 2GB and larger, make sure
-D_FILE_OFFSET_BITS=64 is in conf-cc.

Programs:

The package is broken down into two main programs: twoftpd-auth is a
front-end that only accepts USER and PASS (and a few other "built-in")
commands.  Once a user is authenticated, it execs a back end program,
typically twoftpd-xfer.  This program changes to the home directory in
$HOME, optionally does a chroot, and then drops root UID/GID to lock
down all privileges.

twoftpd-anon is a stripped-down version of twoftpd-xfer with all the
filesystem modification commands removed to allow for read-only FTP
access.  It may be used even without twoftpd-auth to provide an
anonymous FTP server.

twoftpd-drop is another reduced back end.  It allows only for uploading
new files.  Downloading, overwriting files, changing permissions,
renaming, etc are all forbidden.  All listings produce an empty result
to make it harder to guess which file names already exist.

Usage:

For a server handling only non-anonymous logins, optionally set CHROOT
and use:

	tcpserver -DHRv 0 ftp \
	/usr/local/bin/twoftpd-auth \
	/usr/local/bin/cvm-unix \
	/usr/local/bin/twoftpd-xfer

For a server handling only anonymous logins, set UID, GID, and HOME to
appropriate values, set CHROOT to 1, and set USER and GROUP to "ftp",
and use:

	tcpserver -DHRv 0 ftp /usr/local/bin/twoftpd-anon

If you want to have both anonymous and non-anonymous logins on the same
server, run both of the above two commands with two seperate IPs
substituted for the "0" parameter.  Because the FTP protocol does not
support name-based virtual hosting, multiple anonymous servers must be
run on separate IPs.

See the man pages for twoftpd-auth and twoftpd-xfer for more details.

Security notes:

Unless you have specific reason not to, always run with CHROOT or
SOFTCHROOT set.

Always run twoftpd (and most other servers) with resources limits in
effect.  For example:

	tcpserver -DRHv 0 ftp softlimit -m 2000000 twoftpd-anon

This will allow the server to consume up to 2MB of memory before being
killed, which should be enough for most OS's, and still prevent memory
overflow attacks.

This program is Copyright(C) 2015 Bruce Guenter, and may be copied
according to the GNU GENERAL PUBLIC LICENSE (GPL) Version 2 or a later
version.  A copy of this license is included with this package.  This
package comes with no warranty of any kind.

Index of twoftpd


NameModification TimeSize

Parent Directory2014-10-07 09:15 -
ANNOUNCEMENT2015-02-04 15:59 4k
ChangeLog2015-02-04 15:59 154k
NEWS2015-02-04 15:59 16k
TODO2015-02-04 15:59 690
archive2015-02-04 16:00 -
fc22015-02-04 16:00 -
rh62015-02-04 16:00 -
rh72015-02-04 16:00 -
twoftpd-1.43.tar.gz2015-02-04 15:59 86k
twoftpd-1.43.tar.gz.sig2015-02-04 15:59 819

Valid XHTML 1.0!