如何阻止 Debian FTP 使用 SYST 命令
如果我打开调试(我继承的一些测试脚本需要调试),则 ftp 客户端会尝试使用 SYST 命令。这会导致脚本正在监视并与预期响应进行比较的预期命令和响应不同步。
有没有办法告诉客户端不应该使用SYST命令?
If I turn on debug, which I need for some test scripts I inherited, the ftp client attempts to use the SYST command. This throws out of sync the expected commands and responses which the script is monitoring and comparing against expected responses.
Is there a way to tell the client that the SYST command should not be used?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
除非您修改 ftp 源代码,否则您将陷入 ftp 认为对调试有价值的内容。
您应该能够使用
ftp .... 2>&1 | 过滤掉 SYST。 grep -v SYST
,但这意味着修改代码。您的客户端可能不会将其调试输出发送到 stderr,因此也对其进行测试。ftp 客户端有很多版本,因此也许您可以找到可以安装的替代版本,以提供更清晰的输出。
最后,考虑调试代码的替代策略。考虑编辑您在此处发布的帖子,以包含错误消息或其他系统生成的消息,以显示您的问题的具体性质。
Unless you modify the ftp source code, you're stuck with what ftp thinks is valuable for debugging.
You should be able to filter out the SYST's with a
ftp .... 2>&1 | grep -v SYST
, but that means modifying code. Your client may not be sending its debugging output to stderr, so test that too.There are many versions of ftp clients, so maybe you can find an alternate that you can install that gives you cleaner output.
Finally, consider alternate strategies for debugging your code. Consider editing you post here to include error messages or other system generated messages that show what the specific nature of your problem is.