How to build an FTP server under Linux

Source: Internet
Author: User
Tags file transfer protocol

Introduction to the FTP server

About the introduction of FTP we must not be unfamiliar with the introduction of the Baidu Encyclopedia directly to take over and everyone to review the concept

FTP is the abbreviation for Filetransferprotocol (File Transfer Protocol) and the Chinese simplified is called the Interfax protocol for two-way transmission of control files on the Internet at the same time it is also an application (application) based on different operating systems with different FTP applications and all of these applications All adhere to the same protocol to transfer files in the use of FTP users often encounter two concepts of "download" (Download) and "Upload" (Upload) "Download" file is to copy files from the remote host to their own computer "upload" A file is a file that is copied from its own computer to a remote host. In the Internet language, users can upload (download) files to (from) a remote host through a client program

the construction of FTP server under Linux

Generally in the various Linux distributions by default with the FTP software is vsftp from the various Linux distributions to vsftp recognition can be seen vsftp should be a good FTP software

() Check if the VSFTPD software is installed

Use the following command to detect if the VSFTPD software is installed RPMQA|GREPVSFTPD For example, the results shown in my CentOS are as follows

If it is not installed, it can be downloaded or installed and can be installed using a software source. Don't repeat it.

() use of VSFTPD software

The use of VSFTPD software mainly includes the following several commands

Start Ftpservicevsftpdstart

Stop Ftpservicevsftpdstop

Restart Ftpservicevsftpdrestart

Or use a command with a path

() configuration of the VSFTPD

The FTP configuration file is mainly three in CentOS in the/etc/vsftpd/directory, respectively

Ftpusers This file is used to specify that those users cannot access the FTP server

User_list the default account that the file uses to indicate that the FTP is not accessible by default

VSFTPDCONFVSFTPD's master configuration file

() below we use VI to edit the vsftpdconf file

User Login Control

Anonymous_enable=yes allow anonymous users to log on

No_anon_password=yes Anonymous user does not need to enter a password when logging in

Local_enable=yes allow local users to log on

Deny_email_enable=yes can create a file to save the blacklist of some anonymous e-mails to prevent these people from using Dos attacks

Banned_email_file=/etc/vsftpd/banned_emails directory to save email blacklist (default)

User Rights Control

Write_enable=yes Turn on global uploads

local_umask= local File Upload umask set to system default

Anon_upload_enable=yes allow anonymous user uploads of course, in the case of Write_enable=yes, you must also create a directory that allows FTP users to read and write.

Anon_mkdir_write_enable=yes allow anonymous to create a directory with flowers

Chown_uploads=yes the file that the anonymous user uploads is the main conversion to another user is generally recommended as root

Chown_username=whoever change the whoever here to the owner recommendation ROOT to convert

Chroot_list_enable=yes use a list to limit which users can only be active in their own directory

Chroot_list_enable=/etc/vsftpd/chroot_list Specifying user list files

Nopriv_user=ftpsecure Specify a security account to allow FTP to be fully isolated and without privileged accounts

Other recommendations do not configure

user connection and timeout settings

idle_session_timeout= Default Time-out

data_connection_timeout= Setting the default data connection time-out

() server logs and welcome information

Dirmessage_enable=yes allow information to be displayed for the configuration directory

Welcome information for FTPD_BANNER=WELCOMETOBLAHFTPSERVICEFTP

Xferlog_enable=yes turning on the logging feature

Xferlog_file=/var/log/xferlog the location of the log record file

We can change each of the above settings and then restart the FTP service to implement the FTP configuration


How to build an FTP server under Linux

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.