SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

Welcome to FTP4ALL (Homepage: www.ftp4all.de)


TABLE OF CONTENTS

I What is FTP4ALL ?
II Installation and startup
III First steps

I What is FTP4ALL ?

FTP4ALL is a free, open source FTP server implementation for the UNIX platform. The current development platform is Linux, there is no version for other OSes, like Windows, and there is no version planned for it.

FTP4ALL was designed to require no superuser privileges. The advantages are that FTP4ALL cannot be exploited to gain root access on a machine. And second, any user on a UNIX box can run this server.

However, FTP4ALL is not designed to replace wu-ftpd or any other system-level FTP server, for it does not use the default user database (/etc/passwd or NIS or whatever), or the UNIX file and directory permissions. Instead, FTP4ALL sets up its own user and group database and file and directory permission system.

Those and other features like user upload and download ratios, IP checks, bandwidth limit, transfer statistics make FTP4ALL a good choice for running a private, specialised FTP site.
There is no binary distribution, the only one is the source distribution. So you must have a C compiler (gcc preferred) and related tools to compile FTP4ALL.

FTP4ALL was developed since Summer 1996 as a free-time project by Christoph Schwarz (aka Crescent). Starting from scratch, the reason for this project was to both interest in UNIX and the Internet, and to learn TCP/IP and system programming under UNIX.

II Installation and startup

This chapter describes how to compile, install and run FTP4ALL for the first time.

First, unpack the source with the command: > gzip -cd ftpd-3.010.tar.gz | tar -xf -

Then, change to the directory:
> cd ftpd-3.010

And configure the source for your system: > ./configure

If the configure script fails with some ERROR message complaining about 32 or 64 bit things, then FTP4ALL will not work on your system. Go back to version 2.x, or try another daemon.
When it asks for DES support, answer no. Then compile with: > make

List the directory bin to see if everything went ok: > ls -l bin

You should get three files like this:

  -rwx------   1 cs       users       41327 Aug  4 18:01 ftpa
  -rwx------   1 cs       users      348529 Aug  4 18:02 ftpd
  -rwx------   1 cs       users      263950 Aug  4 18:04 ftps

If not, something went wrong. You may want to try to fix the problem yourself, or mail us the output of the configure and make commands and maybe we can help (support not guranteed).
If everything went ok, copy the standard directory tree to a directory of your choice, e.g:
> cp -R standard /home/foo/my_site

Copy the binaries into sbin:
> cp bin/* /home/foo/my_site/sbin

Edit the registry file:
> vi /home/foo/my_site/etc/ftpd.reg

Change the following three options as you like: adminport 2002
basedir /site
port 2000

adminport is the TCP port for connecting with the admin GUI, port is the TCP port for the FTP service. basedir is the base directory of your site. Now run the server with the command:
> /home/foo/my_site/sbin/ftpd

If should display something like:
FTP4ALL 3.010, Copyright (C) 1996-1999 by Crescent (crescent@ftp4all.de) This program is FREE SOFTWARE and distributed under GNU PUBLIC LICENSE Server on host supernova is ready and listening on ANY_IP_ADDRESS:2000 Base directory : /site
Readme file : (none)
Permission file: .permissions
Errlog file : log/ftpd.err
Log file : log/ftpd.log
Log program : (none)
Server program : /home/foo/my_site/sbin/ftps

If you got this message everything is ok. But if you got a message like: FTP4ALL 3.010, Copyright (C) 1996-1999 by Crescent (crescent@ftp4all.de) This program is FREE SOFTWARE and distributed under GNU PUBLIC LICENSE ftpd[1166] ERROR: Startup of server failed. See error log for details.

then something went wrong. Take a look at the error log file: > cat /home/foo/my_site/log/ftpd.err

Three of the most common error messages are: Wed 04/08/99 20:13:28 [1165] bind(0.0.0.0:300): Permission denied (13) or
Wed 04/08/99 20:18:29 [1191] bind(0.0.0.0:6000): Address already in use (98) or
Wed 04/08/99 20:13:42 [1166] chdir(/site): No such file or directory (2)

The first one means you have no permission to access a port number below 1024. Use a port number over 1024 instead.
The second one means that the port you choosed is already used by another service. Use another port number instead. The third one tells you that the base directory does not exist. Create it or enter another one in /home/foo/my_site/etc/ftpd.reg

III First Steps

This chapter describes the steps after you started the daemon for the very first time. It introduces the basic commands for administering the site from the command line of an FTP client.

Log into the server using standard UNIX ftp client. Use port 2000, username "root" and any password (it maybe even empty): > ftp localhost 2000
220 FTP4ALL FTP server ready. Local time is Wed Aug 04, 1999 20:32. Name (localhost:foo): root
331 Password required for root.
Password: <anything goes>
230-Welcome, root - I have not seen you since Thu Jan 01, 1970 01:00 ! 230-At the moment, there are 0 guest and 1 registered users logged in. 230 You uploaded 0 Bytes and downloaded 0 Bytes so far (u/d-ratio is n/a).

To see the users that currently exist, enter: ftp> site user list

211-name      group      c icp l uid gid mb_down mb_up'd lim mb_cred last_login
211-root      0         *s --- 0   0   0       0       0   0       0 04/08 20:32

211 <end of list>

The * before the s means that this user has no password. Set your password with the command:
ftp> site passwd blah
200 Password changed

Now get a group list, enter:
ftp> site group list
211-NAME GID LIM MBCRED DMIN DMAX UMIN UMAX LG INFO IDENT 211 <end of list>

The group list is empty. Create a new group with the command: ftp> site group add root 0
200 Group added

Now, the group list will show:

211-NAME      GID LIM MBCRED DMIN DMAX UMIN UMAX LG INFO             IDENT
211-root        0   0      0    0    0    0    0  0 -                0.0.0.0

211 <end of list>

Log out and in again, so that the group list is updated. Now, get a dir listing: ftp> ls -al
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls. total 2

d---------   0 nobody    nogroup       1024 Aug 04 20:31 .
d---------   0 nobody    nogroup       1024 Aug 04 20:31 ..

226 Directory listing completed.

Change the ownership of the base directory to root:root: ftp> site chown root:root /
250 CHOWN command successful.

ls -al shows:
ftp> ls -al
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls. total 2

drwxr-x---   0 root      root          1024 Aug 04 20:36 .
d---------   0 nobody    nogroup       1024 Aug 04 20:31 ..

226 Directory listing completed.

Change the directory mode, so that everyone can change to and list / (this is required, otherwise noone can chdir anywhere) ftp> site chmod o+lc
250-.: success
250 CHMOD command finished.

Create an upload directory:
ftp> mkdir upload
257 MKDIR command successful.

Change the directory mode, so that anyone can chdir, list, mkdir and upload in this directory:
ftp> chmod go=clmp upload
250-upload: success
250 CHMOD command finished.

View the directory rights with:
ftp> site mod upload

250-directory         : (no flags)
250-owner [root     ] : (full rights)
250-group [root     ] : cd ls mkdir put
250 others            : cd ls mkdir put

Create a new user:
ftp> site user add speedy
200 User added

List the user:
ftp> site user list speedy

211-name      group      c icp l uid gid mb_down mb_up'd lim mb_cred last_login
211-speedy    -1        *n --- 1   1  -1       0       0   0       0   (never)
211-
211-  w/m/y/t upload MB:      0      0      0      0
211-  w/m/y/t dnload MB:      0      0      0      0
211-  w/m/y/t d/u ratio:   0.00   0.00   0.00   0.00
211-  w/m/y/t uspd kb/s:      0      0      0      0
211-  w/m/y/t dspd kb/s:      0      0      0      0

211-
211 <end of list>

Give him a password:
ftp> site passwd speedy quick
200 Password changed

NOTE: Try the java-based Admin GUI for FTP4ALL. You can download it from the homepage as well. This GUI simplifies the administration of groups and users. Also, it shows you who is online and what he is doing, and you can configure all server settings and messages. The only thing you cannot do with this tool is to access files and directories.


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.