ProFTPd 返回“530:登录不正确”。

ProFTPd 返回“530:登录不正确”。

有几周我没有使用 FTP 服务器,现在我尝试连接,但它返回此错误。我做了一些“yum 更新”,但我不知道从那时起还发生了什么变化。

当我使用“proftpd -nd10”命令时,它返回:

...
    2018-12-07 03:22:37,259 server.example.com proftpd[5938] 127.0.0.1: Failed binding to ::, port 21: Address already in use
    2018-12-07 03:22:37,259 server.example.com proftpd[5938] 127.0.0.1: Check the ServerType directive to ensure you are configured correctly
    2018-12-07 03:22:37,259 server.example.com proftpd[5938] 127.0.0.1: Check to see if inetd/xinetd, or another proftpd instance, is already using ::, port 21
    2018-12-07 03:22:37,259 server.example.com proftpd[5938] 127.0.0.1: Unable to start proftpd; check logs for more details

当我使用“netstat -putan | grep :21”命令时,它返回:

tcp6       0      0 :::21                   :::*                    LISTEN      5937/proftpd: (acce 

如果我停止 proftpd 服务,端口 21 就会可用。如果我重新启动,该端口又会被占用。

这是我的配置:

ServerType          standalone
ServerName          "server.example.com"
ServerIdent         on "FTP Server ready."
ServerAdmin         [email protected]
DefaultServer           on

# VRootEngine           on
DefaultRoot         ~ !adm
# VRootAlias            /etc/security/pam_env.conf etc/security/pam_env.conf

Port                21
PassivePorts            30000   35000

AuthPAMConfig           proftpd
AuthOrder           mod_auth_pam.c* mod_auth_unix.c

UseReverseDNS           off

User                nobody
Group               nobody

MaxInstances            20
UseSendfile         off
LogFormat           default "%h %l %u %t \"%r\" %s %b"
LogFormat           auth    "%v [%P] %h %t \"%r\" %s"

ExtendedLog             /var/log/proftpd/auth.log AUTH auth

#<IfDefine TLS>
  TLSEngine         on
  TLSRequired           on
  TLSRSACertificateFile     /etc/pki/tls/certs/proftpd/server.example.com.crt
  TLSRSACertificateKeyFile  /etc/pki/tls/certs/proftpd/server.example.com.key
  TLSCertificateChainFile   /etc/pki/tls/certs/proftpd/server.example.com-intermediate.crt  
  TLSCipherSuite        ALL:!ADH:!DES
  TLSOptions            NoCertRequest NoSessionReuseRequired
  TLSProtocol                   SSLv23
  TLSVerifyClient       off
  #TLSRenegotiate       ctrl 3600 data 512000 required off timeout 300
  TLSLog            /var/log/proftpd/tls.log
  <IfModule mod_tls_shmcache.c>
    TLSSessionCache     shm:/file=/var/run/proftpd/sesscache
  </IfModule>
#</IfDefine>

<IfDefine DYNAMIC_BAN_LISTS>
  LoadModule            mod_ban.c
  BanEngine         on
  BanLog            /var/log/proftpd/ban.log
  BanTable          /var/run/proftpd/ban.tab

  BanOnEvent            MaxLoginAttempts 2/00:10:00 01:00:00
  BanControlsACLs       all allow user ftpadm
</IfDefine>

<Global>
  Umask             022
  AllowOverwrite        yes

  <Limit ALL SITE_CHMOD>
    AllowAll
  </Limit>
</Global>

可以肯定的是,我已经更改了我的用户密码,但什么都没有改变。

答案1

在 proftpd.conf 中,我注释了以下行:

AuthOrder   mod_auth_pam.c* mod_auth_unix.c

重新启动了 proftpd 服务并且现在可以正常工作。

相关内容