1. First use the rpm -qa| grep vsftpd command to check whether ftp has been installed. If ftp is not installed, use yum -y install vsftpd to install it (under ubuntu, use apt-get install vsftpd)
2. service vsftpd start
Startup To make FTP start automatically every time you boot, run the command: chkconfig --level 35 vsftpd on
3. Set ftp permissions
vi /etc/vsftpd/vsftpd.conf
Change anonymous_enable=YES to anonymous_enable=NO
ESC returns, enter ":wq" to save and launch
4. Add ftp account and directory
useradd -d /alidata/www/wwwroot -s /sbin/nologin pwftp
passwd pwftp
chmod -R 755 /alidata/www /wwwroot
chown -R pwftp /alidata/www/wwwroot
/etc/rc.d/init.d/vsftpd restart
Then use the account pwftp password 123456
to test and you can log in to ftp. The directory is /alidata/www/wwwroot
For more related articles on how to set up FTP under Linux, please pay attention to the PHP Chinese website!