{"id":79,"date":"2026-01-22T05:28:09","date_gmt":"2026-01-22T05:28:09","guid":{"rendered":"https:\/\/blog.gpst.net.cn:4008\/?p=79"},"modified":"2026-01-28T06:24:16","modified_gmt":"2026-01-28T06:24:16","slug":"curl%e5%91%bd%e4%bb%a4%e4%b8%8b%e8%bd%bdftp%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/opshub.com.cn\/?p=79","title":{"rendered":"curl\u547d\u4ee4\u4e0b\u8f7dftp\u6587\u4ef6"},"content":{"rendered":"\n<p><code># \u4ec5\u4fdd\u7559\u9519\u8bef\u65e5\u5fd7\u5230 \/tmp\/ftp_download.err\uff0c\u6807\u51c6\u8f93\u51fa\u4e22\u5f03 1\u3001\/usr\/bin\/curl -s --connect-timeout 15 --retry 4 -m 15 --ftp-skip-pasv-ip --ftp-pasv --user \u7528\u6237\u540d:\u5bc6\u7801 ftp:\/\/&lt;IP:\u7aef\u53e3&gt;&lt;\u8def\u5f84&gt;&lt;\u6587\u4ef6&gt; -o \u8def\u5f84\/\u6587\u4ef6 &gt;\/dev\/null 2&gt;\/tmp\/ftp_download.err<\/code><\/p>\n\n\n\n<p>2\u3001\u8865\u5145\u8bf4\u660e\uff1a<\/p>\n\n\n\n<p>FTP \u4e3b\u52a8 \/ \u88ab\u52a8\u6a21\u5f0f\uff08\u6838\u5fc3\uff09<\/p>\n\n\n\n<p><strong>\u4e3b\u52a8\u6a21\u5f0f\uff08PORT\uff09<\/strong>\uff1aFTP \u670d\u52a1\u5668\u4e3b\u52a8\u8fde\u63a5\u5ba2\u6237\u7aef\u7684\u6307\u5b9a\u7aef\u53e3\uff0c\u6613\u88ab\u5ba2\u6237\u7aef\u9632\u706b\u5899\u62e6\u622a\uff1b<\/p>\n\n\n\n<p><strong>\u88ab\u52a8\u6a21\u5f0f\uff08PASV\uff09<\/strong>\uff1a\u8de8\u7f51\u7edc\u4e0b\u8f7d\u6587\u4ef6\u65f6\uff0c\u5efa\u8bae\u7528 FTP \u88ab\u52a8\u6a21\u5f0f \u2014\u2014 \u5ba2\u6237\u7aef\u4f1a\u5728\u6307\u5b9a\u7aef\u53e3\u8303\u56f4\u5185\u968f\u673a\u9009\u7aef\u53e3\u8fde FTP \u670d\u52a1\u5668\uff08\u670d\u52a1\u7aef\u9632\u706b\u5899\u53ea\u9700\u653e\u884c\u8fd9\u4e2a\u7aef\u53e3\u8303\u56f4\u5373\u53ef\uff09\u3002\u52a0<code>--ftp-pasv<\/code>\u53c2\u6570\u80fd\u5f3a\u5236\u5f00\u542f\u8be5\u6a21\u5f0f\uff0c\u662f\u8fd9\u7c7b\u573a\u666f\u7684\u9996\u9009\u65b9\u6848\u3002<\/p>\n\n\n\n<p><mark style=\"background-color:#FFEE58\" class=\"has-inline-color\">&#8211;ftp-skip-pasv-ip \u89e3\u51b3\u7684\u95ee\u9898\uff1a\u6bd4\u5982 FTP \u670d\u52a1\u5668\u5185\u7f51 IP \u662f 10.0.0.1\uff0c\u516c\u7f51 IP \u662f 203.0.113.1\uff0c\u5ba2\u6237\u7aef\u901a\u8fc7\u516c\u7f51\u8fde\u63a5\u65f6\uff0c\u670d\u52a1\u5668\u8fd4\u56de\u7684 PASV IP \u662f 10.0.0.1\uff0c\u5ba2\u6237\u7aef\u4f1a\u5c1d\u8bd5\u8fde\u63a5\u8be5\u5185\u7f51 IP \u5bfc\u81f4\u5931\u8d25\uff0c\u8df3\u8fc7\u9a8c\u8bc1\u540e\u5ba2\u6237\u7aef\u4f1a\u76f4\u63a5\u8fde\u63a5 FTP \u670d\u52a1\u5668\u7684\u516c\u7f51 IP\u3002<\/mark><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p># \u4ec5\u4fdd\u7559\u9519\u8bef\u65e5\u5fd7\u5230 \/tmp\/ftp_download.err\uff0c\u6807\u51c6\u8f93\u51fa\u4e22\u5f03 1\u3001\/usr\/bin\/curl -s &#8211;connect-timeout 15 &#8211;retry 4 -m 15 &#8211;ftp-skip-pasv-ip &#8211;ftp-pasv &#8211;user \u7528\u6237\u540d:\u5bc6\u7801 ftp:\/\/&lt;IP:\u7aef\u53e3&gt;&lt;\u8def\u5f84&gt;&lt;\u6587\u4ef6&gt; -o \u8def\u5f84\/\u6587\u4ef6 &gt;\/dev\/null 2&gt;\/tmp\/ftp_download.err 2\u3001\u8865\u5145\u8bf4\u660e\uff1a FTP \u4e3b\u52a8 \/ \u88ab\u52a8\u6a21\u5f0f\uff08\u6838\u5fc3\uff09 \u4e3b\u52a8\u6a21\u5f0f\uff08PORT\uff09\uff1aFTP \u670d\u52a1\u5668\u4e3b\u52a8\u8fde\u63a5\u5ba2\u6237\u7aef\u7684\u6307\u5b9a\u7aef\u53e3\uff0c\u6613\u88ab\u5ba2\u6237\u7aef\u9632\u706b\u5899\u62e6\u622a\uff1b \u88ab\u52a8\u6a21\u5f0f\uff08PASV\uff09\uff1a\u8de8\u7f51\u7edc\u4e0b\u8f7d\u6587\u4ef6\u65f6\uff0c\u5efa\u8bae\u7528 FTP \u88ab\u52a8\u6a21\u5f0f \u2014\u2014 \u5ba2\u6237\u7aef\u4f1a\u5728\u6307\u5b9a\u7aef\u53e3\u8303\u56f4\u5185\u968f\u673a\u9009\u7aef\u53e3\u8fde FTP \u670d\u52a1\u5668\uff08\u670d\u52a1\u7aef\u9632\u706b\u5899\u53ea\u9700\u653e\u884c\u8fd9\u4e2a\u7aef\u53e3\u8303\u56f4\u5373\u53ef\uff09\u3002\u52a0&#8211;ftp-pasv\u53c2\u6570\u80fd\u5f3a\u5236\u5f00\u542f\u8be5\u6a21\u5f0f\uff0c\u662f\u8fd9\u7c7b\u573a\u666f\u7684\u9996\u9009\u65b9\u6848\u3002 &#8211;ftp-skip-pasv-ip \u89e3\u51b3\u7684\u95ee\u9898\uff1a\u6bd4\u5982 FTP \u670d\u52a1\u5668\u5185\u7f51 IP \u662f 10.0.0.1\uff0c\u516c\u7f51 IP \u662f 203.0.113.1\uff0c\u5ba2\u6237\u7aef\u901a\u8fc7\u516c\u7f51\u8fde\u63a5\u65f6\uff0c\u670d\u52a1\u5668\u8fd4\u56de\u7684 PASV IP \u662f 10.0.0.1\uff0c\u5ba2\u6237\u7aef\u4f1a\u5c1d\u8bd5\u8fde\u63a5\u8be5\u5185\u7f51 IP \u5bfc\u81f4\u5931\u8d25\uff0c\u8df3\u8fc7\u9a8c\u8bc1\u540e\u5ba2\u6237\u7aef\u4f1a\u76f4\u63a5\u8fde\u63a5 FTP \u670d\u52a1\u5668\u7684\u516c\u7f51 IP\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-79","post","type-post","status-publish","format-standard","hentry","category-9"],"_links":{"self":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/79","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=79"}],"version-history":[{"count":3,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/79\/revisions"}],"predecessor-version":[{"id":683,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/79\/revisions\/683"}],"wp:attachment":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=79"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=79"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=79"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}