加入收藏 | 设为首页 | 会员中心 | 我要投稿 辽源站长网 (https://www.0437zz.com/)- 云专线、云连接、智能数据、边缘计算、数据安全!
当前位置: 首页 > 服务器 > 安全 > 正文

VSftpd安装和配置FTP虚拟用户实践

发布时间:2021-01-10 09:47:33 所属栏目:安全 来源:网络整理
导读:《VSftpd安装和配置FTP虚拟用户实践》要点: 本文介绍了VSftpd安装和配置FTP虚拟用户实践,希望对您有用。如果有疑问,可以联系我们。 VSftpd英文全称(Very Secure File Transfer Protocol Deamon),正如VSftpd官方宣传中所说 Probably the most secure and f

/etc/hosts.allow

#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services,as decided
# by the ‘/usr/sbin/tcpd’ server.
#
vsftpd: 123.103.47.0/255.255.255.0 218.240.63.0/255.255.255.0 59.46.172.0/255.255.255.0 10.0.0.0/255.0.0.0 60.2.80.0/255.255.255.0 218.249.230.0/255.255.255.0 160.10.0.0/255.255.0.0 218.246.69.0/255.255.255.0 125.35.3.0/255.255.255.0 : allow

/etc/hosts.deny

#
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services,as decided
# by the ‘/usr/sbin/tcpd’ server.
#
# The portmap line is redundant,but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow. In particular
# you should know that NFS uses portmap!
vsftpd : ALL : DENY

将tcp_wrappers=yes添加至/etc/vsftpd/vsftpd.conf

$ vi /etc/vsftpd/vsftpd.conf
tcp_wrappers=YES

重新启动VSftpd

$ service vsftpd restart
Shutting down vsftpd: OK ]
Starting vsftpd for vsftpd: OK ]

故障排除

如果配置中出现问题,请从以下几方面检查

  • 文件权限和文件属主问题
  • 防火墙iptables没开放相关的端口
  • SELinux导致的权限问题,建议先关闭SELinux再配置VSftp,之后再开启到permissive模式.或者运行这条命令:setsebool -P ftp_home_dir=1 .

参考文档

http://www.google.com
http://www.ha97.com/4113.html
http://www.cnblogs.com/sztsian/archive/2011/08/23/2204102.html

文:Mike

文章出处:运维之美(微信公众号ID:Hi-Linux)

(编辑:辽源站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

推荐文章
    热点阅读