![无法将 FTP LIST 与 FTP 用户隔离一起使用](https://linux22.com/image/647362/%E6%97%A0%E6%B3%95%E5%B0%86%20FTP%20LIST%20%E4%B8%8E%20FTP%20%E7%94%A8%E6%88%B7%E9%9A%94%E7%A6%BB%E4%B8%80%E8%B5%B7%E4%BD%BF%E7%94%A8.png)
我已经在 IIS8 中创建了一个用户
IIS Manager Users
。我想专门创建这些用户来通过 FTP 访问(读/写)目录,仅此而已。我创建了一个新的 FTP 站点,
LocalUser
其中有一个目录和一个与用户同名的新虚拟目录。我已分配文件夹权限(针对 IUSR 和 IIS_IUSRS),为 FTP 站点启用了 IISManagerAuth 身份验证,并允许用户进入 FTP 授权规则。
到目前为止一切正常。
使用 FileZilla 测试此连接时,我可以连接到服务器并成功登录。
问题是我无法访问该目录,因为它无法检索目录列表。
Response: 220 Microsoft FTP Service
Command: USER ***|***
Response: 331 Password required
Command: PASS **************
Response: 230 User logged in.
Command: OPTS UTF8 ON
Response: 200 OPTS UTF8 command successful - UTF8 encoding now ON.
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is current directory.
Command: TYPE I
Response: 200 Type set to I.
Command: PASV
Response: 227 Entering Passive Mode (100,89,2,51,39,17).
Command: LIST
Response: 150 Opening BINARY mode data connection.
Error: Connection timed out
Error: Failed to retrieve directory listing
有什么建议么?
谢谢 :)
答案1
您正在使用被动模式的 FTP,大多数情况下是因为某些路由器和/或防火墙干扰了连接。
允许防火墙中的 FTP 被动端口范围再试一次,或者使用主动模式连接并查看会发生什么。