无法在 Proftpd 和 SFTP 模式下列出文件和目录

无法在 Proftpd 和 SFTP 模式下列出文件和目录

我正在运行 SFTP

/proftpd# proftpd -V
Compile-time Settings:
  Version: 1.3.7a (maint)
  Platform: LINUX [Linux 6.1.10-x86_64-linode159 x86_64]
  Built: Sat Sep 18 2021 21:42:19 UTC
  Built With:
    configure  '--infodir=/share/info' '--disable-option-checking' '--disable-silent-rules' '--libdir=/lib/x86_64-linux-gnu' '--disable-dependency-tracking' '--prefix=/usr' '--with-pkgconfig=lib/pkgconfig' '--with-includes=/usr/include/postgresql:/usr/include/mariadb:/usr/include/mariadb/mysql' '--mandir=/usr/share/man' '--sysconfdir=/etc/proftpd' '--localstatedir=/run' '--libexecdir=/usr/lib/proftpd' '--enable-sendfile' '--enable-facl' '--enable-dso' '--enable-autoshadow' '--enable-ctrls' '--enable-openssl' '--enable-ipv6' '--enable-nls' '--enable-memcache' '--with-lastlog=/var/log/lastlog' '--enable-pcre' '--disable-strip' '--enable-redis' '--build' 'x86_64-linux-gnu' '--with-shared=mod_unique_id:mod_site_misc:mod_load:mod_ban:mod_quotatab:mod_sql:mod_sql_mysql:mod_sql_postgres:mod_sql_sqlite:mod_sql_odbc:mod_dynmasq:mod_quotatab_sql:mod_ldap:mod_quotatab_ldap:mod_ratio:mod_tls:mod_rewrite:mod_radius:mod_wrap:mod_wrap2:mod_wrap2_file:mod_wrap2_sql:mod_quotatab_file:mod_quotatab_radius:mod_facl:mod_ctrls_admin:mod_copy:mod_deflate:mod_ifversion:mod_geoip:mod_exec:mod_sftp:mod_sftp_pam:mod_sftp_sql:mod_shaper:mod_sql_passwd:mod_ifsession:mod_auth_otp:mod_tls_redis:mod_wrap2_redis:mod_redis:mod_memcache:mod_tls_memcache:mod_readme:mod_snmp:mod_digest:mod_ident:mod_log_forensic:mod_qos:mod_statcache:mod_tls_fscache:mod_tls_shmcache:mod_dnsbl' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -ffile-prefix-map=/build/proftpd-dfsg-kQOC7y/proftpd-dfsg-1.3.7a+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -ffile-prefix-map=/build/proftpd-dfsg-kQOC7y/proftpd-dfsg-1.3.7a+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security'

  CFLAGS: -g2 -g -O2 -ffile-prefix-map=/build/proftpd-dfsg-kQOC7y/proftpd-dfsg-1.3.7a+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -fno-omit-frame-pointer -fno-strict-aliasing -Werror=implicit-function-declaration
  LDFLAGS: -L$(top_srcdir)/lib -L$(top_builddir)/lib -Wl,-z,relro -Wl,-z,now -rdynamic  -L/usr/lib/x86_64-linux-gnu/ -L/usr/lib/x86_64-linux-gnu
  LIBS: -lacl  -lpcreposix -lpcre -lssl -lcrypto -lsodium -lcap  -lpam -lsupp -lattr -lnsl -lresolv -lresolv -lcrypt -ldl -lhiredis -lmemcachedutil -lmemcached  -pthread

配置

#
# Proftpd sample configuration for SFTP connections.
#
# Once enabled, you can even disable the sftpserver support of OpenSSH on port 22.
# To do that, comment out the Subsystem sftp /usr/lib/openssh/sftp-server
# line in /etc/ssh/sshd_config and restart the service.
#

<IfModule mod_sftp.c>
SFTPEngine     on
Port           2222
SFTPLog        /var/log/proftpd/sftp.log
#
# Configure all host keys, using the same host key
# files that OpenSSH uses.
#
SFTPHostKey /etc/ssh/ssh_host_rsa_key
SFTPHostKey /etc/ssh/ssh_host_dsa_key
SFTPHostKey /etc/ssh/ssh_host_rsa_key
SFTPHostKey /etc/ssh/ssh_host_ecdsa_key
#SFTPHostKey /etc/ssh/ssh_host_ed25519_key

RequireValidShell               off

SFTPAuthMethods password
#
# Preferred authentication method is by keys
#
#SFTPAuthMethods publickey
#
# This is available only if mod_sftp_pam is used
#
#SFTPAuthMethods keyboard-interactive
#
# Use either
#    ssh-keygen -e -f ~user/.ssh/id_rsa.pub >/etc/proftpd/authorized_keys/user
# or
#    ssh-keygen -e -f ~user/.ssh/authorized_keys >/etc/proftpd/authorized_keys/user
# to convert users public keys in RFC4716 format.
#
#SFTPAuthorizedUserKeys file:/etc/proftpd/authorized_keys/%u
#
# Enable compression
#
SFTPCompression delayed

DefaultRoot                     ~

<IfModule mod_facts.c>
    FactsAdvertise on
  </IfModule>

</IfModule>

我可以创建新目录并浏览它们,但是无法让它列出文件和文件夹:

2023-04-25 11:30:49,014 mod_sftp/1.0.1[49716]: OPENDIR command for '/' blocked by 'MLSD' handler

我究竟做错了什么???

扩展日志显示

[25/Apr/2023:11:47:11 +0200] "INIT 3" - -
[25/Apr/2023:11:47:11 +0200] "REALPATH ." - -
[25/Apr/2023:11:47:11 +0200] "REALPATH /." - -
[25/Apr/2023:11:47:11 +0200] "MLSD /" 451 -
[25/Apr/2023:11:47:11 +0200] "OPENDIR /" 3 -

相关内容