ftpusers和user_list文件都包含FTP用户名列表。尽管两个文件都用于FTP用户控制,但是它们的特定角色有所不同。

Ftpusers文件:无论用户是否出现在user_list文件中,该文件中包含的用户帐户都将被禁止登录到vsftpd服务器。通常,该文件中列出了root,bin和daemon等特殊用户,并且不允许他们登录FTP服务。默认值如下:
[root@linux-01 ~]# cat /etc/vsftpd/ftpusers
# Users that are not allowed to login via ftp
root
bin
daemon
adm
lp
sync
shutdown
halt
news
uucp
operator
games
nobody
user_list文件:该文件中包含的用户账户可能被禁止登录,也可能被允许登录,具体在vsftpd.conf主配置文件中决定。默认如下所示:
[root@linux-01 ~]# cat /etc/vsftpd/user_list
# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.
root
bin
daemon
adm
lp
sync
shutdown
halt
news
uucp
operator
games
nobody
当存在“userlist_enable=YES”的配置项时,user_list文件生效,如果配置“userlist_deny=YES”,则仅禁止列表中的用户登录,如果配置“userlist_deny=NO”,则仅允许列表中的用户登录。
配置主配置文件
在主配置文件中把anonymous_enable=YES改成NO,添加“userlist_deny=NO”配置项,并把允许访问的用户添加到user_list文件中,就可以实现仅本地允许用户使用的FTP文件服务器了。
希望南方联合小编的分享对大家有帮助,南方联合为广大用户提供专业的服务器托管,服务器租用,主机托管,云服务器租用,香港主机租用等服务器资源,详情欢迎咨询客服了解。
深圳服务器托管 深圳服务器租用 深圳主机托管 深圳主机租用 CDN加速 专线接入 独享带宽 数据中心机房机柜租用idc公司旧版网站登陆南方联合站点地图友情链接:裸金属服务器
Copyright © 2005-2020 深圳市南方联合科技有限公司 版权所有 备案号:粤ICP备05107047号 经营许可证编号:A2.B1-20170254 统一社会信用代码:91440300779894166R
售后服务技术支持
Q Q 支持:417706
电话支持:13528445704
邮箱支持:ok@souidc.com
备案专区
备案专员
备案咨询:0755-33905998