Overview
Using File Transfer Protocol (FTP) to transfer files between computers over a network is a common method. Almost all platforms have FTP client and server software, so using FTP to transfer files is also a convenient way.
There are many different ways to configure an FTP server. One is to configure FTP as a private server that is open only to users in the system, which is also the default configuration for FTP. A private FTP server only runs user access on the system and can access controls on users, giving or denying access to specific users.
The other is to configure the FTP server as an anonymous server. An anonymous FTP server allows anyone (regardless of an account number) to access the server and transfer files. Because of potential security concerns, you must be careful to configure to allow access only to specific directories on your system. In this section, we configure FTP to be "chrooted", a configuration that runs user access, such as a Web site's directory, but does not allow them to access a higher level of directories.
Attention matters
All of the commands below are UNIX-compliant commands.
The source path is "/var/tmp" (of course, you can use a different path in fact).
Installed in the Redhat Linux 6.1 test pass.
To install with the "root" user.
The WU-FTP version number is 2.6.0.
Compiling and installing
To decompress a package (tar.gz):
[root@deep]# CP Wu-ftpd-version.tar.gz/var/tmp
[root@deep]# cd/var/tmp
[root@deep]# tar xzpf wu-ftpd-version.tar.gz
Compiling and optimizing
Go to WU-FTPD's new directory and run the following command:
Edit the "ftpcount.c" file (vi +241 src/ftpcount.c) to change the following line:
#if defined (LINUX)
To
#if defined (LINUX_BUT_NOT_REDHAT_6_0)
Edit the "pathnames.h.in" file (vi +42 src/pathnames.h.in) to change the following line:
#define _path_execpath "/bin/ftp-exec"
To
#define _path_execpath "/usr/bin/ftp-exec"
We change "ftp-exec" from "/bin" directory to "/usr/bin" directory.