{"id":185,"date":"2010-10-25T16:42:35","date_gmt":"2010-10-25T08:42:35","guid":{"rendered":"http:\/\/www.ipcpu.com\/?p=185"},"modified":"2010-10-25T16:42:35","modified_gmt":"2010-10-25T08:42:35","slug":"pureftp-some-quest","status":"publish","type":"post","link":"https:\/\/c.ipcpu.com\/2010\/10\/pureftp-some-quest\/","title":{"rendered":"Linux\u5b66\u4e60\u7b14\u8bb0\u4e4bpureftp\uff08\u4e94\uff09\u5e38\u89c1\u95ee\u9898"},"content":{"rendered":"
pureftp\u7684\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\uff1a<\/strong><\/span><\/p>\n 1.\u9ed8\u8ba4\u5b89\u88c5\u65f6\u5141\u8bb8\u533f\u540d\u7528\u6237\u548c\u7cfb\u7edf\u975eroot\u7528\u6237\u767b\u5f55<\/strong> \u542f\u7528\u5176\u4e2d\u4e00\u4e2a\u8ba4\u8bc1\u65f6\uff0c\u5c31\u53ea\u80fd\u4f7f\u7528\u8be5\u8ba4\u8bc1\u4e86\u3002\u539f\u6709\u7cfb\u7edf\u7528\u6237\u5c31\u65e0\u6cd5\u767b\u9646\u4e86\uff0c\u4f46\u5982\u679c\u5141\u8bb8\u533f\u540d\u7528\u6237\u767b\u5f55\uff0c\u533f\u540d\u7684\u662f\u53ef\u4ee5\u767b\u5f55\u7684\u3002<\/p>\n 2.\u4e0a\u4f20\u4e0b\u8f7d\u901f\u5ea6\u7684\u9650\u5236\u4e0d\u662f\u5f88\u51c6\u786e\uff0c\u6d6e\u52a8\u8f83\u5927\uff0c\u6bd4vsftp\u8981\u5dee\u4e00\u4e9b\u3002<\/strong><\/p>\n 3.\u78c1\u76d8\u914d\u989d\u4e0d\u662f\u5b9e\u65f6\u7684\u3002<\/strong><\/p>\n 4.\u5e38\u89c1\u9519\u8bef<\/strong> '-I', '15', '-l', 'puredb:\/usr\/local\/pureftpd\/etc\/pureftpd.pdb', '-L', '10000:8', '-m', '4', '-s', '-U',<\/p>\n '133:022', '-u', '100', '-k', '99', '-Z'] \u8fd9\u662f\u7531\u4e8e\u5728\u7f16\u8bd1\u65f6\u6ca1\u6709\u52a0\u5165\u76f8\u5173\u9009\u9879\u9020\u6210\u7684\u3002 5.pureftp\u7684\u7f16\u7801\u95ee\u9898<\/strong><\/p>\n pureftp\u652f\u6301RFC2640\uff0c\u53ef\u4ee5\u6709\u6548\u89e3\u51b3Windows\u548cLinux\u4e0b\u7684\u7f16\u7801\u95ee\u9898<\/span><\/p>\n \u4f7f\u7528\u65b9\u6cd5\uff1a vi pure-ftpd.conf \u91cd\u65b0\u542f\u52a8\u670d\u52a1\u5668\u5373\u53ef\uff0c\u5e38\u89c1\u7684IE\u6d4f\u89c8\u5668\uff0cFlashFXP\u53ef\u4ee5\u6b63\u5e38\u4f7f\u7528GB2312,utf-8\u7f16\u7801\u3002 6.\u5173\u4e8epureftp\u7684\u88ab\u52a8\u6a21\u5f0f<\/strong><\/p>\n \u670d\u52a1\u5668\u9ed8\u8ba4\u5f00\u542f\u4e3b\u52a8\u6a21\u5f0f\u548c\u88ab\u52a8\u6a21\u5f0f\uff0c\u7531\u5ba2\u6237\u7aef\u9009\u62e9\u3002<\/p>\n \u670d\u52a1\u5668\u53ef\u4ee5\u8bbe\u7f6e\u88ab\u52a8\u6a21\u5f0f\u7aef\u53e3\u8303\u56f4\uff0c\u4e3b\u8981\u662f\u4e3a\u4e86\u9632\u706b\u5899\u7684\u8bbe\u7f6e\u3002 PassivePortRange 50001 50006\u00a0 \u767b\u5f55\u65f6\u663e\u793aYou are user number 1 of 3 allowed. \u8fd9\u6070\u597d\u5370\u8bc1\u4e86\u5b98\u65b9\u6587\u6863\u4e2d\u7684\u8bf4\u660e\uff1a \u6bcf\u4e2a\u8fde\u63a5\u81f3\u5c11\u9700\u8981\u4e24\u4e2a\u7aef\u53e3\u3002<\/span><\/p>\n \u53e6\u5916\u5b98\u65b9\u6587\u6863\u8bf4\uff0c\u7aef\u53e3\u8303\u56f4\u5f00\u653e\u7684\u8d8a\u5927\uff0c\u8d8a\u5b89\u5168\u3002 \u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1aIPCPU-\u7f51\u7edc\u4e4b\u8def<\/a> » Linux\u5b66\u4e60\u7b14\u8bb0\u4e4bpureftp\uff08\u4e94\uff09\u5e38\u89c1\u95ee\u9898<\/a><\/p>","protected":false},"excerpt":{"rendered":" pureftp\u7684\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\uff1a 1.\u9ed8\u8ba4\u5b89\u88c5\u65f6\u5141\u8bb8\u533f\u540d\u7528\u6237\u548c\u7cfb\u7edf\u975eroot\u7528\u6237\u767b\u5f55 \u7cfb\u7edf\u8ba4\u8bc1\u65b9\u5f0f\u6709 LDAPConfigFile\u00a0 MySQLConfigFile PGSQLConfigFile PureDB ExtAuth PAMAuthentication UnixAuthentication\u7b49\u3002 \u542f\u7528\u5176\u4e2d\u4e00\u4e2a\u8ba4\u8bc1\u65f6\uff0c\u5c31\u53ea\u80fd\u4f7f\u7528\u8be5\u8ba4\u8bc1\u4e86\u3002\u539f\u6709\u7cfb\u7edf\u7528\u6237\u5c31\u65e0\u6cd5\u767b\u9646\u4e86\uff0c\u4f46\u5982\u679c\u5141\u8bb8\u533f\u540d\u7528\u6237\u767b\u5f55\uff0c\u533f\u540d\u7684\u662f\u53ef\u4ee5\u767b\u5f55\u7684\u3002 2.\u4e0a\u4f20\u4e0b\u8f7d\u901f\u5ea6\u7684\u9650\u5236\u4e0d\u662f\u5f88\u51c6\u786e\uff0c\u6d6e\u52a8\u8f83\u5927\uff0c\u6bd4vsftp\u8981\u5dee\u4e00\u4e9b\u3002 3.\u78c1\u76d8\u914d\u989d\u4e0d\u662f\u5b9e\u65f6\u7684\u3002 4.\u5e38\u89c1\u9519\u8bef .\/pure-config.py pure-ftpd.conf Running: [‘\/usr\/local\/pureftpd\/sbin\/pure-ftpd’, ‘-A’, ‘-c’, ’50’, ‘-B’, ‘-C’, ‘8’, ‘-D’, ‘-f’, ‘ftp’, ‘-H’, ‘-I’, ’15’, ‘-l’, ‘puredb:\/usr\/local\/pureftpd\/etc\/pureftpd.pdb’, ‘-L’, ‘10000:8’, ‘-m’, ‘4’, ‘-s’, ‘-U’, ‘133:022’, ‘-u’, ‘100’, ‘-k’, ’99’, ‘-Z’] 421 Unknown authentication method: puredb:\/usr\/local\/pureftpd\/etc\/pureftpd.pdb \u6216\u8005\u662f\uff1a421 Unknown authentication method:\u00a0 mysql :\/usr\/local\/etc\/pureftpd-mysql.conf […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,13],"tags":[],"_links":{"self":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/185"}],"collection":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/comments?post=185"}],"version-history":[{"count":0,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/185\/revisions"}],"wp:attachment":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/media?parent=185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/categories?post=185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/tags?post=185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
\n\u7cfb\u7edf\u8ba4\u8bc1\u65b9\u5f0f\u6709
\nLDAPConfigFile\u00a0 MySQLConfigFile PGSQLConfigFile PureDB ExtAuth PAMAuthentication UnixAuthentication\u7b49\u3002<\/p>\n
\n.\/pure-config.py pure-ftpd.conf
\nRunning: ['\/usr\/local\/pureftpd\/sbin\/pure-ftpd', '-A', '-c', '50', '-B', '-C', '8', '-D', '-f', 'ftp', '-H',<\/p>\n
\n421 Unknown authentication method: puredb:\/usr\/local\/pureftpd\/etc\/pureftpd.pdb
\n\u6216\u8005\u662f\uff1a421 Unknown authentication method:\u00a0 mysql :\/usr\/local\/etc\/pureftpd-mysql.conf<\/p>\n
\n\u91cd\u65b0\u7f16\u8bd1
\n.\/configure \u2013prefix=\/usr\/local\/pureftpd\/ \u2013with-puredb
\n\u5b9e\u8df5\u8bc1\u660e\u2013with-everything\u5e76\u4e0d\u4e00\u5b9a\u4f1a\u628a\u6240\u6709\u4e1c\u897f\u52a0\u8fdb\u53bb\u7684\u3002<\/p>\n
\n\u91cd\u65b0\u7f16\u8bd1\u52a0\u5165RFC2640\u652f\u6301
\n.\/configure \u2013prefix=\/usr\/local\/pureftpd\/ \u2013with-puredb \u2013with-everything \u2013with-rfc2640<\/p>\n
\nClientCharset\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 gb2312<\/p>\n
\n\u800cLinux\u7cfb\u7edf\u81ea\u5e26\u7684ftp\u548cWindows\u7cfb\u7edf\u81ea\u5e26\u7684ftp\u5ba2\u6237\u7aef\uff0c\u4ecd\u7136\u5b58\u5728\u4e71\u7801\u73b0\u8c61\u3002<\/p>\n
\nPassivePortRange\u00a0\u00a0\u00a0\u00a0\u00a0 50001 50006
\n\u6ce8\u610f\u6b64\u5904\u5343\u4e07\u4e0d\u53ef\u5199\u621050001\uff1a50006 \uff0c\u5426\u5219\u914d\u7f6e\u6587\u4ef6\u811a\u672c\u65e0\u6cd5\u8bfb\u53d6\uff0c\u4e2d\u95f4\u662f\u7a7a\u683c\u3002<\/span><\/strong>
\n<\/span>
\n\u6211\u4eec\u505a\u4e86\u51e0\u4e2a\u5b9e\u9a8c\uff1a
\nPassivePortRange\u00a0 \u8bbe\u7f6e\u6210\u5982\u4e0b\u503c\uff0c\u5ba2\u6237\u7aef\u767b\u9646\u63d0\u793a\u5982\u4e0b\uff1a<\/p>\n
\nPassivePortRange 50001 50004\u00a0 \u767b\u5f55\u65f6\u663e\u793aYou are user number 1 of 2 allowed
\nPassivePortRange 50001 50003\u00a0 \u767b\u5f55\u65f6\u663e\u793aYou are user number 1 of 1 allowed<\/p>\n
\nSo, open some ports TO the FTP server. These ports should be > 1023. It\u2019s
\nrecommended to use at least twice the max number of clients you are
\nexpecting. So, if you accept 200 concurrent sessions, opening ports 50000 to
\n50400 is ok.<\/p>\n
\nUnlike some popular belief, the MORE opened ports you have for passive FTP,
\nthe MORE your FTP server will be secure, because the LESS you are vulnerable
\nto data hijacking.<\/p>\n