我错误地购买了一台多function扫描仪打印机Brother MFC-9480CDW。 打印机上有一个“扫描”button,您可以将其configuration为将文件发送到FTP服务器。 我遇到的问题是,Brother不会将FTP服务器设置为二进制模式,因此符合RFC的FTP服务器会接收到TEXT文件中的文件和新的换行符。 这导致收到的PDF损坏。
我无法弄清楚这是怎么发生的。 兄弟公司的开发人员也许只用在Windows上运行的FTP服务器进行testing? 我不知道。 但无论如何,我需要configuration我的FTP服务器(这是在Mac上运行)默认为二进制模式,而不是文本。 或者,我可以运行一个不同的FTP服务器。
任何人都有线索怎么办?
从MacPorts安装vsftpd 。 根据vsftpd.conf的文档:
# By default the server will pretend to allow ASCII mode but in fact ignore # the request. Turn on the below options to have the server actually do ASCII # mangling on files when in ASCII mode.
换句话说, vsftpd的默认行为正是你想要的。