1, installation:
(1) from
ftp://vsftpd.beasts.org/Users/cevans/ Download VSFTPD-1.2.1.tar.gz file
(2) Upload the vsftpd-1.2.1.tar.gz file to the Linux server / root directory
(3) File decompression
# cd / root
# TAR -XVZF vSFTPD-1.2.1.tar.gz
(4) Compilation and installation
# cd vsftpd-1.2.1
# Make
# make install
Compile and install
(5) Copy the vsftpd.conf file under the /root/vsftpd-1.2.1 directory to / etc / vsftpd directory
# MKDIR / ETC / VSFTPD
# cp vsftpd.conf / etc / vsftpd
2, configuration
(1) Modify / etc / vsftpd file
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This Sample File
# Loosens Things Up A bit, To make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# Read this: This Example File is not an exhaust List of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full IDEA of vsftpd?
# Capabilities.
#
# Allow anonymous ftp? (BEWARE - allowed by Default if you comment this out).
Anonymous_enable = yes
#
# UNcomment this to allow allow Local Users to log in.
Local_enable = YES
#
# UNComment this to enable any form of ftp write command.
Write_enable = YES
#
# Default umask for local user is is 077. You May wish to change this to 022,
# if Your Users expert That (022 is buy by Most Other ftpd's)
Local_umask = 022
#
# Uncomment this to allow the anonymous ftp user to upload files. This ONLY
# HAS an Effect If The Above Global Write Enable is activated. Also, you Will
# Obviously Need to create a directory Writable by the ftp user.
# anon_upload_enable = yes
#
# Uncomment this if you want the anonymous ftp user to beable to create
# New directories.
# anon_mkdir_write_enable = yes
#
# Activate Directory Messages - Messages Given to Remote Uses When The # Go Into a Certain Directory.
DirMessage_enable = YES
#
# Activate logging of uploads / downloads.
Xferlog_enable = YES
#
# Make Sure Port Transfer Connections Originate from Port 20 (FTP-DATA).
Connect_From_Port_20 = YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a Different User. Note! Using "root" for uploaded files is not
# rebommended!
# chown_uploads = YES
# chown_username = Whoever
#
# You may override where the log file qi you like. The default is shown
# Below.
# xferlog_file = / var / log / vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format
Xferlog_std_format = yes
#
# You May Change The Default Value for Timing Out An iDLE session.
# idle_session_timeout = 600
#
# You May Change The Default Value for TIMING OUT A DATA Connection.
# data_connection_timeout = 120
#
# It is recommented That You Define on your system a unique user which the
# ftp server can use as a totally isolated and UNprivileged User.
# NOPRIV_USER = ftpsecure
#
# Enable this and the server will recognod asynchronous abor requests. Not
# Recommended for Security (The Code Is Non-Trivial). NOT Enabling IT,
# However, May Confuse Older FTP Clients.
# async_abor_enable = yes
#
# By Default The Server Will Pretennd To Allow ASCII Mode But in Fact Ignore
# The Request. Turn on the below options to have the server actually do ascii
# Mangling on Files WHEN in Ascii Mode.
# BEWARE THAT TURNING ON ASCII_DOWNLOAD_ENABLE ENABLES MALICIUS Remote Parties
# to consume your I / o resources, by issuing the command "size / big / file" in
# Ascii mode.
# THESE ASCII OPTIONS Are Split INTO UPLOAD AND Download Because You May Wish
# to enable ascii uploads (to prevent uploaded scripts etc. from breaking),
# without the dos risk of size and ascii Downloads. Ascii Mangling Should Be
# on the client anyway ..
# ascii_upload_enable = yes
# ascii_download_enable = yes
#
# You May Fully Customise The Login Banner String:
# ftpd_banner = Welcome to Blah FTP Service.
#
# You May Specify A File of Dislowed Anonymous E-mail Addresses. Apparently
# @ useful for combatting certain dos attics.
# deny_email_enable = yes
# (Default Follows)
# banned_email_file = / etc / vsftpd.banned_emails
#
# You may specify an expectit list of local users to chroot () to their home
# Directory. if Chroot_local_user is Yes, Then List Becomes a List of
# Users to not chroot ().
# chroot_list_enable = yes
# (Default Follows)
# chroot_list_file = / etc / vsftpd.chroot_list
#
# You may activivate the "-r" option to the buildin ls. This is diskled by
# Default to Avoid Remote Uses Being Able To Cause Excessive I / O on Large
# ites. However, Some Broken FTP Clients Such As "NCFTP" and "mirror" assume
# The presence of the "-r" option, soled it.
# ls_recurse_enable = yes
#enable for Standalone Mode
Listen = yes
# listen_port = 2121
TCP_WrapPERS = YES
(2) Modify /etc/xinetd.d/vsftpd file
Server = / usr / local / sbin / vsftpd
/etc/vsftpd/vsftpd.conf
The green part is the modified content
(3) Start VSFTPD service
# Service Xinetd Restart
(4) If you want to limit the user to your own Home directory, you can perform the following steps:
A: Remove the /etc/vsftpd/vsftpd.conf file, remove the # chroot_list_enable = yes and # chroot_list_file = / etc / vsftpd.chroot_list line Note: B: Create a vsftpd.chroot_list file in the / etc directory, and Limited user names in this file