Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Configuration method of FTP Server in Linux

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to configure the FTP server in Linux. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Installation and operation

Let's take RedHat Linux as an example.

1. Installation

According to the different service objects, FTP services can be divided into two categories: one is the system FTP server, which only allows legitimate users on the system to use; the other is the anonymous FTP server, which allows anyone to log in to the FTP server, and after connecting to the server, enter Anonymous in the login prompt to access the server. For these two services, you can install Wu-Ftpd 's RPM package from the first CD of RedHat, simply enter the system as Root and run the following command:

Rpm-ivh anonftp-x.x-x.i386.rpm

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

Where-x.x-x and-x.x.x-x are version numbers.

2. Start

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

Automatic startup is convenient, but when we change the Wu-Ftpd configuration file, we need to start it manually:

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 up to better control user access. These configuration files are: / etc/ftpusers, / etc/ftpconversions, / etc/ftp-groups, / etc/ftpphosts, / etc/ftpaccess. With these files, you can accurately control who, when, and where you can connect to the server, and you can check and track the work they do after connecting.

/ etc/ftpusers: users contained in this folder cannot log in to the server through FTP, and sometimes write user accounts that need to be banned into the file / etc/ftpuser, thus prohibiting some users from using FTP services.

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

/ etc/ftpgroups: create a user group whose members are predefined to have access to the FTP server.

/ etc/ftpphosts: used to disable or allow remote host access to specific accounts, for example:

Allow czc 192.168.0.0/24

Deny cdd 10.0.0.0/8

Indicates that czc users are allowed to access from the network segment 192. 168. 0, and cdd is denied from 10. 0. This network segment is connected to access.

/ etc/ftpaccess: is a very important configuration file to control access permissions. Each line in the file defines an attribute and sets the value of the property. Here is an introduction to some of its common configurations:

1. Define user categories

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

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

2. Login retry times

Enter: loginfails 10 on the command line, which indicates that if you have not successfully logged in 10 times, disconnect the connection.

3. Password check

Format: passwd-check < strictness > warn

Is a check of how passwords are used by anonymous users, where < strictness > is one of three possible strings: None, Trivial, RFC822. If None is selected, the password will not be checked; if Trivial is selected, the password is required to have at least an @ symbol in the password; if RFC822 is selected, it means that the E-mail address must comply with the RFC822 message title standard (such as czc@domain.com).

For example: passwd-check rfc822 warn, indicates that the password requirements are very strict, when the password does not comply with the rules, there is a warning message.

4. Restrictions on the number of people logging in

Format: limit [category] [number of people] [time] [file name]

Sets the number of people who can log on to FTP in the specified category within the agreed time. For example: limit remote Any/etc/many.msg, indicating that the category Remote has no more than 20 people logged in at any time, otherwise a Many.msg warning message will be displayed.

Rational use of these configurations can effectively protect our servers.

Verification

After installing and configuring the FTP server, you can verify it, and you can access the FTP server with both 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 Servername with the hostname or the IP address of the FTP server you want to connect to, enter the user name and password as prompted, and then use the standard Linux to move the FTP server directory structure up or down. In addition, graphical FTP programs, including windowed gFTP, can be used to access the FTP server with the help of a Web browser.

This is the end of this article on "how to configure the FTP server in Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report