我安装了vsftpd,在本地访问时一切正常,但远程访问时无法查看文件夹。
在我的远程 PC 上使用 filezilla,我得到了这个:
status: connecting to 192.x.x.x
status: connection established, waiting for welcome message
response: welcome
command: user admin
response: specify pass
command: pass ****
response: 230 login successful
command: opts utf8 on
response: 200 always in utf8 mode
status: connected
status: retrieving directory listing..
command: pwd
response: 257 "/var/ftp"
command: type I
response: 200 switching to binary mode
command: PASV
response: 227 entering passive mode (192.168.8.5,59,0).
command: list
Run Code Online (Sandbox Code Playgroud)
它就停在那里,然后连接超时,我无法查看 ftp 服务器上的文件夹或目录。
在我的 iptables -L -n
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:21
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:20
Run Code Online (Sandbox Code Playgroud)
我的 /etc/vsftp/vsftp.conf
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
#anon_upload_enable=YES
#anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
#chown_uploads=YES
#chown_username=whoever
#xferlog_file=/var/log/xferlog
xferlog_std_format=YES
idle_session_timeout=120
#data_connection_timeout=120
#nopriv_user=ftpsecure
#async_abor_enable=YES
#ascii_upload_enable=YES
#ascii_download_enable=YES
ftpd_banner= Welcome
#deny_email_enable=YES
#chroot_local_user=YES
#chroot_list_enable=YES
#chroot_list_file=/etc/vsftpd/chroot_list
#ls_recurse_enable=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
30630 次 |
| 最近记录: |