





{"id":1765,"date":"2011-03-04T02:10:01","date_gmt":"2011-03-04T06:10:01","guid":{"rendered":"http:\/\/www.killtest.hk\/?p=1765"},"modified":"2011-03-04T02:12:55","modified_gmt":"2011-03-04T06:12:55","slug":"vsftpd","status":"publish","type":"post","link":"https:\/\/www.killtest.hk\/index.php\/unix\/vsftpd\/","title":{"rendered":"\u914d\u7f6evsftpd\u670d\u52d9"},"content":{"rendered":"<p>\u914d\u7f6evsftpd\u670d\u52d9\uff1aLinux\u662f\u58f9\u7a2e\u958b\u6e90\u7684\u800c\u4e14\u5b89\u5168\u7684\u64cd\u4f5c\u7cfb\u7d71\uff0c\u5df2\u7d93\u6df1\u5165\u4eba\u5fc3\u3002\u4f5c\u70baLinux\u7684\u58f9\u7a2e\u6d41\u884c\u767c\u884c\u7248\u672c\uff0cUbuntu\u7684\u4f7f\u7528\u66f4\u70ba\u666e\u53ca\u3002vsftpd\u4f5c\u70baLinux\u4e0b\u58f9\u7a2e\u6700\u70ba\u65b9\u4fbf\u7684FTP\u7a0b\u5e8f\uff0c\u4e5f\u70ba\u4eba\u5011\u6240\u63a8\u5d07\u3002\u672c\u6587\u8b1b\u8ff0\u7684\u662f\u5982\u4f55\u914d\u7f6evsftpd\u670d\u52d9<br \/>\n\u00a0\u00a0\u00a0 \u670d\u52d9\u7684\u555f\u52d5\u8207\u505c\u6b62<br \/>\n\u00a0\u00a0\u00a0 \u555f\u52d5\u670d\u52d9\u4e4b\u524d\uff0c\u6211\u5011\u5148\u7de8\u8f2f\u914d\u7f6e\u6587\u4ef6\/etc\/vsftpd.conf. \u6253\u958b\u914d\u7f6e\u6587\u4ef6\u5f8c\u53ef\u4ee5\u770b\u5230\u8a31\u591a\u4ee5\u201c#\u201d\u958b\u59cb\u7684\u884c\uff0c\u9019\u4e9b\u884c\u90fd\u662f\u8a3b\u91cb\u884c\uff0c\u5927\u591a\u662f\u5e6b\u52a9\u4fe1\u606f\uff0c\u53ef\u4ee5\u4ed4\u7d30\u95b1\u8b80\u3002vsftpd.conf\u6587\u4ef6\u7684\u6240\u6709\u9805\u76ee\u90fd\u662f\u4ee5\u201c\u53c3\u6578=\u503c \u201d\u4f86\u8a2d\u7f6e\u7684\uff0c\u5c0d\u683c\u5f0f\u8981\u6c42\u6bd4\u8f03\u56b4\u683c\uff0c\u5fc5\u9808\u56b4\u683c\u5340\u5206\u5927\u5c0f\u5beb\uff0c\u7b49\u865f\u5169\u908a\u4e0d\u80fd\u6709\u7a7a\u683c\uff0c\u6bcf\u884c\u7684\u6700\u5f8c\u4e5f\u4e0d\u80fd\u6709\u7a7a\u683c\u3002\u6bcf\u500b\u53c3\u6578\u90fd\u6709\u58f9\u500b\u9ed8\u8a8d\u503c\uff0c\u6c92\u6709\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u660e\u78ba\u6307\u5b9a\u7684\u53c3\u6578\u5c31\u6703\u4f7f\u7528\u9ed8\u8a8d\u503c\u3002\u6211\u5011\u9019\u88cf\u4e0d\u7406\u6703\u914d\u7f6e\u6587\u4ef6\u672c\u4f86\u7684\u4fe1\u606f\uff0c\u628a\u6240\u6709\u5167\u5bb9\u90fd\u522a\u6389\u6216\u8a3b\u91cb\u6389\uff0c\u6700\u5f8c\u52a0\u4e0a\u4e0b\u9762\u56db\u884c\uff0c\u6bcf\u884c\u53f3\u908a\u7684\/\/\u53ca\u5f8c\u7684\u6587\u5b57\u662f\u542b\u7fa9\u8aaa\u660e\uff0c\u4e0d\u8981\u8f38\u5165\u5230\u6587\u4ef6\u4e2d\uff1a<br \/>\n\u00a0\u00a0\u00a0 1.listen=yes \/\/vsftpd\u5de5\u4f5c\u5728standalone \u6a21\u5f0f\u4e0b\u00a0 2. 3.anonymous_enable=yes \/\/\u5141\u8a31\u533f\u540d\u7528\u6236\u767b\u9678\u670d\u52d9\u5668\u00a0 4. 5.local_enable=yes \/\/\u5141\u8a31\u672c\u5730\u7528\u6236\u767b\u9304\u5230\u670d\u52d9\u5668\u00a0 6. 7.pam_service_name=vsftpd \/\/\u4f7f\u7528PAM\u8a8d\u8b49\u00a0 8. vsftpd\u6709\u5169\u7a2e\u5de5\u4f5c\u6a21\u5f0f\uff0cstandalone\u6a21\u5f0f\u548cxinetd\u5b88\u8b77\u9032\u7a0b\u6a21\u5f0f\uff0c\u7b2c1\u884c\u5c31\u662f\u8b93\u5176\u5de5\u4f5c\u5728standalone\u6a21\u5f0f\u4e0b\u3002\u6b64\u7a2e\u6a21\u5f0f\u4e2d\uff0c\u6bcf\u6b21\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u5fc5\u9808\u91cd\u65b0\u555f\u52d5vsftpd\u670d\u52d9\u624d\u80fd\u751f\u6548\uff0c\u95dc\u65bc\u5169\u7a2e\u6a21\u5f0f\u5728\u5f8c\u9762\u6709\u8a73\u7d30\u4ecb\u7d39\u3002\u6211\u5011\u5b89\u88dd\u6642\u9084\u628a Redhat \u76ee\u9304\u4e0b\u7684 vsftpd.pam \u6587\u4ef6\u5fa9\u5236\u6210\u4e86\/etc\/pam.d\/vsftpd \u6587\u4ef6\u3002\u9019\u500b\u6587\u4ef6\u5c31\u662f\u672c\u5730\u7528\u6236\u767b\u9678\u7684 pam \u9a57\u8b49\u914d\u7f6e\u6587\u4ef6\u3002\u95dc\u65bc\u9019\u500b\u6587\u4ef6\u6211\u5011\u6703\u5728\u5f8c\u9762\u5177\u9ad4\u4ecb\u7d39\u3002\u9019\u88cf\u6211\u5011\u8981\u77e5\u9053\uff0c\u5fc5\u9808\u5f97\u6709\u9019\u500b\u914d\u7f6e\u6587\u4ef6\uff0c\u800c\u4e14\u4e3b\u914d\u7f6e\u6587\u4ef6\u88cf\u8981\u52a0\u4e0a pam_service_name=vsftpd\u8a9e\u53e5\uff0c\u6211\u5011\u624d\u80fd\u8b93\u672c\u5730\u7528\u6236\u767b\u9678\u3002\u7528\u4ee5\u4e0b\u547d\u4ee4\u555f\u52d5\u670d\u52d9\uff1a<br \/>\n\u00a0\u00a0\u00a0 1.[root@redhat vsftpd-2.3.2]# \/usr\/local\/sbin\/vsftpd &amp; \/\/\u5f8c\u81fa\u555f\u52d5vsftp\u00a0 2. \u6211\u5011\u53ef\u4ee5\u901a\u904epgrep vsftpd \u4f86\u67e5\u770bvsftpd\u670d\u52d9\u5668\u662f\u5426\u904b\u884c\u8d77\u4f86\uff1b<br \/>\n\u00a0\u00a0\u00a0 1.[root@redhat vsftpd-2.3.2]# pgrep vsftpd\u00a0 2. 3.4248\u00a0 4. \u4e0a\u9762\u986f\u793avsFTPd\u670d\u52d9\u5668\u904b\u884c\u8d77\u4f86\u4e86\uff0c\u60a8\u53ef\u4ee5\u901a\u904eftp\u547d\u4ee4\u3001lftp\u5de5\u5177\u6216gftp\u6216\u5176\u5b83\u7684FTP\u5ba2\u6236\u7aef\u4f86\u6e2c\u8a66\u9023\u63a5\uff1b<br \/>\n\u00a0\u00a0\u00a0 \u70ba\u4fdd\u8b49\u670d\u52d9\u78ba\u5be6\u555f\u52d5\uff0c\u6211\u5011\u7528\u5982\u4e0b\u547d\u4ee4\u6aa2\u6e2c\uff1a<br \/>\n\u00a0\u00a0\u00a0 1.[root@redhat vsftpd-2.3.2]# netstat -an |grep 21\u00a0 2. 3.tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN\u00a0 4. \u6211\u5011\u770b\u5230\u670d\u52d9\u5668\u5df2\u7d93\u6253\u958b\u4e86tcp21\u7aef\u53e3\uff0c\u8868\u660eftp\u78ba\u5be6\u5df2\u7d93\u555f\u52d5\u3002\u518d\u767b\u9304\u670d\u52d9\u5668\uff1a<br \/>\n\u00a0\u00a0\u00a0 1.[root@redhat vsftpd-2.3.2]# ftp 127.0.0.1\u00a0 2. 3.Connected to 127.0.0.1.\u00a0 4. 5.220 \uff08vsFTPd 2.0.5\uff09\u00a0 6. 7.530 Please login with USER and PASS.\u00a0 8. 9.530 Please login with USER and PASS.\u00a0 10. 11.KERBEROS_V4 rejected as an authentication type\u00a0 12. 13.Name \uff08127.0.0.1:root\uff09\uff1a ftp\u00a0 14. 15.331 Please specify the password.\u00a0 16. 17.Password:\u00a0 18. 19.230 Login successful.\u00a0 20. \u9019\u6642\u6211\u5011\u5df2\u7d93\u7528\u533f\u540d\u7528\u6236\uff08\u7528\u6236\u540dftp\u6216anonymous\uff0c\u5bc6\u78bc\u4efb\u610f\uff09\u767b\u9304\u5230\u670d\u52d9\u5668\u4e86\uff0c\u9084\u53ef\u4ee5\u7528\u672c\u5730\u7528\u6236\u767b\u9304\u3002\u6211\u5011\u505a\u6e2c\u8a66\u6642\u5efa\u8b70\u4f7f\u7528\u5982\u4e0a\u6240\u793a\u7684ftp\u547d\u4ee4\uff08windows\u3001Linux\u53caUnix\u90fd\u5e36\u9019\u500b\u547d\u4ee4\uff0c\u7528\u6cd5\u90fd\u662f\u58f9\u6a23\u7684\uff09\u4f86\u767b\u9304\u670d\u52d9\u5668\uff0c\u9019\u6a23\u53ef\u4ee5\u770b\u5230\u66f4\u8a73\u7d30\u7684\u4fe1\u606f\uff0c\u5c0d\u65bc\u6211\u5011\u8abf\u8a66\u670d\u52d9\u5668\u662f\u975e\u5e38\u6709\u5e6b\u52a9\u7684\u3002\u6700\u7c21\u55ae\u7684ftp\u670d\u52d9\u5668\u5c31\u5df2\u7d93\u9054\u5efa\u8d77\u4f86\u4e86\u3002<br \/>\n\u00a0\u00a0\u00a0 \u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u95dc\u9589ftp\u670d\u52d9\uff1a<br \/>\n\u00a0\u00a0\u00a0 1.[root@redhat vsftpd-2.3.2]# killall vsftpd \/\/\u6216\u662f pkill vsftpd\u00a0 2. 3.[root@redhat vsftpd-2.3.2]# pgrep vsftpd \/\/\u67e5\u770bvsftpd\u670d\u52d9\u5668\u662f\u5426\u5df2\u7d93\u95dc\u9589\u00a0 4. \u958b\u6a5f\u81ea\u555f\u52d5<br \/>\n\u00a0\u00a0\u00a0 \u7528vi\u6253\u958betc\/rc.local\u5728\u88cf\u9762\u52a0\u5165\/usr\/local\/bin\/vsftpd &amp; \u5373\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u914d\u7f6evsftpd\u670d\u52d9\uff1aLinux\u662f\u58f9\u7a2e\u958b\u6e90\u7684\u800c\u4e14\u5b89\u5168\u7684\u64cd\u4f5c\u7cfb\u7d71\uff0c\u5df2\u7d93\u6df1\u5165\u4eba\u5fc3\u3002\u4f5c\u70baLinux\u7684\u58f9\u7a2e\u6d41\u884c\u767c\u884c\u7248\u672c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[531],"tags":[734,735,617],"class_list":["post-1765","post","type-post","status-publish","format-standard","hentry","category-unix","tag-vsftpd","tag-735","tag-617"],"_links":{"self":[{"href":"https:\/\/www.killtest.hk\/index.php\/wp-json\/wp\/v2\/posts\/1765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.killtest.hk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.killtest.hk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.killtest.hk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.killtest.hk\/index.php\/wp-json\/wp\/v2\/comments?post=1765"}],"version-history":[{"count":0,"href":"https:\/\/www.killtest.hk\/index.php\/wp-json\/wp\/v2\/posts\/1765\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.killtest.hk\/index.php\/wp-json\/wp\/v2\/media?parent=1765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.killtest.hk\/index.php\/wp-json\/wp\/v2\/categories?post=1765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.killtest.hk\/index.php\/wp-json\/wp\/v2\/tags?post=1765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}