正如标题中所说,我无法将我的 Windows 10 主机连接到 VirtualBox 来宾端(Ubuntu 18.04)上的 FTP 服务器。在来宾端,vsftpd 服务器工作正常,我可以毫无问题地连接。
所以我尝试将关联的端口转发到主机(NAT)并尝试通过 FileZilla 连接到服务器。它确实登录了,但总是无法检索目录列表。我尝试停用防火墙,授予对该文件夹的所有访问权限,但它没有改变任何内容。
我读到这可能是被动模式的问题:
Problems with FTP file access to VirtualBox guest running Windows 2008 Server R2 x64
所以我添加了以下几行到我的vsftpd.conf:
pasv_enable=YES
pasv_min_port=8020
pasv_max_port=8020
port_enable=YES
pasv_address=127.0.0.1
Run Code Online (Sandbox Code Playgroud)
我转发了端口 8020,但现在在 FileZilla 上出现以下错误:
无法建立数据连接:WSAEADDRNOTAVAIL - 无法分配请求的地址
完整的 FileZilla 响应:
Status: Connecting to 127.0.0.1:2100...
Status: Connection established, waiting for welcome message...
Status: Server does not support non-ASCII characters.
Status: Logged in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/home/cakephp" is the current …Run Code Online (Sandbox Code Playgroud)