Some
people say that ProFTPd is one of the best FTP daemons (servers)
around, well I tend to agree with them, its nice fast and
has a lot of features that others don't. So if you wish to
install this instead of using the default one that comes with
most distributions (wu-ftpd) then you can follow these instructions.
The first
thing you will need to do is removed wu-ftpd before getting
started, if your running Red Hat this can be done via using
the RPM uninstall (erase) command, rpm
-e wu-ftpd, this may say that it can't be done due
to a dependency with anonftp if you have that installed. There
are two choices that can be made from here, either just bypass
these dependencies by rpm
-e --nodeps wu-ftpd or removing anonftp first by rpm
-e anonftp. Now that you no longer have this on your
system you will need to adjust your inetd file to remove the
ftp settings. To do this you must edit it with your favourite
text editor, e.g. pico
/etc/inetd.conf, and scroll down to the line with ftp
on it and put a # at the front of that line (any lines of
text with a # in front are regarded comments and just skipped),
you should have something like this now:
# These
are standard services.
#
#ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -l -a
telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd
#
Once
you have don't this you will need to make the system reload
the inetd file, this is done by killall -HUP inetd, this will
cause the system to reload inetd.conf which in-turn closes
the FTP port 21 on your system.
The next
step is to get ProFTPd, you can download it from the homepage
http://www.proftpd.net/,
or any mirror site (version used here is proftpd-1.2.1.tar.gz).
Once you have the file downloaded onto your machine you need
to extract the files by the usual command, tar
xzvf proftpd-1.2.1.tar.gz, and once extracted go into
the newly created directory, e.g. cd
proftpd-1.2.1/. Now its time to read the appropriate
files on how to install, setup and run ProFTPd, the two files
are README
and INSTALL
and can be viewed by cat
README | more and cat
INSTALL | more respectively.
After
thoroughly reading the instructions your now ready to install
the program, firstly you will need to configure the source
for installation on your system, this is done by running ./configure
which will do it automatically. Provided you didn't get any
errors in the configuration (which you really shouldn't) its
time to make
the program, once this is complete log into the root (super-user)
account via su
and then run make
install.
Its now
time to edit the settings of and get your FTP back up again,
once again using your favourite editor open the ProFTPd configuration
file, e.g. pico /usr/local/etc/proftpd.conf.
The first of the changes is to give your server the name,
this is done on the line stating with ServerName,
just replace the test within the " ", next this
is to change the Group
to nobody.
The last part is optional, if you don't want your Ftp running
on the standard port 21 then you will need to change the appropriate
line. Now save your file and exit.
The final
step is to load your server, this is done simply by executing
the created binary program /usr/local/sbin/proftpd,
the server should be up and when your try and log in you should
get something like this:
C:\>ftp
ftp> open
To 203.164.xxx.xxx
Connected to 203.164.xxx.xxx.
220 ProFTPD 1.2.1 Server (Mayhem's Cable Server) [linuxbox]
User (203.164.xxx.xxx:(none)): mayhem
331 Password required for mayhem.
Password:
230 User mayhem logged in.
ftp>
If you
want to make your FTP server start when your system boots
then you will need to add the above final step to the appropriate
startup script on your system, so that it can be process during
the machines boot up initialisations.
By default
configuration ProFTPd will not let you do FXP (FTP to FTP
transfers) and also will not support resuming, it is quite
simple add this support, what you must do is edit proftpd.conf
and add the following lines:
AllowForeignAddress on
# Allow FXP (FTP to FTP transfers)
AllowStoreRestart on
# Allow Upload Resumes
AllowRetrieveRestart on #
Allow Download Resumes
Also
if you would like to remove anonymous access from your server
then simple #
out the the lines (and these lines between also) <Anonymous
~ftp> and </Anonymous>.
Another common thing is to prevent people seeing things outside
their home directory, if you want to do this then add this
line to your configuration in the same place you put the Allow
lines above:
DefaultRoot ~
You will
have to put in extra configuration information if you would
like an account to be able to view everything (usually you
would only do this to your main account for security purposes
if any account for that matter). Just say you want two groups
(e.g. group1 and group2, these are system groups) of people
to be able to view your entire box via FTP then you would
need to make the DefaultRoot
line look like this:
DefaultRoot ~ !group1 !group2
Once
all the modifications have been made simply restart ProFTPd
and you should now be able to FXP and resume.
|