First, VSFTP installation article
Copy Code code as follows:
# Install VSFTPD
Yum-y Install VSFTPD
# start
Service VSFTPD Start
# Turn on Boot
Chkconfig vsftpd on
Second, the VSFTP related order service article
Copy Code code as follows:
# Start the FTP service
Service VSFTPD Start
# View FTP Service status
Service VSFTPD Status
# Restart the FTP service
Service VSFTPD Restart
# Close the FTP service
Service VSFTPD Stop
Third, VSFTP configuration chapter
Copy Code code as follows:
#进入vsftpd配置文件
Vim/etc/vsftpd/vsftpd.conf
# Disable anonymous User anonymous login
Anonymous_enable=no
# allow local users to log on
Local_enable=yes
# Let the logged-in user have write permission (upload, delete)
Write_enable=yes
# default Umask
local_umask=022
# Save the log of the transfer record to/var/log/vsftpd.log
Xferlog_enable=yes
Xferlog_file=/var/log/vsftpd.log
Xferlog_std_format=no
# Allow ASCII mode upload
Ascii_upload_enable=yes
# Allow ASCII mode downloads
Ascii_download_enable=yes
# using port 20th to transmit data
Connect_from_port_20=yes
# Welcome Slogan
Ftpd_banner=welcome to with my test FTP server.
# The next three configurations are important
# Chroot_local_user Set Yes, all users will be chroot by default,
# also on the user directory is limited to their own home, unable to change the directory up.
# chroot_list_enable Set Yes so that the Chroot user list is valid.
#★ Super Important: If Chroot_local_user is set Yes, then Chroot_list_file
# files that are not chroot users (you can change the directory up)
#★ Super Important: If Chroot_local_user set no, then Chroot_list_file
# in the file that is being chroot (unable to change the directory up)
Chroot_list_enable=yes
# touch/etc/vsftpd/chroot_list New
Chroot_list_file=/etc/vsftpd/chroot_list
Use_localtime=yes
# run on IPv4 in standalone mode
Listen=yes
# PAM Authentication Service name, this is the default is VSFTPD, in the installation of VSFTPD has created this Pam file,
# in/ETC/PAM.D/VSFTPD, according to the settings in this Pam file,/etc/vsftpd/ftpusers
# users in the file will not be allowed to log on to the FTP server, such as root sensitive users, so you have to prohibit other users
# When you log in, you can also append the user to the/etc/vsftpd/ftpusers.
Pam_service_name=vsftpd
# Restart VSFTPD
Service VSFTPD Restart
Four, vsftp user article
Copy Code code as follows:
# Create User
useradd-d/home/webapps/www.xxx.com-s/sbin/nologin-m hzh1990
# Set User to Folder
Chown-r Username/home/webapps/www.xxx.com/public
# Set permissions
Chown-r 777/home/webapps/www.xxx.com/public
# Add password
passwd hzh1990-> password-> Confirm password