该/etc/ftphosts文件用于定义是否允许用户从某些主机登录,或者是否拒绝访问。
创建ftphosts文件,touch/etc/ftphosts并在该文件中添加以下行,例如
# Example host access file # # Everything after a '#' is treated as comment, # empty lines are ignored allow ftpadmin 208.164.186.1 208.164.186.2 208.164.186.4 deny ftpadmin 208.164.186.5 |
现在,将其默认权限更改为600:
[root@deep ] /# chmod 600 /etc/ftphosts |
该/etc/ftpusers/文件指定了不允许连接到您的那些用户FTP服务器。
创建ftpusers文件,touch/etc/ftpusers并在该文件中添加以下用户以提高安全性
root bin daemon adm lp sync shutdown halt mail news uucp operator games nobody |
现在,将其默认权限更改为600:
[root@deep ] /# chmod 600 /etc/ftpusers |