Linux server Wu-Ftpd configuration


In order to achieve FTP server configuration in Linux environment, most Linux distributions are selected by Washington University FTP (Wu- Ftpd), this is a high-performance server software. Due to its powerful features and large throughput, more than 60% of FTP servers on the Internet use it.

Installation and Operation

Below we take RedHat Linux as an example.

1. Installation

Depending on the service object, FTP services can be divided into two categories: one is the system FTP server, which only allows legitimate users on the system; the other is An anonymous FTP server that allows anyone to log in to the FTP server. After connecting to the server, enter Anonymous at the login prompt to access the server. For these two services, you can install the Wu-Ftpd RPM package on RedHat's first CD. Just enter the system as Root and run the following command:

Rpm - ivh anonftp -xx- X.i386.rpm

Rpm - ivh wu-ftpd-xxx-x.i386.rpm

where -xx-x and -xxx-x are the version numbers.

2, start

Like Apache, Wu-Ftpd can also be configured to start automatically: execute the Setup program included with RedHat, select Wu-Ftpd in the "System Service" option, press The [OK] button is OK to exit.

Automatic startup is convenient, but when we change the Wu-Ftpd configuration file, we need to use manual startup:

Start: /usr/sbin/ftprestart

Close :/usr/sbin/ftpshut

Configuration of FTP Server

In order to ensure the security of the FTP server, some important configuration files must be set to better control the access rights of users. These configuration files are: /etc/ftpusers, /etc/ftpconversions, /etc/ftp-groups, /etc/ftpphosts, /etc/ftpaccess. With these files, you can control who, when, and where you can connect to the server with great precision, and you can check and track what they do after they connect.

/etc/ftpusers: Users in this folder cannot log in to the server through FTP. Sometimes the user account that needs to be forbidden is written to the file /etc/ftpuser, which can prohibit some users from using the FTP service.

/etc/ftpconversions: Used to configure the compression/decompression program.

/etc/ftpgroups: Create user groups, members of this group are pre-defined to access the FTP server.

/etc/ftpphosts: Used to disable or allow remote hosts to access specific accounts, for example:

allow czc

deny cdd 10.0. 0.0/8

means that the czc user is allowed to access the network segment from 192.168.0, and the cdd is denied access from 10.

/etc/ftpaccess: A very important configuration file that controls access rights. Each line in the file defines an attribute and sets the value of the attribute. Let's take a look at some of its common configurations:

1. Define user categories

Format: class [class name] [real/guest/anonymous][IP address]

Function: The function of this command sets the category of the user on the FTP server. The client's IP address can be restricted to allow specific or all IP addresses to access the FTP server.

2, the number of login retry

In the command line, enter: loginfails 10, which means that if 10 times have not been successfully registered, the connection is cut off.

3, password check

Format: passwd-check warn

is a check on the use of passwords for anonymous users, where is three possible One of the strings: None, Trivial, RFC822. If None is selected, it means that no password will be checked. If Trivial is selected, it means that there is a certain requirement for the password. It needs to have at least one @ symbol in the password. If RFC822 is selected, it means the most strict, and requires E-mail address. The RFC822 message header standard (eg [email protected]) must be adhered to.

For example: passwd-check rfc822 warn, indicating that the password is very strict, and a warning message appears when the password does not meet the requirements.

4. Restrictions on the number of logins

Format: limit [Category] [Number of people] [Time] [File name]

Set the specified category to log in to FTP within the agreed time. Number of people. For example: limit remote Any/etc/many.msg, indicating that the category Remote category does not exceed 20 people at any time, otherwise the Many.msg warning message will be displayed.

Rational use of these configurations can effectively protect our servers.


After installing and configuring the FTP server, you can verify it. You can access the FTP server with graphical tools and command line. The most commonly used command in Linux is FTP, which provides an uncomplicated FTP server interface. To connect to the FTP server, just type: FTP Servername at the command prompt, replace the Servername with the host name or the IP address of the FTP server you wish to connect to, enter the username and password as prompted, and then move the FTP up or down using standard Linux. Server directory structure. In addition, you can also use a graphical FTP program, including windowed gFTP, which can be accessed via a web browser.

The above is the main point of FTP server configuration under Linux, I hope to help you.

Copyright © Windows knowledge All Rights Reserved