Build a Vsftpd server in Linux

Source: Internet
Author: User

Currently, three FTP servers are commonly used in Linux: Vsftpd, Proftpd, and Wu-ftpd. They are all developed based on the GPL protocol and have similar functions. Here we only introduce Vsftpd servers.

1. Vsftp Server Installation

The Linxux version I used is RHEL Server 5, which is installed on the VM. By default, FTP servers are not installed, and graphical FTP server configuration tools are not provided.

You can download the installation package from the Internet or from the Linux image file. The method used here is to obtain from the image file.

First, the VM should be connected to the image file on the hard disk,

Then, run the command on Linux.

First, attach the optical drive to a directory under mnt.

mount  /dev/cdrom /mnt/cd


Go to the/mnt/cd directory and find the Vsftpd installation package. You can use the search command to query it.

find . -name vsftpd*


Check the query result.

Then we can run the rpm installation command:

rpm -ivh ./Server/vsftpd-2.0.5-16.e15_5.1.i386.rpm


In this way, the vsftpd server will be installed.

2. Vsftpd server configuration Basics

Let's take a look at the files and directories related to the Vsftpd server.

/Etc/vsftpd. config: configuration file of the Vsftpd Server

/Etc/vsftpd/ftpusers: list of users prohibited from accessing the Vsftpd Server

/Etc/vsftpd/user-list: Allows or disables access to the user list file of the vsftpd server according to Vsftpd. config.

/Var/ftp: default file directory for anonymous users

Vsftpd. config file

The vfstpd. config file determines the main functions of the Vsftpd server. Its format is as follows:

The syntax of the configuration statement is as follows: parameter name = parameter value

All options except parameter values in the configuration statement are case insensitive.

You can use "#" to comment out information.

We can use the more vsftpd. config command to view the default file configuration.

According to the default configuration, both local users and anonymous users can log on. By default, local users access their home directories, switch to other directories with access permissions, and upload and download files. Anonymous Users can only download files in the/var/ftp/directory.

3. Configure the Vsftpd Server

Let's configure the file to be uploaded and downloaded by the root user, and change the default path of the local user to/var/ftp.

First, modify vsftpd. config and run the vi command.

Add local_root =/var/ftp at the end of the file

Modify the ftpusers file and remove the "#" in front of the root user.

Modify the user-list file and remove the "#" in front of the root user.

Finally, modify the/var/ftp directory permission to allow other users to write files: comod 777 ftp

Restart the server: service vsftpd restart

Next, we use dos in Windows to upload files.

In Linux, run the/var/ftp directory command: ls to view the uploaded file.

There are still many knowledge points about the use and configuration of Vsftpd servers. Here we only introduce some common operations. For more information about Vsftpd, visit the internet.

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.