1. See if VSFTP RPM-QA is installed | grep vsftpd If Vsftpd-2.0.5-21.el5 is present, the vsftp installation vsftp yum-y install vsftpd 2 is already installed. Test Whether the installation is successful (IP to yourself ah, do not use my login for anonymous login user:anonymous password is empty if successful login will have the following content this indicates VSFTPD installation success) [[email protected] ~]# Service vsftpd start for vsftpd boot vsftpd:[OK] 3, configure vsftpd # Whereis vsftpd vsftpd:/usr/sbin/ Vsftpd/etc/vsftpd/usr/share/man/man8/vsftpd.8.gz yum installs the main directory for the above 3 directories, where the configuration file vsftpd.conf in/etc/vsftpd, Here's how to configure the vsftpd.conf # default profile:/etc/vsftpd.conf # The following are the configuration options and descriptions ######### core settings ###### ##### # allow local users to log on local_enable=yes # write permissions for Local Users write_enable=YES # local file permissions using FTP, the default is 077 # generally set to 022 local_umask=022 # when switching directories # Whether to display the contents of the. Message in the directory dirmessage_enable=yes dirlist_enable = no #验证方式 #pam_service_name =vsftpd # Enable data connections for FTP data ports connect_from_port_20=yes # Run listen=yes # Modify the connection port #listen_port with the standalone FTP service =2121 ######### Anonymous Logon settings ########### # allow Anonymous Logon anonymous_enable=no # If Anonymous Logon is allowed # Whether to turn on anonymous upload permission #anon_upload_enable =yes # If Anonymous Logon is allowed # allow anonymous folder creation and upload files within folders #anon_ mkdir_write_enable=yes # If you allow anonymous logons # anonymous accounts can have delete permissions #anon_other_write_enable =yes # If you allow Anonymous Logon # anonymous download permissions # anonymous to other, set directory/File attribute control #anon_world_readable_only =no # If Anonymous Logon # is allowed to limit the transfer rate of anonymous users, the unit bite #anon_max_rate =30000 ######### user throttling settings ########### #### Restrict login # use UserList to restrict user access #userlist_enable =yes # List of people not allowed to access #userlist_deny =no # restricted list file placement path #userlist_file =/etc/vsftpd/userlist_ deny.chroot #### Restrict directory # restrict all users to home #chroot_local_user =yes # calls to restrict the home directoryUser list chroot_list_enable=yes # restricts the user list in the home directory to the same path chroot_list_file=/etc/vsftpd/chroot_ list ######### Log Settings ########### # log file path settings xferlog_file=/var/log/ vsftpd.log # activate the upload/download log xferlog_enable=yes # Use the standard log format #xferlog_std_ format=yes ######### security Settings ########### # User idle timeout, in seconds #idle_session_timeout = 600 # Data Connection idle timeout, in seconds #data_connection_timeout =120 # disconnects the client after 1 minutes of inactivity # accept_timeout=60 # interrupts after 1 minutes reconnect #connect_timeout =60 # Local user transfer rate, Unit bite #local_max_rate The maximum number of connections for =50000 # FTP #max_clients maximum number of connections per IP =200 # #max_per_ip =5 ######### Passive mode setting ########### # whether to open a passive mode pasv_enable= yes # Passive mode min Port pasv_min_port=5000 # passive mode maximum port pasv_max_port=6000 ###### # # # Other Settings ########### # welcome information ftpd_banner=welcome to FTP server! 4 add FTP firewall rules: /sbin/ Iptables-i input-p TCP--dport 21-j accept /etc/rc.d/init.d/iptables save /etc/init.d/iptables Restart 5 Add User (note, add nologin type user ftpuser): useradd-d/home/ftp-s/sbin/nologin ftpuser Restart VSFTPD
CentOS Installation vsftpd