![Proftpd 默默失败。系统显示正在运行,但未接受连接](https://linux22.com/image/705961/Proftpd%20%E9%BB%98%E9%BB%98%E5%A4%B1%E8%B4%A5%E3%80%82%E7%B3%BB%E7%BB%9F%E6%98%BE%E7%A4%BA%E6%AD%A3%E5%9C%A8%E8%BF%90%E8%A1%8C%EF%BC%8C%E4%BD%86%E6%9C%AA%E6%8E%A5%E5%8F%97%E8%BF%9E%E6%8E%A5.png)
我已经proftpd
在 Centos 7 机器上安装。
这是输出systemctl -l status proftpd
:
proftpd.service - ProFTPD FTP Server
Loaded: loaded (/usr/lib/systemd/system/proftpd.service; enabled; vendor preset: disabled)
Active: active (running) since gio 2017-06-15 08:46:23 EDT; 2s ago
Process: 5358 ExecStart=/usr/sbin/proftpd $PROFTPD_OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 5359 (proftpd)
CGroup: /system.slice/proftpd.service
└─5359 proftpd: (accepting connections
giu 15 08:46:23 edmure.francescoruvolo.com systemd[1]: Starting ProFTPD FTP Server...
giu 15 08:46:23 edmure.francescoruvolo.com proftpd[5359]: 64.137.242.120 - ProFTPD 1.3.5e (maint) (built Wed May 3 2017 14:58:47 UTC) standalone mode STARTUP
giu 15 08:46:23 edmure.francescoruvolo.com systemd[1]: Started ProFTPD FTP Server.
所有start
、stop
和restart
命令都运行正常,没有显示任何错误。
我检查了配置--testconfig
,它没有显示任何错误。无论如何,这是完整的proftpd.conf
文件,虽然我没有改变任何选项,所以它不能开箱即用,这很奇怪。
没有日志/var/log/proftpd/
。/var/log/messages/
只显示相同的行systemctl status
。
没有防火墙规则:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
但是,我无法使用netcat
端口 21 进行连接,即使是从本地主机也是如此。并且netstat -tulpn | grep :21
没有显示任何输出。
以下是输出proftpd -V
:
Compile-time Settings:
Version: 1.3.5e (maint)
Platform: LINUX [Linux 3.10.0-514.21.1.el7.x86_64 x86_64]
Built: Wed May 3 2017 14:58:47 UTC
Built With:
configure '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--libexecdir=/usr/libexec/proftpd' '--localstatedir=/run/proftpd' '--disable-strip' '--enable-ctrls' '--enable-dso' '--enable-facl' '--enable-ipv6' '--enable-memcache' '--enable-nls' '--enable-openssl' '--enable-pcre' '--enable-shadow' '--enable-tests' '--with-libraries=/usr/lib64/mysql' '--with-includes=/usr/include/mysql' '--with-modules=mod_readme:mod_auth_pam:mod_tls' '--with-shared=mod_sql:mod_sql_passwd:mod_sql_mysql:mod_sql_postgres:mod_quotatab:mod_quotatab_file:mod_quotatab_ldap:mod_quotatab_radius:mod_quotatab_sql:mod_ldap:mod_ban:mod_wrap:mod_ctrls_admin:mod_facl:mod_load:mod_vroot:mod_radius:mod_ratio:mod_rewrite:mod_site_misc:mod_exec:mod_shaper:mod_geoip:mod_wrap2:mod_wrap2_file:mod_wrap2_sql:mod_copy:mod_deflate:mod_ifversion:mod_qos:mod_sftp:mod_sftp_pam:mod_sftp_sql:mod_tls_shmcache:mod_tls_memcache:mod_ifsession' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic'
CFLAGS: -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wall
LDFLAGS: -L$(top_srcdir)/lib -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/lib64/mysql -L/usr/lib64/mysql -L/usr/lib64
LIBS: -lacl -lpcreposix -lpcre -lssl -lcrypto -lssl -lcrypto -lcap -lmemcached -lmemcachedutil -lssl -lcrypto -lpam -lsupp -lcrypt -ldl
Files:
Configuration File:
/etc/proftpd.conf
Pid File:
/run/proftpd/proftpd.pid
Scoreboard File:
/run/proftpd/proftpd.scoreboard
Header Directory:
/usr/include/proftpd
Shared Module Directory:
/usr/libexec/proftpd
Features:
- Autoshadow support
+ Controls support
+ curses support
- Developer support
+ DSO support
+ IPv6 support
+ Largefile support
- Lastlog support
+ Memcache support
+ ncursesw support
+ NLS support
+ OpenSSL support (FIPS enabled)
+ PCRE support
+ POSIX ACL support
+ Shadow file support
+ Sendfile support
+ Trace support
Tunable Options:
PR_TUNABLE_BUFFER_SIZE = 1024
PR_TUNABLE_DEFAULT_RCVBUFSZ = 8192
PR_TUNABLE_DEFAULT_SNDBUFSZ = 8192
PR_TUNABLE_GLOBBING_MAX_MATCHES = 100000
PR_TUNABLE_GLOBBING_MAX_RECURSION = 8
PR_TUNABLE_HASH_TABLE_SIZE = 40
PR_TUNABLE_NEW_POOL_SIZE = 512
PR_TUNABLE_SCOREBOARD_BUFFER_SIZE = 80
PR_TUNABLE_SCOREBOARD_SCRUB_TIMER = 30
PR_TUNABLE_SELECT_TIMEOUT = 30
PR_TUNABLE_TIMEOUTIDENT = 10
PR_TUNABLE_TIMEOUTIDLE = 600
PR_TUNABLE_TIMEOUTLINGER = 30
PR_TUNABLE_TIMEOUTLOGIN = 300
PR_TUNABLE_TIMEOUTNOXFER = 300
PR_TUNABLE_TIMEOUTSTALLED = 3600
PR_TUNABLE_XFER_SCOREBOARD_UPDATES = 10
我很困惑,不知道如何进一步解决问题。我也删除并重新安装了该软件包,但没有任何变化。
答案1
因此,您的配置文件在语法上是正确的,因为它在使用 --testconfig 或初始化时不会发出抱怨。由于服务启动干净且不会发出抱怨,因此它要么没有尝试绑定到 21,要么不久后就会丢失它。
不确定您的构建版本是否需要它,但我注意到您的配置中没有插入 Port 指令。您是否尝试过Port 21
在配置顶部添加:?不确定它是否会将缺少它视为Port 0
,从而禁用服务器。
http://www.proftpd.org/docs/directives/linked/config_ref_Port.html