您現(xiàn)在的位置:首頁(yè) >關(guān)于我們 >行業(yè)新聞 >Linux中配置僅本地用戶使用的服務(wù)器

Linux中配置僅本地用戶使用的服務(wù)器

時(shí)間:2011年6月7日

  ftpusers和user_list文件中均包含一份FTP用戶名的列表,兩個(gè)文件雖然都用于FTP用戶的控制,但具體作用存在一些差別。

  ftpusers文件:該文件中包含的用戶賬戶將被禁止登錄vsftpd服務(wù)器,不管該用戶是否在user_list文件中出現(xiàn)。通常將root、bin、daemon等特殊用戶列在該文件中,禁止用于登錄FTP服務(wù)。默認(rèn)如下所示:

  [root@linux-01 ~]# cat /etc/vsftpd/ftpusers

  # Users that are not allowed to login via ftp

  root

  bin

  daemon

  adm

  lp

  sync

  shutdown

  halt

  mail

  news

  uucp

  operator

  games

  nobody

  user_list文件:該文件中包含的用戶賬戶可能被禁止登錄,也可能被允許登錄,具體在vsftpd.conf主配置文件中決定。默認(rèn)如下所示:

  [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

  mail

  news

  uucp

  operator

  games

  nobody

  當(dāng)存在“userlist_enable=YES”的配置項(xiàng)時(shí),user_list文件生效,如果配置“userlist_deny=YES”,則僅禁止列表中的用戶登錄,如果配置“userlist_deny=NO”,則僅允許列表中的用戶登錄。

  配置主配置文件

  在主配置文件中把a(bǔ)nonymous_enable=YES改成NO,添加“userlist_deny=NO”配置項(xiàng),并把允許訪問(wèn)的用戶添加到user_list文件中,就可以實(shí)現(xiàn)僅本地允許用戶使用的FTP文件服務(wù)器了。

本文由海騰數(shù)據(jù)(http://apistockmarket.com)提供。網(wǎng)站關(guān)鍵詞:服務(wù)器租用 | 服務(wù)器托管 | VPS主機(jī) |  電信服務(wù)器租用 | 

Copyright© 2004-2020 河南海騰電子技術(shù)有限公司 版權(quán)所有   經(jīng)營(yíng)性ICP/ISP證 備案號(hào):B1-20180452   豫公網(wǎng)安備 41019702002018號(hào)    電子營(yíng)業(yè)執(zhí)照