# Chkconfig vsftpd on // automatically start the vsftpd service upon startup
#/Etc/init. d/vsftpd start // enable the vsftpd service
# Vi/etc/vsftpd. conf // edit the vsftp configuration file
Find the following and disable it:
Anonymous_enable = No // disable anonymous user login
Add another row:
Local_enable = Yes // enable local user login
Create a user:
# Adduser-D/var/FTP/test-g ftp-S/sbin/nologin Test
# Passwd Test
Iptables firewall settings:
# System-config-securitylevel
Select FTP in the customization.
#/Etc/init. d/iptables restart // restart iptables
After modifying iptables, you can access FTP, but the user cannot log on because SELinux needs to be disabled.
# Vi/etc/sysconfig/SELinux
Find:
SELinux = enforcing
To:
SELinux = disabled
# Reboot // restart the computer
// If the data cannot be written after login, modify the directory permission again:
# Chown test/var/test