centos7 FTP service (not finished)

Check whether to install
yum info vsftpd
yum info lftp
install the ftp client
yum install lftp -y
install the ftp server
yum install vsftp -y
also install
yum install -y vsftpd lftp -y
view the configuration file to remove the "#" configuration command
grep -v "#" /etc/vsftpd/vsftpd.conf

vsftpd: 500 OOPS: vsftpd: refusing to run with writable root inside chroot () error solution
Since 2.3.5, vsftpd has enhanced security checks. If the user is restricted to its home directory, then the user’s home directory Can no longer have write permissions! If the check finds that there is still write permission, the error will be reported.
Use the command chmod aw /home/user to remove the write permission of the user's home directory. Be careful to replace the directory with your own. Or add in the configuration file of vsftpd:
allow_writeable_chroot=YES

The source of the following figure: vsftpd configuration: detailed explanation
Insert picture description here
of chroot_local_user and chroot_list_enable Access control to the corresponding IP:
tcp_wrappers=YES
/etc/hosts.allow

Access to users:

# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
chroot_local_user=YES
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/vsftpd.chroot_list

Error: such as: vsftpd: 500 OOPS: bad bool value in config file for:. . . .
The reason is that there are more spaces at the end of the configuration file line.
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_43750882/article/details/109409458