To start the FTP service:
Yum Install vsftpd
Under the/etc/rc.d/init.d/directory: Command service vsftp start
Start SSH service, SFTP service
Under the/etc/init.d/directory: command/etc/init.d/sshd start note that you need to execute the sshd start in the absolute path
The ability to enable root to connect via FTP software:
The default is that some users cannot connect to the server via FTP, such as root. If you need to turn on these users, you need to make some changes.
(1) Edit the/etc/vsftp/ftpusers file and remove the root line
This file contains a forbidden login name.
(2) Edit the/etc/vsftp/user_list file and remove the root line
Description: When userlist_deny=yes in file/etc/vsftpd/vsftpd.conf
The list of logins in Files User_list and ftpusers is forbidden
See The comments for the ftpusers,user_lis T file specifically
The system has SELinux installed because the default is no FTP enabled, so access is blocked.
You need to perform the following steps to FTP, otherwise the transfer will fail.
View SELinux Settings
# Getsebool-a|grep FTP
Ftpd_disable_trans--off
Or
Ftp_home_dir-->off
Workaround:
Use the Setsebool command to turn on
# Setsebool Ftpd_disable_trans 1
Or
# Setsebool Ftp_home_dir 1
Check again to see if the current state is on
# Getsebool-a|grep FTP
Ftpd_disable_trans-On
Or
Ftp_home_dir-->on
The Setsebool uses the-p parameter, which is not required to enter this command every time
# setsebool-p Ftpd_disable_trans 1
Or
# setsebool-p Ftp_home_dir 1
# Service VSFTPD Restart
Linux boot FTP service, SFTP service