VSFTPD software package Acquisition and installation

Source: Internet
Author: User
Tags root access

11.2 VSFTPD Introduction

VSFTPD is an open source FTP server that is licensed under the GPL for a variety of UNIX and Linux systems. VSFTPD, also known as very secure FTP Daemon, is a secure, fast, and stable FTP server that can handle a large number of concurrent connections efficiently.

11.2.1 VSFTPD software package acquisition and installation

Key features of the VSFTPD include:

Provides a secure architecture that performs each task individually, based on the minimum privileged requirements of the task.

Support virtual IP configuration, you can establish multiple FTP servers in the domain with an IP address.

Allows the configuration and use of virtual users to separate from the system user account.

TCP encapsulation is supported.

Allows the configuration of anonymous servers, which allow users to upload and download files without the need for authentication.

Stable performance, can handle a large number of concurrent connections.

Can be configured as a standalone server.

The VSFTPD server supports bandwidth control.

Almost all Linux distributions have built-in VSFTPD services, and Red Hat Enterprise Linux 5 has its own VSFTPD service. For Red Hat Enterprise Linux 5 with VSFTPD installed, you can select the Package Manager option in Applications | Add/Remove software to view the VSFTPD service, as shown in 11.1.

You can also check that the system has the VSFTPD package installed by executing the following command at the terminal:

    1. # Rpm-qa|grep VSFTPD

    2. Vsftpd-2.0.5-10.el5

If the above results appear, VSFTPD-2.0.5-10.EL5.I386.RPM is installed.

There are two ways to install VSFTPD software packages.

1. Manually installing the VSFTPD package

Users can download the required vsftpd RPM installation package on the http://vsftpd.beasts.org/, or find the RMP that need to be installed in the red Hat Enterprise Linux 5 installation disk and install it with the RPM-IVH command. You need to have root access to the system when installing RMP. For example, to install VSFTPD-2.0.5-10.EL5.I386.RPM, use the following command:

    1. # RPM-IVH vsftpd-2.0.5-10.el5.i386.rpm

(Click to view larger image) Figure 11.1 View VSFTPD Package

2. Compiling installations based on source code

If you need a later version or need to customize the installation process, you can use the VSFTPD source code to compile the installation. Source code can be downloaded from the http://vsftp.beasts.org website, the latest version is vsftpd-2.0.5.tar.gz. In the default configuration, VSFTPD needs to use the nobody user and the/usr/share/empty directory. When you install red Hat Enterprise Linux 5 o'clock, nobody users, and/usr/share/empty directories are created automatically. You can test whether the user and directory already exist by using the following command and create the user and directory if it does not exist.

    1. # Useradd Nobody

    2. # Mkdir/usr/share/empty

If the nobody user already exists, the system will prompt "Useradd: User nobody already exists". If the directory/usr/share/empty directory already exists, the system will prompt "directory already exists."

If you need VSFTPD support for anonymous services, you should create an FTP user with the following command and have the permissions of the home directory:

    1. # mkdir/var/ftp

    2. # useradd-d/var/ftp FTP

    3. # chown Root.root/var/ftp

    4. # chmod Og-w/var/ftp

After the user and directory permissions are set up, you can compile the installation by using the following command:

    1. # TAR-ZXVF Vsftpd-2.0.5.tar.gz

    2. # CD vsftpd-2.0.5

    3. # make

    4. # make Install

After the installation is complete, the configuration file needs to be copied to the/etc directory:

    1. # CP vsftpd.conf/etc/

Then use the following command to allow local users to log on to the server:

    1. # CP Redhat/vsftpd.pam/etc/pam.d/ftp

Finally, edit the configuration file/etc/vsftpd.conf, add Listen=yes to the last line, and save.

Start VSFTPD by entering the following command at the command line:

    1. # VSFTPD &

    2. [1] 3457

& indicates that VSFTPD is running in the background. The vsftpd of the compiled installation can be detected with the following command:

  1. # FTP localhost

  2. Connected to teacher.bit.edu.cn.

  3. (VsFTPd 2.0.5)

  4. 530 Login with USER and PASS.

  5. 530 Login with USER and PASS.

  6. Kerberos_v4 rejected as an authentication type

  7. Name (localhost:root): Anonymous

  8. 331 Specify the password.

  9. Password:

  10. Successful Login.

  11. Remote system type is UNIX.

  12. Using binary mode to transfer files.

  13. FTP> ls

  14. 227 Entering Passive Mode (127,0,0,1,71,146)

  15. Here comes the directory listing.

  16. Drwxr-xr-x 2 0 0 4096 Jan

  17. 226 Directory send OK.

  18. FTP> bye

  19. 221 Goodbye.

Here are a few explanations for the above test results.

# FTP localhost

Indicates that the local server is connected.

(VsFTPd 2.0.5)

Indicates that Vsftpd2.0.5 is the version of the installed VSFTPD.

Name (localhost:root): Anonymous

Represents the input user name, which is an anonymous (anonymous) user.

Password:

Indicates that the password should be entered after password, but the password content entered is not displayed under the Linux terminal.

Login Successful

Prompt for logon success.

Ftp> ls

At the "ftp>" prompt, the LS command is used to view the files on the server while the VSFTPD service is in use.

ftp> bye 221 Goodbye.

Indicates exiting the VSFTPD server.

When the installation is complete, you can see that the VSFTPD file layout structure is concise, as shown in table 11.1.

Table 11.1 vsftpd File layout

/etc/vsftpd/vsftpd.conf

Master configuration file

/usr/sbin/vsftpd

VSFTPD's main program

/etc/rc.d/init.d/vsftpd

Startup scripts

/etc/pam.d/vsftpd

Pam Certification File

/etc/vsftpd.ftpusers

Prohibit the use of VSFTPD user list files

/etc/vsftpd.user_list

Prohibit or allow the use of VSFTPD user list files

/var/ftp

Anonymous user home Directory

/var/ftp/pub

Download directory for anonymous users


In addition, there are documentation and manual documentation. The log file for VSFTPD is located in the/etc/logrotate.d/vsftpd.log directory.

VSFTPD software package Acquisition and installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.