命令行中的 IIS ftp 服务器问题

命令行中的 IIS ftp 服务器问题

我正在尝试在 IIS (Windows Server 2008 R2) 上配置 ftp 服务器

我为用户配置了具有读写权限的基本身份验证,但没有 SSL

我还在服务器防火墙上打开了端口 21

然后从服务器 cmd,我打开了 localhost,登录后我尝试了“ls”命令并且成功了

然后我尝试从客户端使用 FileZilla,它起作用了

这里是日志:

Stato:  Connessione a X.X.X.X:Y...
Stato:  Connessione stabilita, in attesa del messaggio di benvenuto...
Trace:  CFtpControlSocket::OnReceive()
Risposta:   220 Microsoft FTP Service
Trace:  CFtpControlSocket::SendNextCommand()
Comando:    AUTH TLS
Trace:  CFtpControlSocket::OnReceive()
Risposta:   534 Local policy on server does not allow TLS secure connections.
Trace:  CFtpControlSocket::SendNextCommand()
Comando:    AUTH SSL
Trace:  CFtpControlSocket::OnReceive()
Risposta:   534 Local policy on server does not allow TLS secure connections.
Stato:  Server non sicuro, non supporta FTP su TLS.
Trace:  CFtpControlSocket::SendNextCommand()
Comando:    USER **********
Trace:  CFtpControlSocket::OnReceive()
Risposta:   331 Password required for **********.
Trace:  CFtpControlSocket::SendNextCommand()
Comando:    PASS **********
Trace:  CFtpControlSocket::OnReceive()
Risposta:   230 User logged in.
Trace:  CFtpControlSocket::SendNextCommand()
Comando:    OPTS UTF8 ON
Trace:  CFtpControlSocket::OnReceive()
Risposta:   200 OPTS UTF8 command successful - UTF8 encoding now ON.
Stato:  Accesso effettuato
Trace:  CFtpControlSocket::ResetOperation(0)
Trace:  CControlSocket::ResetOperation(0)
Trace:  CFileZillaEnginePrivate::ResetOperation(0)
Trace:  Measured latency of 60 ms
Stato:  Lettura elenco cartelle...
Trace:  CFtpControlSocket::SendNextCommand()
Trace:  CFtpControlSocket::ChangeDirSend()
Comando:    PWD
Trace:  CFtpControlSocket::OnReceive()
Risposta:   257 "/" is current directory.
Trace:  CFtpControlSocket::ResetOperation(0)
Trace:  CControlSocket::ResetOperation(0)
Trace:  CFtpControlSocket::ParseSubcommandResult(0)
Trace:  CFtpControlSocket::ListSubcommandResult()
Trace:    state = 1
Trace:  CFtpControlSocket::ResetOperation(0)
Trace:  CControlSocket::ResetOperation(0)
Stato:  Elenco cartella di "/" completato
Trace:  CFileZillaEnginePrivate::ResetOperation(0)

但是从客户端 cmd 尝试“ls”命令时我收到:

501 Server cannot accept argument.
150 Opening ASCII mode data connection.

在另一个命令之后,我没有收到任何内容

我认为这是防火墙问题并且与主动/被动模式有关但为什么 FileZilla 可以正常工作?

我应该怎么做才能让它从命令行工作?

编辑 我也尝试禁用 Windows 防火墙,但问题仍然存在

但如果是的话,为什么 FileZilla 可以工作?我不能使用默认端口的主动模式,而不是动态端口的被动模式吗?

答案1

这是防火墙,dynamci 端口被阻止了

尝试这个:

netsh int ipv4 set dynamicport tcp 49152 16383 persistent

这将打开所有 FTP 动态端口

相关内容