Install vsftp service based on system authentication in CentOS 6.6
I. Introduction
Vsftp is a file server software that is frequently used in file sharing, code update, and file backup. The following is the basic installation environment:
1) CentOS6.6
2) vsftpd-2.2.2
Ii. Installation
$ Yum install-y vsftpd
Iii. Configuration
$ Vi/etc/vsftpd. conf
Listen_address = 192.168.19.128 # specify the listening address
Listen_port = 21 # specify the listening port
Anonymous_enable = NO # anonymous access not allowed
Local_enable = YES # Allow Local Users
Write_enable = YES # Allow upload
Local_umask = 022 # local user-uploaded file mask
Dirmessage_enable = YES #
Xferlog_enable = YES # Enable Logging
Connect_from_port_20 = YES # use port 20 to connect to ftp
Xferlog_file =/var/log/xferlog # specify the location of the log file
Xferlog_std_format = YES # specify the log format as standard output
Chroot_local_user = YES # Allow directory redirection
Chroot_list_enable = YES # Allow the specified user in the file to have the directory jump permission
Chroot_list_file =/etc/vsftpd/chroot_list # specify the user to jump to in this file
Listen = YES # Allow specified listeners
Pam_service_name = vsftpd # define the file name in the pam module (this module can be left blank and has been replaced by userlist)
Userlist_enable = YES # Allow users in the file to log on
Userlist_deny = NO # except for the user specified in the file, logon is allowed.
Userlist_file =/etc/vsftpd/user_list # In this configuration file, specify which users can log on
Tcp_wrappers = YES # Allow tcp_wrappers firewall to allow and block specific ip addresses
Pasv_enable = YES # Passive Mode
Pasv_min_port = 65400 # allocate the starting port
Pasv_max_port = 65410 # allocate the end Port
Iv. Run
$ Chkconfig vsftpd on
$ Chkconfig -- list vsftpd
Vsftpd 0: off 1: off 2: on 3: on 4: on 5: on 6: off
$/Etc/init. d/vsftpd start
$ Setenforce 0 or echo "SELINUX = disabled">/etc/selinux/config (restart takes effect)
# Port 21 and Port 20 are automatically Enabled
$ Iptables-a input-m state -- state NEW-m tcp-p tcp -- dport 21-j ACCEPT
# Open a port in passive mode
$ Iptables-a input-m state -- state NEW-p tcp -- dport 65400: 65410-j ACCEPT
$ Useradd caoguo-s/sbin/nologin # create an ftp account
$ Echo "caoguo" | passwd caoguo -- stdin # set a password for the Account
5. Check
Vi. Client upload test
# Install the client
$ Yum install-y ftp
# Check whether the server has uploaded a file change
Four Advanced configurations of vsftpd Server:
VsFTPd configuration Tutorial:
Simple and practical Ubuntu FTP setup
Set up FTP server and Apache server on Ubuntu
Install the LAMP \ vsftpd \ Webmin \ phpMyAdmin service and settings in Ubuntu 13.04
Simple case of anonymous uploading of SeLinux and vsftpd on the RHEL6 Platform
Install vsftpd source code in Linux
Install and configure the FTP server vsftpd in openSUSE 13.2/13.1
This article permanently updates the link address: