This article describes how to install and configure vsftp in CentOS 65, for more information, see vsftp installation # install vsftpdyum-yinstallvsftpd # start servicevsftpdstart # start chkconfigvsftpdon 2. vsftp-related commands # start ftp service servicevsftpd
This article describes how to install and configure vsftp in CentOs6 5. For more information, see
I. vsftp installation
# Install vsftpd
Yum-y install vsftpd
# Start
Service vsftpd start
# Enable startup
Chkconfig vsftpd on
II. vsftp-related commands
# Start the ftp service
Service vsftpd start
# Viewing ftp service status
Service vsftpd status
# Restart the ftp service
Service vsftpd restart
# Disable the ftp service
Service vsftpd stop
III. vsftp configuration
# Enter the vsftpd configuration file
Vim/etc/vsftpd. conf
# Prohibit anonymous users from logging on to anonymous
Anonymous_enable = NO
# Allow local users to log on
Local_enable = YES
# Grant the login user the write permission (upload and delete)
Write_enable = YES
# Default umask
Local_umask = 022
# Save the transfer record logs to/var/log/vsftpd. log
Xferlog_enable = YES
Xferlog_file =/var/log/vsftpd. log
Xferlog_std_format = NO
# Allow Upload in ASCII mode
Ascii_upload_enable = YES
# ASCII download allowed
Ascii_download_enable = YES
# Use Port 20 to transmit data
Connect_from_port_20 = YES
# Welcome slogans
Ftpd_banner = Welcome to use my test ftp server.
# The following three configurations are very important.
# If YES is set for chroot_local_user, all users will be chroot by default,
# The user directory is restricted to the home directory, and the Directory cannot be changed up.
# Chroot_list_enable sets YES to make the chroot user list valid.
#★Super important: if chroot_local_user sets YES, then chroot_list_file
# In the set file, the user is not chroot (you can change the directory up)
#★Super important: if NO is set for chroot_local_user, then chroot_list_file
# In the set file, it is the chroot user (the directory cannot be changed 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. The default value is vsftpd. this pam file has been created when vsftpd is installed,
# In/etc/pam. d/vsftpd, according to the settings in this pam file,/etc/vsftpd/ftpusers
# Users in the file are prohibited from logging on to the ftp server, such as sensitive users such as root, so you must disable other users.
# When logging on, you can append the user to/etc/vsftpd/ftpusers.
Pam_service_name = vsftpd
# Restart vsftpd
Service vsftpd restart
IV. vsftp users
# Create a user
Useradd-d/home/webapps/www.xxx.com-s/sbin/nologin-Mhzh1990
# Set a user to a folder
Chown-R username/home/webapps/www.xxx.com/public
# Set permissions
Chown-R 777/home/webapps/www.xxx.com/public
# Add a password
Passwd hzh1990-> password-> Confirm password