我试图使用Windows上的Filezilla连接到运行vsftpd 2.3.5的linux实例(也尝试了2.3.2和相同的结果),但是服务器仍然使用500个OOPS: vsf_sysutil_bind来响应,然后根据我使用的是主动模式还是被动模式(请参阅下面的日志)进行另一个不同的错误。
几天前这个装置还不错。据我所知,服务器的配置没有任何变化,但现在连接后立即被抛出。我重新启动了vsftpd,但还没有重新启动服务器本身。是什么导致了这种行为,为什么会突然出现,我该如何解决呢?
如果我使用活动模式,客户端日志如下所示:
...
Response: 230 Login successful.
Command: OPTS UTF8 ON
Response: 200 Always in UTF8 mode.
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/"
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: PORT 192,168,1,101,250,178
Response: 200 PORT command successful. Consider using PASV.
Command: LIST
Response: 500 OOPS: vsf_sysutil_bind
Error: Failed to retrieve directory listing
Response: 500 OOPS: priv_sock_get_cmd
Error: Connection closed by server
如果我使用被动模式连接,则客户端日志略有不同:
....
Response: 230 Login successful.
Command: SYST
Response: 215 UNIX Type: L8
Command: FEAT
Response: 211-Features:
Response: EPRT
Response: EPSV
Response: MDTM
Response: PASV
Response: REST STREAM
Response: SIZE
Response: TVFS
Response: UTF8
Response: 211 End
Command: OPTS UTF8 ON
Response: 200 Always in UTF8 mode.
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/"
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: PASV
Response: 500 OOPS: vsf_sysutil_bind
Command: PORT 192,168,1,101,249,253
Response: 500 OOPS: priv_sock_get_int
Error: Failed to retrieve directory listing
Error: Connection closed by server
无论哪种方式,vsftpd日志都说:
Tue Dec 27 23:32:18 2011 [pid 19875] CONNECT: Client "XXX.XXX.XXX.XXX"
Tue Dec 27 23:32:18 2011 [pid 19874] [username] OK LOGIN: Client "XXX.XXX.XXX.XXX"
我的vsftpd.conf是:
listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
idle_session_timeout=600
data_connection_timeout=900
ftpd_banner=Welcome to FTP
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
pasv_enable=YES
pasv_promiscuous=YES
pasv_min_port=12000
pasv_max_port=12100
pasv_address=XXX.XXX.XXX.XXX
port_enable=YES
port_promiscuous=YES
user_config_dir=/etc/vsftpd/users
发布于 2011-12-28 20:25:51
最后,我摆脱了vsftpd,切换到proftd,它在主动和被动模式下运行良好,没有对服务器的防火墙设置进行任何更改。我仍然不知道是什么导致了这个问题,但是如果它发生在你身上,改变FTP服务器软件可能是答案。
发布于 2017-06-13 09:25:22
在过去的几天里,我在这个问题上遇到了麻烦,一开始我遵循了安装proftpd的唯一答案。这并没有如我所希望的那样顺利,所以我尝试了纯ftpd,失败了,我返回到vsftpd,解决了我的问题是增加被动端口的数量,我以前只允许范围10090:10100,也就是只有10个端口。
从那以后,我允许为vsftpd提供更大范围的端口,并且它解决了我的问题,当我一次上传包含10个文件的长文件列表时,我不再收到这个错误。
希望它能帮助下一次遇到这个问题的人。
发布于 2022-08-03 10:52:30
删除vsftpd中的"port_promiscous“行并重新启动vsftpd解决了我的问题。
https://serverfault.com/questions/344540
复制相似问题