欢迎光临朱凯的个人博客!
朱凯,mzetire.com

Mac的FTP下载正常,但上传失败,超时

 发布时间: 2016-07-23 16:23      原创:  朱凯      评论: .       .人查看

我用的是 MacPro, 使用软件 FileZilla

问题: 下载正常,但上传失败

I can browse files in my FTP Client, but when I upload files, the client hangs for a few seconds, then thinks it uploaded the files successfully, but it only creates a new file with one blank line in it. Sometimes, it manages to upload 4-5 lines.

描述: 百度资料很少,很难找,分享给大家

解决:

The problem goes away when you take the router and connect directly through PPPoEAt first blush the problem is with the router. But no, the problem is with the Mac that connects through a router that connects through a PPPoE and tries to upload using FTP. Pretty specific, I know.The problem is with the MTU (maximum transmission unit). Apparently, Mac OS X breaks the file into chunks that are too large for the router to send, because the router's MTU was set lower than Mac OS X's.The router here was 1492, which is okay, but where the Mac's MTU is 1500, this is unacceptable. Don't really understand why it works directly with PPPoE.If you encounter the same problem, this is how you diagnose and fix it:In terminal, run the following to see what the MTU is for en0 (or en1, mine was en0):(意思是: 路由器的MTU是1492,Mac 的MTU是1500)

我们把Mac的MTU改成低于 1492 的值就可以了,比如: 1300

步骤:

①: 打开终端,查看

ifconfig | grep mtu

②: 如果小于 1492

sudo ifconfig en0 mtu 1300

This should solve it.If so, it may only be until the next restart.

上一篇:没有了 下一篇:ftp报连接220错误
分享是一种快乐,也是一种美德:
¥打开支付宝,扫码领红包¥ 红包

支付宝 aliPay

微信 wxPay