Getting ProFtpd and Running the Fast and Easy Way!
Just about every Linux distribution comes with
as it's default FTP server. If it is not meeting your needs,
or you want to try something new and exciting, then you should check out
The ProFtpd server is very flexible and powerful, but since both the
Reference and the Configuration sections only list the configuration
directives, I figured out would put up a page on how to quickly get
things up and running.
The instructions here are for standard user access as well as for
anonymous logins and is run under inetd. It assumes that the chroot
jail directory for anonymous FTP is /home/ftp.
STEP 1: Get the distribution package.
Go to www.proftpd.org and follow
their instructions as to where to get the most recent release of the
STEP 2: Stick the package in your /tmp directory and issue the command:
gunzip whateverthenameis.tar.gz, then issue the command:
tar xvf whateverthenameis.tar and you will find a new directory in
your /tmp directory named proftpsomethign. Change into that directory
and proceed to step 3.
STEP 3: Read over the INSTALL and README files for any late breaking news.
STEP 4: Issue the following commands:
STEP 5: If all went well, edit your /etc/passwd file so that the ftp user
account has a valid shell according to what is in /etc/shells. /bin/sh
is one possible shell.
STEP 6: You now want to change directories (cd ) to
/usr/local/etc and replace the existing file named proftp.conf
with the following:
#---start cut and paste---
# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.
# Port 21 is the standard FTP port.
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
# Set the user and group that the server normally runs at.
# Normally, we want files to be overwriteable.
# A basic anonymous configuration, no upload directories.
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp
# Limit the maximum number of anonymous logins
# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
# Limit WRITE everywhere in the anonymous chroot
#---end cut and paste---
Make sure that the User "nobody" and the group "nobody" exist on your system,
or change those values to your system's user with very limited permissions
user and group.
STEP 7: Edit your /etc/inetd.conf file. You will find a line that looks
ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -l -a
Place a # sign at the very front of the line to disable wu-ftpd.
Once your old ftp line looks like this:
#ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -l -a
add the following new line just above it:
ftp stream tcp nowait root /usr/local/sbin/proftpd proftpd
STEP 8: You should be all set to try it out now. Do not reboot your
system! To activate the ProFtpd server, restart inetd by finding it's
process number and using the kill -HUP 12345 command. Of course
12345 is not the actual number.
To get the actual number, give the following command
ps ax | more (ps -ef on other un*x based systems)
STEP 9: Everything should be up and running now. Try connecting
to your server using a web browser as well from the command line.
If you get a "connection refused" or other problem, do the following
to fall back to your other ftp server:
It will most likely have a very low number since it starts running as
the system is booted, such as:
292 ? S 0:02 inetd
In this case the process id number is 292, so the command would be:
kill -HUP 292
Undo the edit changes that you made in Step 7 to /etc/inetd.conf
Repeat Step 8 to restart the inetd daemon
Try and figure out where you goofed...