centos7 FTP服务(没写完)

查看是否安装
yum info vsftpd
yum info lftp
安装ftp客户端
yum install lftp -y
安装ftp服务端
yum install vsftp -y
同时安装
yum install -y vsftpd lftp -y
查看配置文件除去"#"的配置命令
grep -v “#” /etc/vsftpd/vsftpd.conf

vsftpd:500 OOPS: vsftpd: refusing to run with writable root inside chroot ()错误的解决方法
从2.3.5之后,vsftpd增强了安全检查,如果用户被限定在了其主目录下,则该用户的主目录不能再具有写权限了!如果检查发现还有写权限,就会报该错误。
用命令chmod a-w /home/user去除用户主目录的写权限,注意把目录替换成你自己的。或者在vsftpd的配置文件中增加:
allow_writeable_chroot=YES

下图来源:vsftpd 配置:chroot_local_user与chroot_list_enable详解
在这里插入图片描述
对相应IP的访问控制:
tcp_wrappers=YES
/etc/hosts.allow

对用户的访问:

# 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

报错:诸如:vsftpd:500 OOPS: bad bool value in config file for:。。。。
原因是配置文件行结尾多了空格。
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_43750882/article/details/109409458