{"id":2733,"date":"2019-02-11T15:16:32","date_gmt":"2019-02-11T07:16:32","guid":{"rendered":"http:\/\/www.liangliang.org.cn\/?p=2733"},"modified":"2023-08-23T17:48:08","modified_gmt":"2023-08-23T09:48:08","slug":"vsftpd","status":"publish","type":"post","link":"https:\/\/www.liangliang.org.cn\/?p=2733","title":{"rendered":"vsftpd"},"content":{"rendered":"<p>vsftpd\u4f5c\u4e3a\u4e00\u4e2a\u4e3b\u6253\u5b89\u5168\u7684FTP\u670d\u52a1\u5668\uff0c\u6709\u5f88\u591a\u7684\u9009\u9879\u8bbe\u7f6e\u3002\u4e0b\u9762\u4ecb\u7ecd\u4e86vsftpd\u7684\u914d\u7f6e\u6587\u4ef6\u5217\u8868\uff0c\u800c\u6240\u6709\u7684\u914d\u7f6e\u90fd\u662f\u57fa\u4e8evsftpd.conf\u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\u7684\u3002\u672c\u6587\u5c06\u63d0\u4f9b\u5b8c\u6574\u7684vsftpd.conf\u7684\u4e2d\u6587\u8bf4\u660e\u3002\u5b66\u4e60\u672c\u6587\u7684\u5185\u5bb9\u5c06\u6709\u52a9\u4e8e\u4f60\u521d\u6b65\u4e86\u89e3vsftpd\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u4f46\u9488\u5bf9\u5177\u4f53\u60c5\u51b5\u8fd8\u9700\u8981\u5236\u5b9a\u5177\u4f53\u7684\u914d\u7f6e\u65b9\u6cd5\u3002<\/p>\n<p><strong>Vsftpd\u7684\u914d\u7f6e\u6587\u4ef6\uff1a<\/strong><\/p>\n<table class=\"t_table\" cellspacing=\"0\">\n<tbody>\n<tr>\n<td width=\"23%\">\n<p align=\"center\"><strong>\/etc\/vsftpd\/vsftpd.conf<\/strong><\/p>\n<\/td>\n<td width=\"76%\">\n<p align=\"center\">\u4e3b\u914d\u7f6e\u6587\u4ef6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"23%\">\n<p align=\"center\"><strong>\/usr\/sbin\/vsftpd<\/strong><\/p>\n<\/td>\n<td width=\"76%\">\n<p align=\"center\"><strong>Vsftpd<\/strong>\u00a0\u7684\u4e3b\u7a0b\u5e8f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"23%\">\n<p align=\"center\"><strong>\/etc\/rc.d\/init.d\/vsftpd<\/strong><\/p>\n<\/td>\n<td width=\"76%\">\n<p align=\"center\">\u542f\u52a8\u811a\u672c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"23%\">\n<p align=\"center\"><strong>\/etc\/pam.d\/vsftpd<\/strong><\/p>\n<\/td>\n<td width=\"76%\">\n<p align=\"center\"><strong>PAM<\/strong>\u00a0\u8ba4\u8bc1\u6587\u4ef6\uff08\u6b64\u6587\u4ef6\u4e2dfile=\/etc\/vsftpd\/ftpusers\u5b57\u6bb5\uff0c\u6307\u660e\u963b\u6b62\u8bbf\u95ee\u7684\u7528\u6237\u6765\u81ea\/etc\/vsftpd\/ftpusers\u6587\u4ef6\u4e2d\u7684\u7528\u6237\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"23%\">\n<p align=\"center\"><strong>\/etc\/vsftpd\/ftpusers<\/strong><\/p>\n<\/td>\n<td width=\"76%\">\n<p align=\"center\">\u7981\u6b62\u4f7f\u7528<strong>vsftpd<\/strong>\u00a0\u7684\u7528\u6237\u5217\u8868\u6587\u4ef6\u3002\u8bb0\u5f55\u4e0d\u5141\u8bb8\u8bbf\u95eeFTP\u670d\u52a1\u5668\u7684\u7528\u6237\u540d\u5355\uff0c\u7ba1\u7406\u5458\u53ef\u4ee5\u628a\u4e00\u4e9b\u5bf9\u7cfb\u7edf\u5b89\u5168\u6709\u5a01\u80c1\u7684\u7528\u6237\u8d26\u53f7\u8bb0\u5f55\u5728\u6b64\u6587\u4ef6\u4e2d\uff0c\u4ee5\u514d\u7528\u6237\u4eceFTP\u767b\u5f55\u540e\u83b7\u5f97\u5927\u4e8e\u4e0a\u4f20\u4e0b\u8f7d\u64cd\u4f5c\u7684\u6743\u5229\uff0c\u800c\u5bf9\u7cfb\u7edf\u9020\u6210\u635f\u574f\u3002\uff08\u6ce8\u610f\uff1a\u00a0<strong>linux-4\u00a0<\/strong>\u4e2d\u6b64\u6587\u4ef6\u5728\u00a0<strong>\/etc\/\u00a0<\/strong>\u76ee\u5f55\u4e0b\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"23%\">\n<p align=\"center\"><strong>\/etc\/vsftpd\/user_list<\/strong><\/p>\n<\/td>\n<td width=\"76%\">\n<p align=\"center\">\u7981\u6b62\u6216\u5141\u8bb8\u4f7f\u7528<strong>vsftpd<\/strong>\u00a0\u7684\u7528\u6237\u5217\u8868\u6587\u4ef6\u3002\u8fd9\u4e2a\u6587\u4ef6\u4e2d\u6307\u5b9a\u7684\u7528\u6237\u7f3a\u7701\u60c5\u51b5\uff08\u5373\u5728<strong>\/etc\/vsftpd\/vsftpd.conf<\/strong>\u00a0\u4e2d\u8bbe\u7f6e<strong>userlist_deny=YES<\/strong>\uff09\u4e0b\u4e5f\u4e0d\u80fd\u8bbf\u95eeFTP\u670d\u52a1\u5668\uff0c\u5728\u8bbe\u7f6e\u4e86<strong>userlist_deny=NO<\/strong>\u00a0\u65f6,\u4ec5\u5141\u8bb8<strong>user_list<\/strong>\u00a0\u4e2d\u6307\u5b9a\u7684\u7528\u6237\u8bbf\u95ee<strong>FTP<\/strong>\u00a0\u670d\u52a1\u5668\u3002\uff08\u6ce8\u610f\uff1a\u00a0<strong>linux-4\u00a0<\/strong>\u4e2d\u6b64\u6587\u4ef6\u5728\u00a0<strong>\/etc\/\u00a0<\/strong>\u76ee\u5f55\u4e0b\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"23%\">\n<p align=\"center\"><strong>\/var\/ftp<\/strong><\/p>\n<\/td>\n<td width=\"76%\">\n<p align=\"center\">\u533f\u540d\u7528\u6237\u4e3b\u76ee\u5f55\uff1b\u672c\u5730\u7528\u6237\u4e3b\u76ee\u5f55\u4e3a\uff1a<strong>\/home\/<\/strong>\u00a0<strong>\u7528\u6237\u4e3b\u76ee\u5f55<\/strong>\u00a0\uff0c\u5373\u767b\u5f55\u540e\u8fdb\u5165\u81ea\u5df1\u5bb6\u76ee\u5f55<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"23%\">\n<p align=\"center\"><strong>\/var\/ftp\/pub<\/strong><\/p>\n<\/td>\n<td width=\"76%\">\n<p align=\"center\">\u533f\u540d\u7528\u6237\u7684\u4e0b\u8f7d\u76ee\u5f55\uff0c\u6b64\u76ee\u5f55\u9700\u8d4b\u6743\u6839<strong>chmod 1777 pub<\/strong>\u00a0\uff08<strong>1<\/strong>\u00a0\u4e3a\u7279\u6b8a\u6743\u9650\uff0c\u4f7f\u4e0a\u8f7d\u540e\u65e0\u6cd5\u5220\u9664\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"23%\">\n<p align=\"center\"><strong>\/etc\/logrotate.d\/vsftpd.log<\/strong><\/p>\n<\/td>\n<td width=\"76%\">\n<p align=\"center\"><strong>Vsftpd<\/strong>\u00a0\u7684\u65e5\u5fd7\u6587\u4ef6<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>vsftpd<\/strong>\u00a0<strong>\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\/etc\/vsftpd\/vsftpd.conf<\/strong>\u00a0<strong>\u8bf4\u660e(<\/strong>\u00a0<strong>\u4fee\u6539\u524d\u5148\u5907\u4efd)<\/strong>\u00a0<strong>\uff1a<\/strong><\/p>\n<h1>Example config file \/etc\/vsftpd\/vsftpd.conf<\/h1>\n<h1>The default compiled in settings are fairly paranoid. This sample file<\/h1>\n<h1>loosens things up a bit, to make the ftp daemon more usable.<\/h1>\n<h1>Please see vsftpd.conf.5 for all compiled in defaults.<\/h1>\n<h1>READ THIS: This example file is NOT an exhaustive list of vsftpd options.<\/h1>\n<h1>Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's<\/h1>\n<h1>capabilities.<\/h1>\n<h1>Allow anonymous FTP? (Beware - allowed by default if you comment this out).<\/h1>\n<p><strong>anonymous_enable=YES<\/strong>\u00a0\uff08\u00a0\u662f\u5426\u5141\u8bb8\u00a0\u533f\u540d\u767b\u5f55FTP\u670d\u52a1\u5668\uff0c\u9ed8\u8ba4\u8bbe\u7f6e\u4e3aYES\u5141\u8bb8\uff0c\u5373\u7528\u6237\u53ef\u4f7f\u7528\u7528\u6237\u540dftp\u6216anonymous\u8fdb\u884cftp\u767b\u5f55\uff0c\u53e3\u4ee4\u4e3a\u7528\u6237\u7684E-mail\u5730\u5740\u3002\u5982\u4e0d\u5141\u8bb8\u533f\u540d\u8bbf\u95ee\u53bb\u6389\u524d\u9762#\u5e76\u8bbe\u7f6e\u4e3aNO\u00a0\uff09<\/p>\n<h1>Uncomment this to allow local users to log in.<\/h1>\n<p><strong>local_enable=YES<\/strong>\u00a0\uff08\u662f\u5426\u5141\u8bb8\u672c\u5730\u7528\u6237\u00a0(\u00a0\u5373\u00a0linux\u00a0\u7cfb\u7edf\u4e2d\u7684\u7528\u6237\u5e10\u53f7)\u00a0\u767b\u5f55FTP\u670d\u52a1\u5668\uff0c\u9ed8\u8ba4\u8bbe\u7f6e\u4e3aYES\u5141\u8bb8\uff0c\u00a0\u672c\u5730\u7528\u6237\u767b\u5f55\u540e\u4f1a\u8fdb\u5165\u7528\u6237\u4e3b\u76ee\u5f55\uff0c\u800c\u533f\u540d\u7528\u6237\u767b\u5f55\u540e\u8fdb\u5165\u533f\u540d\u7528\u6237\u7684\u4e0b\u8f7d\u76ee\u5f55\/var\/ftp\/pub\u00a0\uff1b\u82e5\u53ea\u5141\u8bb8\u533f\u540d\u7528\u6237\u8bbf\u95ee\uff0c\u524d\u9762\u52a0\u4e0a#\uff0c\u53ef\u963b\u6b62\u672c\u5730\u7528\u6237\u8bbf\u95eeFTP\u670d\u52a1\u5668\u3002\uff09<\/p>\n<h1>Uncomment this to enable any form of FTP write command.<\/h1>\n<p><strong>write_enable=YES<\/strong>\u00a0\u00a0\u00a0\uff08\u00a0\u662f\u5426\u5141\u8bb8\u672c\u5730\u7528\u6237\u5bf9\u00a0FTP\u00a0\u670d\u52a1\u5668\u6587\u4ef6\u5177\u6709\u5199\u6743\u9650\u00a0\uff0c\u00a0\u9ed8\u8ba4\u8bbe\u7f6e\u4e3a\u00a0YES\u00a0\u5141\u8bb8\u00a0\uff09<\/p>\n<h1>Default umask for local users is 077. You may wish to change this to 022,<\/h1>\n<h1>if your users expect that (022 is used by most other ftpd's)<\/h1>\n<p><strong>#<\/strong>\u00a0<strong>local_umask=022<\/strong>\u00a0\uff08\u6216\u5176\u5b83\u503c\uff0c\u8bbe\u7f6e\u672c\u5730\u7528\u6237\u7684\u6587\u4ef6\u63a9\u7801\u00a0\u4e3a\u7f3a\u7701022\u00a0\uff0c\u4e5f\u53ef\u6839\u636e\u4e2a\u4eba\u559c\u597d\u5c06\u5176\u8bbe\u7f6e\u4e3a\u5176\u4ed6\u503c\uff0c\u9ed8\u8ba4\u503c\u4e3a077\uff09<\/p>\n<h1>Uncomment this to allow the anonymous FTP user to upload files. This only<\/h1>\n<h1>has an effect if the above global write enable is activated. Also, you will<\/h1>\n<h1>obviously need to create a directory writable by the FTP user.<\/h1>\n<p><strong>#anon_upload_enable=YES<\/strong>\u00a0\uff08\u00a0\u662f\u5426\u5141\u8bb8\u533f\u540d\u7528\u6237\u4e0a\u4f20\u6587\u4ef6\uff0c\u987b\u5c06\u00a0<strong>write_enable=YES<\/strong>\u00a0\uff0c\u00a0\u9ed8\u8ba4\u8bbe\u7f6e\u4e3aYES\u00a0\u5141\u8bb8\u00a0\uff09<\/p>\n<h1>Uncomment this if you want the anonymous FTP user to be able to create<\/h1>\n<h1>new directories.<\/h1>\n<p><strong>#anon_mkdir_write_enable=YES<\/strong>\u00a0\u00a0\u00a0\uff08\u00a0\u662f\u5426\u5141\u8bb8\u533f\u540d\u7528\u6237\u521b\u5efa\u65b0\u6587\u4ef6\u5939\u00a0\uff0c\u00a0\u9ed8\u8ba4\u8bbe\u7f6e\u4e3a\u00a0YES\u00a0\u5141\u8bb8\u00a0\uff09<\/p>\n<h1>Activate directory messages - messages given to remote users when they<\/h1>\n<h1>go into a certain directory.<\/h1>\n<p><strong>#dirmessage_enable=YES<\/strong>\u00a0\uff08\u00a0\u662f\u5426\u6fc0\u6d3b\u76ee\u5f55\u6b22\u8fce\u4fe1\u606f\u529f\u80fd\u00a0\uff0c\u00a0\u5f53\u7528\u6237\u7528\u00a0CMD\u00a0 \u00a0\u00a0\u00a0\u00a0\u6a21\u5f0f\u9996\u6b21\u8bbf\u95ee\u670d\u52a1\u5668\u4e0a\u67d0\u4e2a\u76ee\u5f55\u65f6\u00a0\uff0cFTP\u00a0\u670d\u52a1\u5668\u5c06\u663e\u793a\u6b22\u8fce\u4fe1\u606f\u00a0\uff0c\u00a0\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u00a0\uff0c\u00a0\u6b22\u8fce\u4fe1\u606f\u662f\u901a\u8fc7\u00a0\u8be5\u00a0\u76ee\u5f55\u4e0b\u7684\u00a0.message\u00a0\u6587\u4ef6\u83b7\u5f97\u7684\uff0c\u6b64\u6587\u4ef6\u4fdd\u5b58\u81ea\u5b9a\u4e49\u7684\u6b22\u8fce\u4fe1\u606f\uff0c\u7531\u7528\u6237\u81ea\u5df1\u5efa\u7acb\uff09<\/p>\n<h1>Activate logging of uploads\/downloads.<\/h1>\n<p><strong>xferlog_enable=YES<\/strong>\u00a0\uff08\u00a0\u9ed8\u8ba4\u503c\u4e3a\u00a0NO\u00a0\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u7cfb\u7edf\u5c06\u4f1a\u7ef4\u62a4\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u4f20\u548c\u4e0b\u8f7d\u60c5\u51b5\u7684\u65e5\u5fd7\u6587\u4ef6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u8be5\u65e5\u5fd7\u6587\u4ef6\u4e3a\/var\/log\/vsftpd.log,\u4e5f\u53ef\u4ee5\u901a\u8fc7\u4e0b\u9762\u7684\u00a0xferlog_file\u9009\u9879\u5bf9\u5176\u8fdb\u884c\u8bbe\u5b9a\u3002\uff09<\/p>\n<h1>Make sure PORT transfer connections originate from port 20 (ftp-data).<\/h1>\n<p><strong>connect_from_port_20=YES<\/strong>\u00a0\uff08\u00a0\u8bbe\u5b9a\u00a0FTP\u00a0\u670d\u52a1\u5668\u5c06\u542f\u7528\u00a0FTP\u00a0\u6570\u636e\u7aef\u53e3\u7684\u8fde\u63a5\u8bf7\u6c42\u00a0,ftp-data\u00a0\u6570\u636e\u4f20\u8f93\u00a0\uff0c21\u00a0\u4e3a\u8fde\u63a5\u63a7\u5236\u7aef\u53e3\u00a0\uff09<\/p>\n<h1>If you want, you can arrange for uploaded anonymous files to be owned by<\/h1>\n<h1>a different user. Note! Using \"root\" for uploaded files is not<\/h1>\n<h1>recommended!-\u6ce8\u610f\uff0c\u4e0d\u63a8\u8350\u4f7f\u7528root\u7528\u6237\u4e0a\u4f20\u6587\u4ef6<\/h1>\n<p><strong>#chown_uploads=YES<\/strong>\u00a0\uff08\u00a0\u8bbe\u5b9a\u662f\u5426\u5141\u8bb8\u00a0\u6539\u53d8\u00a0\u4e0a\u4f20\u6587\u4ef6\u7684\u5c5e\u4e3b\u00a0\uff0c\u00a0\u4e0e\u4e0b\u9762\u4e00\u4e2a\u8bbe\u5b9a\u9879\u914d\u5408\u4f7f\u7528\u00a0\uff09<br \/>\n<strong>#chown_username=whoeve<\/strong>\u00a0r\u00a0\uff08\u00a0\u8bbe\u7f6e\u60f3\u8981\u6539\u53d8\u7684\u4e0a\u4f20\u6587\u4ef6\u7684\u5c5e\u4e3b\u00a0\uff0c\u00a0\u5982\u679c\u9700\u8981\u00a0\uff0c\u00a0\u5219\u8f93\u5165\u4e00\u4e2a\u7cfb\u7edf\u7528\u6237\u540d\uff0c\u00a0\u4f8b\u5982\u53ef\u4ee5\u628a\u4e0a\u4f20\u7684\u6587\u4ef6\u90fd\u6539\u6210\u00a0root\u00a0\u5c5e\u4e3b\u3002whoever\uff1a\u4efb\u4f55\u4eba\uff09<\/p>\n<h1>You may override where the log file goes if you like. The default is shown<\/h1>\n<h1>below.<\/h1>\n<p><strong>#xferlog_file=\/var\/log\/vsftpd.log<\/strong>\u00a0(\u00a0\u8bbe\u5b9a\u7cfb\u7edf\u7ef4\u62a4\u8bb0\u5f55FTP\u670d\u52a1\u5668\u4e0a\u4f20\u548c\u4e0b\u8f7d\u60c5\u51b5\u7684\u65e5\u5fd7\u6587\u4ef6\uff0c\/var\/log\/vsftpd.log\u662f\u9ed8\u8ba4\u7684\uff0c\u4e5f\u53ef\u4ee5\u53e6\u8bbe\u5176\u5b83)<\/p>\n<h1>If you want, you can have your log file in standard ftpd xferlog format<\/h1>\n<p><strong>#xferlog_std_format=YES<\/strong>\u00a0\uff08\u00a0\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\u00a0\uff0c\u00a0\u4f20\u8f93\u65e5\u5fd7\u6587\u4ef6\u5c06\u4ee5\u6807\u51c6\u00a0xferlog\u00a0\u7684\u683c\u5f0f\u4e66\u5199\uff0c\u8be5\u683c\u5f0f\u7684\u65e5\u5fd7\u6587\u4ef6\u9ed8\u8ba4\u4e3a\/var\/log\/xferlog,\u4e5f\u53ef\u4ee5\u901a\u8fc7xferlog_file\u9009\u9879\u5bf9\u5176\u8fdb\u884c\u8bbe\u5b9a\uff0c\u9ed8\u8ba4\u503c\u4e3aNO\uff09<br \/>\n<strong>#dual_log_enable<\/strong>\u00a0(\u00a0\u5982\u679c\u6dfb\u52a0\u5e76\u542f\u7528\u6b64\u9009\u9879\uff0c\u5c06\u751f\u6210\u4e24\u4e2a\u76f8\u4f3c\u7684\u65e5\u5fd7\u6587\u4ef6\uff0c\u9ed8\u8ba4\u5728\/var\/log\/xferlog\u548c\/var\/log\/vsftpd.log\u76ee\u5f55\u4e0b\u3002\u524d\u8005\u662fwu_ftpd\u7c7b\u578b\u7684\u4f20\u8f93\u65e5\u5fd7\uff0c\u53ef\u4ee5\u5229\u7528\u6807\u51c6\u65e5\u5fd7\u5de5\u5177\u5bf9\u5176\u8fdb\u884c\u5206\u6790\uff1b\u540e\u8005\u662fvsftpd\u7c7b\u578b\u7684\u65e5\u5fd7)<br \/>\n<strong>#syslog_enable<\/strong>\u00a0(\u00a0\u5982\u679c\u6dfb\u52a0\u5e76\u542f\u7528\u6b64\u9009\u9879\uff0c\u5219\u539f\u672c\u5e94\u8be5\u8f93\u51fa\u5230\/var\/log\/vsftpd.log\u4e2d\u7684\u65e5\u5fd7\uff0c\u5c06\u8f93\u51fa\u5230\u7cfb\u7edf\u65e5\u5fd7\u4e2d)<\/p>\n<h1>You may change the default value for timing out an idle session.<\/h1>\n<p><strong>#idle_session_timeout=600<\/strong>\u00a0\uff08\u8bbe\u7f6e\u6570\u636e\u4f20\u8f93\u4e2d\u65ad\u95f4\u9694\u65f6\u95f4\uff0c\u6b64\u8bed\u53e5\u8868\u793a\u7a7a\u95f2\u7684\u7528\u6237\u4f1a\u8bdd\u4e2d\u65ad\u65f6\u95f4\u4e3a600\u79d2\uff0c\u5373\u5f53\u6570\u636e\u4f20\u8f93\u7ed3\u675f\u540e\uff0c\u7528\u6237\u8fde\u63a5FTP\u670d\u52a1\u5668\u7684\u65f6\u95f4\u4e0d\u5e94\u8d85\u8fc7600\u79d2\uff0c\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5bf9\u8be5\u503c\u8fdb\u884c\u4fee\u6539\uff09<\/p>\n<h1>You may change the default value for timing out a data connection.<\/h1>\n<p><strong>#data_connection_timeout=120<\/strong>\u00a0\uff08\u00a0\u8bbe\u7f6e\u6570\u636e\u8fde\u63a5\u8d85\u65f6\u65f6\u95f4\u00a0\uff0c\u00a0\u8be5\u8bed\u53e5\u8868\u793a\u6570\u636e\u8fde\u63a5\u8d85\u65f6\u65f6\u95f4\u4e3a\u00a0120\u00a0\u79d2\uff0c\u00a0\u53ef\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5bf9\u5176\u4e2a\u4fee\u6539\u00a0\uff09<\/p>\n<h1>It is recommended that you define on your system a unique user which the<\/h1>\n<h1>ftp server can use as a totally isolated and unprivileged user.<\/h1>\n<p><strong>#nopriv_user=ftpsecure\u00a0<\/strong>\uff08\u00a0\u8fd0\u884c\u00a0vsftpd\u00a0\u9700\u8981\u7684\u975e\u7279\u6743\u7cfb\u7edf\u7528\u6237\uff0c\u7f3a\u7701\u662fnobody\uff09<\/p>\n<h1>Enable this and the server will recognise asynchronous ABOR requests. Not<\/h1>\n<h1>recommended for security (the code is non-trivial). Not enabling it,<\/h1>\n<h1>however, may confuse older FTP clients.<\/h1>\n<p><strong>#async_abor_enable=YES<\/strong>\u00a0\uff08\u00a0\u5982\u679c\u00a0FTP client\u00a0\u4f1a\u4e0b\u8fbe\u201casync ABOR\u201d\u8fd9\u4e2a\u6307\u4ee4\u65f6\uff0c\u8fd9\u4e2a\u8bbe\u5b9a\u624d\u9700\u8981\u542f\u7528\uff0c\u800c\u4e00\u822c\u6b64\u8bbe\u5b9a\u5e76\u4e0d\u5b89\u5168\uff0c\u6240\u4ee5\u901a\u5e38\u5c06\u5176\u53d6\u6d88\uff09<\/p>\n<h1>By default the server will pretend to allow ASCII mode but in fact ignore<\/h1>\n<h1>the request. Turn on the below options to have the server actually do ASCII<\/h1>\n<h1>mangling on files when in ASCII mode.<\/h1>\n<h1>Beware that on some FTP servers, ASCII support allows a denial of service<\/h1>\n<h1>attack (DoS) via the command \"SIZE \/big\/file\" in ASCII mode. vsftpd<\/h1>\n<h1>predicted this attack and has always been safe, reporting the size of the<\/h1>\n<h1>raw file.<\/h1>\n<h1>ASCII mangling is a horrible feature of the protocol.<\/h1>\n<p><strong>#ascii_upload_enable=YES<\/strong>\u00a0\uff08\u00a0\u5927\u591a\u6570\u00a0FTP\u00a0\u670d\u52a1\u5668\u90fd\u9009\u62e9\u7528\u00a0ASCII\u00a0\u65b9\u5f0f\u4f20\u8f93\u6570\u636e\u00a0\uff0c\u00a0\u5c06\u00a0#\u00a0\u53bb\u6389\u5c31\u80fd\u5b9e\u73b0\u7528\u00a0ASCII\u00a0\u65b9\u5f0f\u4e0a\u4f20\u548c\u4e0b\u8f7d\u6587\u4ef6\u00a0\uff09<br \/>\n<strong>#ascii_download_enable=YES<\/strong>\u00a0\uff08\u00a0\u5c06\u00a0#\u00a0\u53bb\u6389\u5c31\u80fd\u5b9e\u73b0\u7528\u00a0ASCII\u00a0\u65b9\u5f0f\u4e0b\u8f7d\u6587\u4ef6\u00a0\uff09<\/p>\n<h1>You may fully customise the login banner string:<\/h1>\n<p><strong>#ftpd_banner=Welcome to blah FTP service.<\/strong>\u00a0\uff08\u5c06#\u53bb\u6389\u53ef\u8bbe\u7f6e\u767b\u5f55FTP\u670d\u52a1\u5668\u65f6\u663e\u793a\u7684\u6b22\u8fce\u4fe1\u606f\uff0c\u53ef\u4ee5\u4fee\u6539=\u540e\u7684\u6b22\u8fce\u4fe1\u606f\u5185\u5bb9\u3002\u53e6\u5916\u5982\u5728\u9700\u8981\u8bbe\u7f6e\u66f4\u6539\u76ee\u5f55\u6b22\u8fce\u4fe1\u606f\u7684\u76ee\u5f55\u4e0b\u521b\u5efa\u540d\u4e3a\u00a0.message\u00a0\u7684\u6587\u4ef6\uff0c\u5e76\u5199\u5165\u6b22\u8fce\u4fe1\u606f\u4fdd\u5b58\u540e\uff0c\u5728\u8fdb\u5165\u5230\u6b64\u76ee\u5f55\u4f1a\u663e\u793a\u81ea\u5b9a\u4e49\u6b22\u8fce\u4fe1\u606f\u00a0\uff09<\/p>\n<h1>You may specify a file of disallowed anonymous e-mail addresses. Apparently<\/h1>\n<h1>useful for combatting certain DoS attacks.<\/h1>\n<p><strong>#deny_email_enable=YES<\/strong>\u00a0\uff08\u00a0\u53ef\u5c06\u67d0\u4e9b\u7279\u6b8a\u7684\u00a0email address\u00a0\u62b5\u6321\u4f4f\u3002\u5982\u679c\u4ee5anonymous\u767b\u5f55\u670d\u52a1\u5668\u65f6\uff0c\u4f1a\u8981\u6c42\u8f93\u5165\u5bc6\u7801\uff0c\u4e5f\u5c31\u662f\u60a8\u7684email address,\u5982\u679c\u5f88\u8ba8\u538c\u67d0\u4e9bemail address\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528\u6b64\u8bbe\u5b9a\u6765\u53d6\u6d88\u4ed6\u7684\u767b\u5f55\u6743\u9650\uff0c\u4f46\u5fc5\u987b\u4e0e\u4e0b\u9762\u7684\u8bbe\u7f6e\u9879\u914d\u5408\u00a0\uff09<\/p>\n<h1>(default follows)<\/h1>\n<p><strong>#banned_email_file=\/etc\/vsftpd\/banned_emails<\/strong>\u00a0\uff08\u5f53\u4e0a\u9762\u7684\u00a0deny_email_enable=YES\u00a0\u65f6\uff0c\u53ef\u4ee5\u5229\u7528\u8fd9\u4e2a\u8bbe\u5b9a\u9879\u6765\u89c4\u5b9a\u90a3\u4e2aemail address\u4e0d\u53ef\u767b\u5f55vsftpd\u670d\u52a1\u5668\uff0c\u6b64\u6587\u4ef6\u9700\u7528\u6237\u81ea\u5df1\u521b\u5efa\uff0c\u4e00\u884c\u4e00\u4e2aemail address\u5373\u53ef\uff01\u00a0\uff09<\/p>\n<h1>You may specify an explicit list of local users to chroot() to their home<\/h1>\n<h1>directory. If chroot_local_user is YES, then this list becomes a list of<\/h1>\n<h1>users to NOT chroot().<\/h1>\n<p><strong>#chroot_list_enable=YES<\/strong>\u00a0\uff08\u00a0\u8bbe\u7f6e\u4e3a\u00a0NO\u00a0\u65f6\uff0c\u7528\u6237\u767b\u5f55FTP\u670d\u52a1\u5668\u540e\u5177\u6709\u8bbf\u95ee\u81ea\u5df1\u76ee\u5f55\u4ee5\u5916\u7684\u5176\u4ed6\u6587\u4ef6\u7684\u6743\u9650\uff0c\u00a0\u8bbe\u7f6e\u4e3a\u00a0YES\u00a0\u65f6\u00a0\uff0c\u00a0\u7528\u6237\u88ab\u9501\u5b9a\u5728\u81ea\u5df1\u7684\u00a0home\u00a0\u76ee\u5f55\u4e2d\uff0cvsftpd\u5c06\u5728\u4e0b\u9762\u00a0chroot_list_file\u9009\u9879\u503c\u7684\u4f4d\u7f6e\u5bfb\u627e\u00a0chroot_list\u6587\u4ef6\uff0c\u6b64\u6587\u4ef6\u9700\u7528\u6237\u5efa\u7acb,\u518d\u5c06\u9700\u9501\u5b9a\u5728\u81ea\u5df1home\u76ee\u5f55\u7684\u7528\u6237\u5217\u5165\u5176\u4e2d\uff0c\u6bcf\u884c\u4e00\u4e2a\u7528\u6237\uff09<\/p>\n<h1>(default follows)<\/h1>\n<p><strong>#chroot_list_file=\/etc\/vsftpd\/chroot_list<\/strong>\u00a0\uff08\u00a0\u6b64\u6587\u4ef6\u9700\u81ea\u5df1\u5efa\u7acb\u00a0\uff0c\u00a0\u88ab\u5217\u5165\u6b64\u6587\u4ef6\u7684\u7528\u6237\u00a0\uff0c\u00a0\u5728\u767b\u5f55\u540e\u5c06\u4e0d\u80fd\u5207\u6362\u5230\u81ea\u5df1\u76ee\u5f55\u4ee5\u5916\u7684\u5176\u4ed6\u76ee\u5f55\u00a0\uff0c\u00a0\u7531\u00a0FTP\u00a0\u670d\u52a1\u5668\u81ea\u52a8\u5730\u00a0chrooted\u00a0\u5230\u7528\u6237\u81ea\u5df1\u7684home\u76ee\u5f55\u4e0b\uff0c\u4f7f\u5f97\u00a0chroot_list\u6587\u4ef6\u4e2d\u7684\u7528\u6237\u4e0d\u80fd\u968f\u610f\u8f6c\u5230\u5176\u4ed6\u7528\u6237\u7684FTP home\u76ee\u5f55\u4e0b\uff0c\u4ece\u800c\u6709\u5229\u4e8eFTP\u670d\u52a1\u5668\u7684\u5b89\u5168\u7ba1\u7406\u548c\u9690\u79c1\u4fdd\u62a4\uff09<\/p>\n<h1>You may activate the \"-R\" option to the builtin ls. This is disabled by<\/h1>\n<h1>default to avoid remote users being able to cause excessive I\/O on large<\/h1>\n<h1>sites. However, some broken FTP clients such as \"ncftp\" and \"mirror\" assume<\/h1>\n<h1>the presence of the \"-R\" option, so there is a strong case for enabling it.<\/h1>\n<p><strong>#ls_recurse_enable=YES<\/strong>\u00a0<strong>\uff08<\/strong>\u00a0\u662f\u5426\u5141\u8bb8\u9012\u5f52\u67e5\u8be2\u00a0\uff0c\u00a0\u5927\u578b\u7ad9\u70b9\u7684\u00a0FTP\u00a0\u670d\u52a1\u5668\u542f\u7528\u6b64\u9879\u53ef\u4ee5\u65b9\u4fbf\u8fdc\u7a0b\u7528\u6237\u67e5\u8be2\u00a0<strong>\uff09<\/strong><\/p>\n<h1>When \"listen\" directive is enabled, vsftpd runs in standalone mode and<\/h1>\n<h1>listens on IPv4 sockets. This directive cannot be used in conjunction<\/h1>\n<h1>with the listen_ipv6 directive.<\/h1>\n<p><strong>listen=YES<\/strong>\u00a0\uff08\u00a0\u5982\u679c\u8bbe\u7f6e\u4e3a\u00a0YES\u00a0\uff0c\u00a0\u5219\u00a0vsftpd\u00a0\u5c06\u4ee5\u72ec\u7acb\u6a21\u5f0f\u8fd0\u884c\uff0c\u7531vsftpd\u81ea\u5df1\u76d1\u542c\u548c\u5904\u7406\u8fde\u63a5\u8bf7\u6c42\uff09<\/p>\n<h1>This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6<\/h1>\n<h1>sockets, you must run two copies of vsftpd whith two configuration files.<\/h1>\n<h1>Make sure, that one of the listen options is commented !!<\/h1>\n<p><strong>#listen_ipv6=YES<\/strong>\u00a0(\u00a0\u8bbe\u5b9a\u662f\u5426\u652f\u6301IPV6)<br \/>\n<strong>#pam_service_name=vsftpd<\/strong>\u00a0\uff08\u00a0\u8bbe\u7f6e\u00a0PAM\u00a0\u5916\u6302\u6a21\u5757\u63d0\u4f9b\u7684\u8ba4\u8bc1\u670d\u52a1\u6240\u4f7f\u7528\u7684\u914d\u7f6e\u6587\u4ef6\u540d\u00a0\uff0c\u5373\/etc\/pam.d\/vsftpd\u6587\u4ef6\uff0c\u6b64\u6587\u4ef6\u4e2dfile=\/etc\/vsftpd\/ftpusers\u5b57\u6bb5\uff0c\u8bf4\u660e\u4e86PAM\u6a21\u5757\u80fd\u62b5\u6321\u7684\u5e10\u53f7\u5185\u5bb9\u6765\u81ea\u6587\u4ef6\/etc\/vsftpd\/ftpusers\u4e2d\uff09<br \/>\n<strong>#userlist_enable=YES\/NO<\/strong>\u00a0\uff08\u6b64\u9009\u9879\u9ed8\u8ba4\u503c\u4e3aNO ,\u6b64\u65f6ftpusers\u6587\u4ef6\u4e2d\u7684\u7528\u6237\u7981\u6b62\u767b\u5f55FTP\u670d\u52a1\u5668\uff1b\u82e5\u6b64\u9879\u8bbe\u4e3aYES\uff0c\u5219\u00a0user_list\u6587\u4ef6\u4e2d\u7684\u7528\u6237\u5141\u8bb8\u767b\u5f55\u00a0 \u00a0FTP\u670d\u52a1\u5668\uff0c\u800c\u5982\u679c\u540c\u65f6\u8bbe\u7f6e\u4e86\u00a0userlist_deny=YES\u00a0\uff0c\u5219user_list\u6587\u4ef6\u4e2d\u7684\u7528\u6237\u5c06\u4e0d\u5141\u8bb8\u767b\u5f55FTP\u670d\u52a1\u5668\uff0c\u751a\u81f3\u8fde\u8f93\u5165\u5bc6\u7801\u63d0\u793a\u4fe1\u606f\u90fd\u6ca1\u6709\uff0c\u76f4\u63a5\u88abFTP\u670d\u52a1\u5668\u62d2\u7edd\uff09<br \/>\n<strong>#userlist_deny=YES\/NO<\/strong>\u00a0\uff08\u6b64\u9879\u9ed8\u8ba4\u4e3aYES\uff0c\u8bbe\u7f6e\u662f\u5426\u963b\u626fuser_list\u6587\u4ef6\u4e2d\u7684\u7528\u6237\u767b\u5f55FTP\u670d\u52a1\u5668\uff09<br \/>\n<strong>tcp_wrappers=YES<\/strong>\u00a0\uff08\u00a0\u8868\u660e\u670d\u52a1\u5668\u4f7f\u7528\u00a0tcp_wrappers\u00a0\u4f5c\u4e3a\u4e3b\u673a\u8bbf\u95ee\u63a7\u5236\u65b9\u5f0f\uff0ctcp_wrappers\u53ef\u4ee5\u5b9e\u73b0linux\u7cfb\u7edf\u4e2d\u7f51\u7edc\u670d\u52a1\u7684\u57fa\u4e8e\u4e3b\u673a\u5730\u5740\u7684\u8bbf\u95ee\u63a7\u5236\uff0c\u5728\/etc\u76ee\u5f55\u4e2d\u7684hosts.allow\u548chosts.deny\u4e24\u4e2a\u6587\u4ef6\u7528\u4e8e\u8bbe\u7f6etcp_wrappers\u7684\u8bbf\u95ee\u63a7\u5236\uff0c\u524d\u8005\u8bbe\u7f6e\u5141\u8bb8\u8bbf\u95ee\u8bb0\u5f55\uff0c\u540e\u8005\u8bbe\u7f6e\u62d2\u7edd\u8bbf\u95ee\u8bb0\u5f55\u3002\u4f8b\u5982\u60f3\u9650\u5236\u67d0\u4e9b\u4e3b\u673a\u5bf9FTP\u670d\u52a1\u5668192.168.57.2\u7684\u533f\u540d\u8bbf\u95ee\uff0c\u7f16\u7f09<strong>\/etc\/hosts.allow<\/strong>\u00a0\u6587\u4ef6\uff0c\u5982\u5728\u4e0b\u9762\u589e\u52a0\u4e24\u884c\u547d\u4ee4\uff1a<strong>vsftpd:192.168.57.1:DENY\u00a0<\/strong>\u548c<strong>vsftpd:192.168.57.9:DENY<\/strong>\u00a0\u8868\u660e\u9650\u5236IP\u4e3a192.168.57.1\/192.168.57.9\u4e3b\u673a\u8bbf\u95eeIP\u4e3a192.168.57.2\u7684FTP\u670d\u52a1\u5668\uff0c\u6b64\u65f6FTP\u670d\u52a1\u5668\u867d\u53ef\u4ee5PING\u901a\uff0c\u4f46\u65e0\u6cd5\u8fde\u63a5\uff09<br \/>\n<strong>\u5728FTP\u670d\u52a1\u5668\u7684\u7ba1\u7406\u4e2d\u65e0\u8bba\u5bf9\u672c\u5730\u7528\u6237\u8fd8\u662f\u533f\u540d\u7528\u6237\uff0c\u5bf9\u4e8eFTP\u670d\u52a1\u5668\u8d44\u6e90\u7684\u4f7f\u7528\u90fd\u9700\u8981\u8fdb\u884c\u63a7\u63a7\u5236\uff0c<\/strong><strong>\u907f\u514d\u7531\u4e8e\u8d1f\u62c5\u8fc7\u5927\u9020\u6210FTP\u670d\u52a1\u5668\u8fd0\u884c\u5f02\u5e38\uff0c<\/strong>\u00a0<strong>\u53ef\u4ee5\u6dfb\u52a0\u4ee5\u4e0b\u914d\u7f6e\u9879\u5bf9FTP\u5ba2\u6237\u673a\u4f7f\u7528FTP\u670d\u52a1\u5668\u8d44\u6e90\u8fdb\u884c\u63a7\u5236\uff1a<\/strong><br \/>\n<strong>max_client\u00a0<\/strong>\u8bbe\u7f6e\u9879\u7528\u4e8e\u8bbe\u7f6eFTP\u670d\u52a1\u5668\u6240\u5141\u8bb8\u7684\u6700\u5927\u5ba2\u6237\u7aef\u8fde\u63a5\u6570\uff0c\u503c\u4e3a0\u65f6\u8868\u793a\u4e0d\u9650\u5236\u3002\u4f8b\u5982max_client=100\u8868\u793aFTP\u670d\u52a1\u5668\u7684\u6240\u6709\u5ba2\u6237\u7aef\u6700\u5927\u8fde\u63a5\u6570\u4e0d\u8d85\u8fc7100\u4e2a\u3002<br \/>\n<strong>max_per_ip\u00a0<\/strong>\u8bbe\u7f6e\u9879\u7528\u4e8e\u8bbe\u7f6e\u5bf9\u4e8e\u540c\u4e00IP\u5730\u5740\u5141\u8bb8\u7684\u6700\u5927\u5ba2\u6237\u7aef\u8fde\u63a5\u6570\uff0c\u503c\u4e3a0\u65f6\u8868\u793a\u4e0d\u9650\u5236\u3002\u4f8b\u5982max_per_ip=5\u8868\u793a\u540c\u4e00IP\u5730\u5740\u7684FTP\u5ba2\u6237\u673a\u4e0eFTP\u670d\u52a1\u5668\u5efa\u7acb\u7684\u6700\u5927\u8fde\u63a5\u6570\u4e0d\u8d85\u8fc75\u4e2a\u3002<br \/>\n<strong>local_max_rate\u00a0<\/strong>\u8bbe\u7f6e\u9879\u7528\u4e8e\u8bbe\u7f6e\u672c\u5730\u7528\u6237\u7684\u6700\u5927\u4f20\u8f93\u901f\u7387\uff0c\u5355\u4f4d\u4e3aB\/s\uff0c\u503c\u4e3a0\u65f6\u8868\u793a\u4e0d\u9650\u5236\u3002\u4f8b\u5982local_max_rate=500000\u8868\u793aFTP\u670d\u52a1\u5668\u7684\u672c\u5730\u7528\u6237\u6700\u5927\u4f20\u8f93\u901f\u7387\u8bbe\u7f6e\u4e3a500KB\/s.<br \/>\n<strong>ano n_max_rate\u00a0<\/strong>\u8bbe\u7f6e\u9879\u7528\u4e8e\u8bbe\u7f6e\u533f\u540d\u7528\u6237\u7684\u6700\u5927\u4f20\u8f93\u901f\u7387\uff0c\u5355\u4f4d\u4e3aB\/s,\u503c\u4e3a0\u8868\u793a\u4e0d\u9650\u5236\u3002\u4f8b\u5982ano_max_rate=200000\uff0c\u8868\u793aFTP\u670d\u52a1\u5668\u7684\u533f\u540d\u7528\u6237\u6700\u5927\u4f20\u8f93\u901f\u7387\u8bbe\u7f6e\u4e3a200KB\/s.<br \/>\n<strong>vsftpd.user_list<\/strong>\u00a0<strong>\u6587\u4ef6\u9700\u8981\u4e0evsftpd.conf\u6587\u4ef6\u4e2d\u7684\u914d\u7f6e\u9879\u7ed3\u5408\u6765\u5b9e\u73b0\u5bf9\u4e8evsftpd.user_list\u6587\u4ef6\u4e2d\u6307\u5b9a\u7528\u6237\u8d26\u53f7\u7684\u8bbf\u95ee\u63a7\u5236\uff1a<\/strong><br \/>\n<strong>\uff081\uff09\u00a0<\/strong><strong>\u8bbe\u7f6e\u7981\u6b62\u767b\u5f55\u7684\u7528\u6237\u8d26\u53f7\u00a0<\/strong><br \/>\n\u5f53vsftpd.conf\u914d\u7f6e\u6587\u4ef6\u4e2d\u5305\u62ec\u4ee5\u4e0b\u8bbe\u7f6e\u65f6\uff0cvsftpd.user_list\u6587\u4ef6\u4e2d\u7684\u7528\u6237\u8d26\u53f7\u88ab\u7981\u6b62\u8fdb\u884cFTP\u767b\u5f55\uff1a<br \/>\n<strong>userlist_enable=YES\u00a0<\/strong><br \/>\n<strong>userlist_deny=YES\u00a0<\/strong><br \/>\nuserlist_enable\u8bbe\u7f6e\u9879\u8bbe\u7f6e\u4f7f\u7528vsftpd.user_list\u6587\u4ef6\uff0cuserlist_deny\u8bbe\u7f6e\u4e3aYES\u8868\u793avsftpd.user_list\u6587\u4ef6\u7528\u4e8e\u8bbe\u7f6e\u7981\u6b62\u7684\u7528\u6237\u8d26\u53f7\u3002<br \/>\n<strong>\uff082\uff09\u00a0<\/strong><strong>\u8bbe\u7f6e\u53ea\u5141\u8bb8\u767b\u5f55\u7684\u7528\u6237\u8d26\u53f7\u00a0<\/strong><br \/>\n\u5f53vsftpd.conf\u914d\u7f6e\u6587\u4ef6\u4e2d\u5305\u62ec\u4ee5\u4e0b\u8bbe\u7f6e\u65f6\uff0c\u53ea\u6709vsftpd.user_list\u6587\u4ef6\u4e2d\u7684\u7528\u6237\u8d26\u53f7\u80fd\u591f\u8fdb\u884cFTP\u767b\u5f55\uff1a<br \/>\n<strong>userlist_enable=YES\u00a0<\/strong><br \/>\n<strong>userlist_deny=NO\u00a0<\/strong><br \/>\nuserlist_enable\u8bbe\u7f6e\u9879\u8bbe\u7f6e\u4f7f\u7528vsftpd.user_list\u6587\u4ef6\uff0cuserlist _deny\u8bbe\u7f6e\u4e3aNO\u8868\u793avsftpd.usre_list\u6587\u4ef6\u7528\u4e8e\u8bbe\u7f6e\u53ea\u5141\u8bb8\u767b\u5f55\u7684\u7528\u6237\u8d26\u53f7\uff0c\u6587\u4ef6\u4e2d\u672a\u5305\u62ec\u7684\u7528\u6237\u8d26\u53f7\u88ab\u7981\u6b62FTP\u767b\u5f55\u3002<br \/>\n<strong>userlist_deny<\/strong>\u00a0<strong>\u548c\u00a0<\/strong><strong>userlist_enable\u00a0<\/strong><strong>\u9009\u9879\u9650\u5236\u7528\u6237\u767b\u5f55FTP<\/strong>\u00a0<strong>\u670d\u52a1\u5668<\/strong>\u00a0\uff08\u4f7f\u7528<strong>userlist_deny<\/strong>\u00a0\u9009\u9879\u548c<strong>user_list<\/strong>\u00a0\u6587\u4ef6\u4e00\u8d77\u80fd\u6709\u6548\u963b\u6b62<strong>root,apache,www<\/strong>\u00a0\u7b49\u7cfb\u7edf\u7528\u6237\u767b\u5f55<strong>FTP<\/strong>\u00a0\u670d\u52a1\u5668\uff0c\u4ece\u800c\u4fdd\u8bc1<strong>FTP<\/strong>\u00a0\u670d\u52a1\u5668\u7684\u5206\u7ea7\u5b89\u5168\u6027\uff09\uff1a<\/p>\n<table class=\"t_table\" cellspacing=\"0\">\n<tbody>\n<tr>\n<td width=\"27%\">\n<p align=\"center\"><strong>Userlist_enable=YES<\/strong><\/p>\n<\/td>\n<td width=\"72%\">\n<p align=\"center\"><strong>Ftpusers<\/strong>\u00a0\u4e2d\u7528\u6237\u5141\u8bb8\u8bbf\u95ee<\/p>\n<p align=\"center\"><strong>User_list<\/strong>\u00a0\u4e2d\u7528\u6237\u5141\u8bb8\u8bbf\u95ee<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"27%\">\n<p align=\"center\"><strong>Userlist_enable=NO<\/strong><\/p>\n<\/td>\n<td width=\"72%\">\n<p align=\"center\"><strong>Ftpusers<\/strong>\u00a0\u4e2d\u7528\u6237\u7981\u6b62\u8bbf\u95ee<\/p>\n<p align=\"center\"><strong>User_list<\/strong>\u00a0\u4e2d\u7528\u6237\u5141\u8bb8\u8bbf\u95ee<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"27%\">\n<p align=\"center\"><strong>Userlist_deny=YES<\/strong><\/p>\n<\/td>\n<td width=\"72%\">\n<p align=\"center\"><strong>Ftpusers<\/strong>\u00a0\u4e2d\u7528\u6237\u7981\u6b62\u8bbf\u95ee\uff08\u767b\u5f55\u65f6\u53ef\u4ee5\u770b\u5230\u5bc6\u7801\u8f93\u5165\u63d0\u793a\uff0c\u4f46\u4ecd\u65e0\u6cd5\u8bbf\u95ee\uff09<\/p>\n<p align=\"center\"><strong>user_list\u00a0<\/strong>\u4e2d\u7528\u6237\u7981\u6b62\u8bbf\u95ee<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"27%\">\n<p align=\"center\"><strong>Userlist_deny=NO<\/strong><\/p>\n<\/td>\n<td width=\"72%\">\n<p align=\"center\"><strong>ftpusers<\/strong>\u00a0\u4e2d\u7528\u6237\u7981\u6b62\u8bbf\u95ee<\/p>\n<p align=\"center\"><strong>user_list<\/strong>\u00a0\u4e2d\u7528\u6237\u5141\u8bb8\u8bbf\u95ee<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"27%\">\n<p align=\"center\"><strong>Userlist_enable=YES\u00a0<\/strong><strong>\u5e76\u4e14<\/strong><\/p>\n<p align=\"center\"><strong>Userlist_deny=YES<\/strong><\/p>\n<\/td>\n<td width=\"72%\">\n<p align=\"center\"><strong>Ftpusers<\/strong>\u00a0\u4e2d\u7528\u6237\u7981\u6b62\u8bbf\u95ee<\/p>\n<p align=\"center\"><strong>User_list<\/strong>\u00a0\u4e2d\u7528\u6237\u7981\u6b62\u8bbf\u95ee\uff08\u767b\u5f55\u65f6\u4e0d\u4f1a\u51fa\u73b0\u5bc6\u7801\u63d0\u793a\uff0c\u76f4\u63a5\u88ab\u670d\u52a1\u5668\u62d2\u7edd\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"27%\">\n<p align=\"center\"><strong>Userlist_enable=YES\u00a0<\/strong><strong>\u5e76\u4e14<\/strong><\/p>\n<p><strong>Userlist_deny=NO<\/strong><\/td>\n<td width=\"72%\">\n<p align=\"center\"><strong>Ftpusers<\/strong>\u00a0\u4e2d\u7528\u6237\u7981\u6b62\u8bbf\u95ee<\/p>\n<p><strong>User_list<\/strong>\u00a0\u4e2d\u7528\u6237\u5141\u8bb8\u8bbf\u95ee<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u914d\u7f6eFTP\u670d\u52a1\u5668\u7684\u865a\u62df\u7528\u6237\u00a0<\/strong><br \/>\n\u5728vsftpd\u670d\u52a1\u5668\u4e2d\u652f\u6301\u533f\u540d\u7528\u6237\uff0c\u672c\u5730\u7528\u6237\uff0c\u548c\u865a\u62df\u7528\u62373\u7c7b\u7528\u6237\u8d26\u53f7\uff0c\u7528\u9014\u53ca\u533a\u522b\u5982\u4e0b\uff1a<br \/>\n<strong>\u533f\u540d\u7528\u6237\u00a0<\/strong>\u662f\u540d\u4e3aanonymous\u6216ftp\u7684FTP\u7528\u6237\uff0c\u533f\u540dFTP\u7528\u6237\u767b\u5f55\u540e\u5c06FTP\u670d\u52a1\u5668\u4e2d\u7684\/var\/ftp\u4f5c\u4e3aFTP\u6839\u76ee\u5f55\u3002\u533f\u540d\u7528\u6237\u901a\u5e38\u7528\u4e8e\u63d0\u4f9b\u516c\u5171\u6587\u4ef6\u7684\u4e0b\u8f7d\uff0c\u5982\u67b6\u8bbe\u516c\u5171\u8f6f\u4ef6\u4e0b\u8f7d\u7684FTP\u670d\u52a1\u5668\uff0c\u6240\u6709\u4eba\u90fd\u53ef\u4ee5\u4f7f\u7528\u533f\u540d\u7528\u6237\u8fdb\u884c\u8f6f\u4ef6\u4e0b\u8f7d\u3002<br \/>\n<strong>\u672c\u5730\u7528\u6237\u00a0<\/strong>\u8d26\u53f7\u662fFTP\u670d\u52a1\u5668\u4e2d\u7684\u7cfb\u7edf\u7528\u6237\u8d26\u53f7\uff0c\u4f7f\u7528FTP\u672c\u5730\u7528\u6237\u8d26\u53f7\u767b\u5f55FTP\u670d\u52a1\u5668\u540e\uff0c\u767b\u5f55\u76ee\u5f55\u4e3a\u672c\u5730\u7528\u6237\u7684\u5bbf\u4e3b\u76ee\u5f55\u3002\u672c\u5730FTP\u7528\u6237\u8d26\u53f7\u901a\u5e38\u548cWeb\u670d\u52a1\u5668\u4e00\u8d77\u63d0\u4f9b\u865a\u62df\u4e3b\u673a\u670d\u52a1\uff0c\u4f5c\u4e3a\u7f51\u9875\u865a\u62df\u4e3b\u673a\u66f4\u65b0\u7f51\u9875\u7684\u9014\u5f84\u3002<br \/>\n<strong>\u865a\u62df\u7528\u6237\u00a0<\/strong>\u8d26\u53f7\u662f\u4e3a\u4e86\u4fdd\u8bc1FTP\u670d\u52a1\u5668\u7684\u5b89\u5168\u6027\uff0c\u7531vsftpd\u670d\u52a1\u5668\u63d0\u4f9b\u7684\u975e\u7cfb\u7edf\u7528\u6237\u8d26\u53f7\u3002\u865a\u62df\u7528\u6237FTP\u767b\u5f55\u540e\u5c06\u628a\u6307\u5b9a\u7684\u76ee\u5f55\u4f5c\u4e3aFTP\u6839\u76ee\u5f55\u3002\u865a\u62df\u7528\u6237\u4e0e\u672c\u5730\u7528\u6237\u5177\u6709\u7c7b\u4f3c\u7684\u529f\u80fd\uff0c\u7531\u4e8e\u865a\u62df\u7528\u6237\u76f8\u5bf9\u5b89\u5168\uff0c\u56e0\u6b64\u6b63\u9010\u6b65\u66ff\u4ee3\u672c\u5730\u7528\u6237\u8d26\u53f7\u3002<br \/>\n<strong>\u7531\u4e8e\u865a\u62df\u7528\u6237\u8d26\u53f7\u5177\u6709\u8f83\u9ad8\u7684\u5b89\u5168\u6027\uff0c\u53ef\u4ee5\u66ff\u4ee3\u672c\u5730\u7528\u6237\u8d26\u53f7\u4f7f\u7528\uff0c\u4e0b\u9762\u662fvsftpd\u865a\u62df\u7528\u6237\u8d26\u53f7\u8bbe\u7f6e\u7684\u51e0\u4e2a\u6b65\u9aa4\uff1a\u00a0<\/strong><br \/>\n\u4ee5\u8bbe\u7f6emiket \u548c john \u4e24\u4e2a\u865a\u62df\u7528\u6237\u5e10\u53f7\u4e3a\u4f8b\u6765\u914d\u7f6evsftpd\u670d\u52a1\u5668<br \/>\n<strong>(1)<\/strong>\u00a0<strong>\u5efa\u7acb\u865a\u62df\u7528\u6237\u53e3\u4ee4\u5e93\u6587\u4ef6<\/strong><br \/>\n\u5efa\u7acb\u865a\u62df\u7528\u6237\u7684\u53e3\u4ee4\u6587\u4ef6\uff0c\u6587\u4ef6\u4e2d\u5947\u6570\u884c\u8bbe\u7f6e\u865a\u62df\u7528\u6237\u7684\u7528\u6237\u540d\uff0c\u5076\u6570\u884c\u8bbe\u7f6e\u7528\u6237\u7684\u53e3\u4ee4\u3002\u4f8b\u5982\uff0c\u4f7f\u7528vi\u7f16\u8f91\u5668\u5efa\u7acb\u540d\u4e3alogins.txt\u7684\u7528\u6237\u53e3\u4ee4\u5e93\u6587\u4ef6\uff0c\u5728\u6587\u4ef6\u4e2d\u8bbe\u7f6e\u7528\u6237mike\u7684\u53e3\u4ee4\u4e3apwabcd,\u7528\u6237john \u7684\u53e3\u4ee4\u662fpw1234:<br \/>\n#vi logins.txt<br \/>\nmike\u00a0 \u00a0\u00a0 \u00a0(\u00a0\u5947\u6570\u884c\u8bbe\u7f6e\u865a\u62df\u7528\u6237\u540d)<br \/>\npwabcd\u00a0 \u00a0\uff08\u5076\u6570\u884c\u8bbe\u7f6e\u7528\u6237\u53e3\u4ee4\uff09<br \/>\njoh<br \/>\npw1234<br \/>\n:wq(\u4fdd\u5b58\u9000\u51fa)<br \/>\n<strong>(2)<\/strong>\u00a0<strong>\u751f\u6210vsftpd \u7684\u8ba4\u8bc1\u6587\u4ef6<\/strong><br \/>\n\u4f7f\u7528db_load \u547d\u4ee4\u751f\u6210\u8ba4\u8bc1\u6587\u4ef6\u3002\u201c-f\u201d\u547d\u4ee4\u9009\u9879\u8bbe\u7f6e\u7684\u503c\u662f\u865a\u62df\u7528\u6237\u7684\u53e3\u4ee4\u5e93\u6587\u4ef6\uff0c\u5373\u4e0a\u9762\u521b\u5efa\u7684logins.txt\u3002\u547d\u4ee4\u7684\u53c2\u6570\u8bbe\u7f6e\u4e3a\u9700\u8981\u751f\u6210\u7684\u8ba4\u8bc1\u6587\u4ef6\u540d\u5982 vsftpd_login.db\uff0c\u8be5\u6587\u4ef6\u653e\u7f6e\u5728\u76ee\u5f55\/etc\/vsftpd\/\u4e0b\uff1a<br \/>\n#db_load\u00a0\u00a0-T\u00a0\u00a0-t hash\u00a0\u00a0\u2013f\u00a0\u00a0logins.txt\u00a0\u00a0\/etc\/vsftpd_login.db\u00a0 \u00a0(\u751f\u6210\u8ba4\u8bc1\u6587\u4ef6)<\/p>\n<p class=\"p1\"><span class=\"s1\">apt-get install db5.3-util<\/span><\/p>\n<p class=\"p1\">#file\u00a0\u00a0\/etc\/vsftpd\/vsftpd_login.db\u00a0 \u00a0\u00a0 \u00a0\u00a0 \u00a0\u00a0 \u00a0\u00a0 \u00a0\u00a0 \u00a0\u00a0 \u00a0\u00a0 \u00a0\u00a0 \u00a0 (\u67e5\u770b\u6587\u4ef6\u7c7b\u578b)<br \/>\n\/etc\/vsftpd\/vsftpd_login.db:Berkeley DB (Hash,version\u00a0\u00a08 , native byte-order)<br \/>\n\u751f\u6210\u7684\u8ba4\u8bc1\u6587\u4ef6\u7684\u6743\u9650\u5e94\u8bbe\u7f6e\u4e3a\u53ea\u5bf9root\u7528\u6237\u53ef\u8bfb\u53ef\u5199\uff0c\u5373600:<br \/>\n#chmod\u00a0\u00a0600\u00a0\u00a0\/etc\/vsftpd\/vsftpd_login.db<br \/>\n<strong>(3)<\/strong>\u00a0<strong>\u5efa\u7acb\u865a\u62df\u7528\u6237\u6240\u9700\u7684PAM\u914d\u7f6e\u6587\u4ef6<\/strong><br \/>\n\u5728\/etc\/pam.d\u76ee\u5f55\u4e0b\u5efa\u7acbvsftpd\u865a\u62df\u7528\u6237\u8eab\u4efd\u8ba4\u8bc1\u6240\u9700\u7684PAM\u914d\u7f6e\u6587\u4ef6\uff0c\u540d\u79f0\u662fvsftpd.vu,\u5185\u5bb9\u4e3a\uff1a<\/p>\n<p class=\"p1\">\u4f7f\u7528<strong>find \/ -name 'pam_userdb.so'<\/strong>\u67e5\u627e<br \/>\n\u7ed3\u679c\uff1a\/lib\/x86_64-linux-gnu\/security\/pam_userdb.so#cat \/etc\/pam.d\/vsftpd.vu<br \/>\nauth\u00a0\u00a0required \/lib\/x86_64-linux-gnu\/security\/pam_userdb.so db=\/etc\/vsftpd\/vsftpd_login<br \/>\naccount\u00a0\u00a0required \/lib\/x86_64-linux-gnu\/security\/pam_userdb.so db=\/etc\/vsftpd\/vsftpd_login<br \/>\n<strong>(4)<\/strong>\u00a0<strong>\u5efa\u7acb\u865a\u62df\u7528\u6237\u53ca\u8981\u8bbf\u95ee\u7684\u76ee\u5f55\u5e76\u8bbe\u7f6e\u76f8\u5e94\u7684\u6743\u9650<\/strong><br \/>\n\u5efa\u7acbvsftpd\u865a\u62df\u7528\u6237\u6240\u9700\u7684\u7cfb\u7edf\u7528\u6237\u8d26\u53f7\uff0c\u8d26\u53f7\u540d\u4e3a<strong>virtual<\/strong>\u00a0\uff0c\u6307\u5b9a\u7528\u6237\u7684\u5bbf\u4e3b\u76ee\u5f55\u662f<strong>\/home\/ftpsite,<\/strong>\u00a0\u8bbe\u7f6e\u5bbf\u4e3b\u76ee\u5f55\u7684\u6743\u9650\u4e3a<strong>700\uff1a<\/strong><br \/>\n#useradd\u00a0\u00a0-d\u00a0\u00a0\/home\/ftpsite \u00a0-m virtual<br \/>\n#chmod\u00a0\u00a0700\u00a0\u00a0\/home\/ftpsite\/<br \/>\n\u8fd9\u6837vsftpd\u670d\u52a1\u5668\u4e2d\u7684\u6240\u6709\u865a\u62df\u7528\u6237\u8d26\u53f7\u767b\u5f55\u540e\u90fd\u5c06\u5728\/home\/ftpsite\u76ee\u5f55\u4e2d<br \/>\n<strong>(5)<\/strong>\u00a0<strong>\u8bbe\u7f6evsftpd.conf\u4e3b\u914d\u7f6e\u6587\u4ef6<\/strong><br \/>\n\u5728\u5bf9vsftpd.conf\u914d\u7f6e\u6587\u4ef6\u8fdb\u884c\u4fee\u6539\u4e4b\u524d\uff0c\u5e94\u5148\u5c06\u539f\u6709\u7684\u6587\u4ef6\u8fdb\u884c\u5907\u4efd\uff0c\u4ee5\u4fbf\u51fa\u73b0\u914d\u7f6e\u9519\u8bef\u65f6\u53ef\u8fdb\u884c\u6062\u590d\uff1a<br \/>\n#cd \/etc\/vsftpd<br \/>\n#cp vsftpd.conf vsftpd.conf.bak<br \/>\n\u5728vsftpd.conf\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0\u865a\u62df\u7528\u6237\u7684\u914d\u7f6e\u9879\uff0c\u5185\u5bb9\u4e3a\uff1a<br \/>\nguest_enable=YES<br \/>\nguest_username=virtual<br \/>\npam_service_name=vsftpd.vu<br \/>\n<strong>(6)<\/strong>\u00a0<strong>\u91cd\u65b0\u542f\u52a8vsftpd\u670d\u52a1\u7a0b\u5e8f<\/strong><br \/>\n\u5728\u5bf9vsftpd.conf\u914d\u7f6e\u6587\u4ef6\u8fdb\u884c\u4e86\u4efb\u4f55\u4fee\u6539\u540e\u90fd\u9700\u8981\u91cd\u65b0\u542f\u52a8vsftpd\u670d\u52a1\uff0c\u4ee5\u4fbf\u914d\u7f6e\u751f\u6548\uff1a<br \/>\n#service vsftpd restart<br \/>\n<strong>(7)<\/strong>\u00a0<strong>\u6d4b\u8bd5vsftpd\u4e2d\u7684\u865a\u62df\u7528\u6237\u8d26\u53f7:mike \u6216 john<\/strong><br \/>\n\u5728\u6d4b\u8bd5\u524d\u53ef\u4ee5\u5148\u5728\/home\/ftpsite\u76ee\u5f55\u4e2d\u5efa\u7acb\u6d4b\u8bd5\u6587\u4ef6\uff0c\u7528\u4e8e\u6d4b\u8bd5\u65f6\u8fdb\u884c\u4e0b\u8f7d\uff0c\u5e76\u8bbe\u7f6e\u8be5\u6587\u4ef6\u7684\u5c5e\u4e3b\u548c\u5c5e\u7ec4\u4e3avirtual<br \/>\n#touch \/home\/ftpsite\/afile<br \/>\n#chown\u00a0\u00a0virtual.virtual\u00a0\u00a0\/home\/ftpsite\/afile<br \/>\n\u4f7f\u7528ftp\u547d\u4ee4\u767b\u5f55vsftpd\u670d\u52a1\u5668\uff0c\u5e76\u4f7f\u7528\u5df2\u914d\u7f6e\u7684\u865a\u62df\u7528\u6237\u5e10\u53f7mike\u8fdb\u884c\u767b\u5f55<br \/>\n#ftp localhost<br \/>\nname (localhost:root):<strong>mike<\/strong><br \/>\npassword:<br \/>\nftp&gt;get afile<br \/>\n\u5728\u5b8c\u6210\u865a\u62df\u7528\u6237\u7684FTP\u767b\u5f55\u540e\uff0c\u53ef\u4f7f\u7528get\u547d\u4ee4\u4e0b\u8f7d\u6d4b\u8bd5\u6587\u4ef6\uff0c\u6d4b\u8bd5\u6587\u4ef6\u4f1a\u4fdd\u5b58\u5230\u7528\u6237\u7684\u5f53\u524d\u76ee\u5f55\u4e2d\u3002<br \/>\n<strong>(8)<\/strong>\u00a0<strong>\u5bf9\u4e0d\u540c\u7684\u865a\u62df\u7528\u6237\u8bbe\u7f6e\u4e0d\u540c\u7684\u6743\u9650<\/strong><br \/>\nvsftpd\u670d\u52a1\u5668\u4e2d\u7684\u865a\u62df\u7528\u6237\u53ef\u4ee5\u7075\u6d3b\u7684\u9488\u5bf9\u4e0d\u540c\u7684\u7528\u6237\u8d26\u53f7\u8bbe\u7f6e\u4e0d\u540c\u7684\u7528\u6237\u6743\u9650\uff0c\u914d\u7f6e\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<br \/>\n1\uff0e\u8bbe\u7f6e\u4e3b\u914d\u7f6e\u6587\u4ef6<br \/>\n\u5728vsftpd.conf\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0user_config_dir\u914d\u7f6e\u9879\uff0c\u5e76\u8bbe\u7f6e\u7528\u6237\u914d\u7f6e\u6587\u4ef6\u7684\u4fdd\u5b58\u76ee\u5f55<br \/>\nuser_config_dir=\/etc\/vsftpd_user_conf<br \/>\n\u5728\u4e0a\u9762\u7684\u914d\u7f6e\u5b9e\u4f8b\u4e2d\uff0c\u8bbe\u7f6e\u5728\/etc\/vsftpd_user_conf\u76ee\u5f55\u4e2d\u4fdd\u5b58\u865a\u62df\u7528\u6237\u7684\u914d\u7f6e\u6587\u4ef6<br \/>\n2\uff0e\u5efa\u7acb\u7528\u6237\u914d\u7f6e\u6587\u4ef6\u76ee\u5f55<br \/>\n\u4f7f\u7528mkdir\u547d\u4ee4\u5efa\u7acb\u865a\u62df\u7528\u6237\u914d\u7f6e\u6587\u4ef6\u7684\u4fdd\u5b58\u76ee\u5f55<br \/>\n#mkdir\u00a0\u00a0\/etc\/vsftpd_user_conf<br \/>\n3.\u4e3a\u865a\u62df\u7528\u6237\u5efa\u7acb\u5355\u72ec\u7684\u914d\u7f6e\u6587\u4ef6<br \/>\n\u5728\/etc\/vsftpd_user_conf\/\u76ee\u5f55\u4e2d\u53ef\u4ee5\u4e3a\u6bcf\u4e2a\u865a\u62df\u7528\u6237\u5efa\u7acb\u72ec\u7acb\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u914d\u7f6e\u6587\u4ef6\u540d\u79f0\u548c\u7528\u6237\u540d\u76f8\u540c\u3002\u4f8b\u5982\uff0c\u4e3a\u7528\u6237mike\u5efa\u7acb\u914d\u7f6e\u6587\u4ef6mike ,\u5e76\u5c06anon_world_readable_only\u8bbe\u7f6e\u4e3aNO\uff0c\u8868\u793a\u7528\u6237\u5177\u6709\u6d4f\u89c8\u548c\u4e0b\u8f7d\u7684\u6743\u9650<br \/>\n#cat\u00a0\u00a0\/etc\/vsftpd_user_conf\/mike<br \/>\nanon_world_readable_only=NO<br \/>\n\u4e3a\u7528\u6237john\u5efa\u7acb\u914d\u7f6e\u6587\u4ef6john\uff0c\u5e76\u8bbe\u7f6e\u8be5\u7528\u6237\u5177\u6709\u6d4f\u89c8\uff0c\u4e0b\u8f7d\uff0c\u4e0a\u4f20\uff0c\u6539\u540d\uff0c\u5220\u9664\u6587\u4ef6\uff0c\u5efa\u7acb\u548c\u5220\u9664\u7684\u6743\u9650\u3002<br \/>\n#cat\u00a0\u00a0john<br \/>\nanon_world_readable_only=NO\u00a0 \u00a0--\u8868\u793a\u7528\u6237\u53ef\u4ee5\u6d4f\u89c8FTP\u76ee\u5f55\u548c\u4e0b\u8f7d\u6587\u4ef6<br \/>\nanon_upload_enable=YES\u00a0 \u00a0\u00a0 \u00a0\u00a0\u00a0--\u8868\u793a\u7528\u6237\u53ef\u4ee5\u4e0a\u4f20\u6587\u4ef6<br \/>\nanon_mkdir_write_enable=YES\u00a0 \u00a0--\u8868\u793a\u7528\u6237\u5177\u6709\u5efa\u7acb\u548c\u5220\u9664\u76ee\u5f55\u7684\u6743\u5229<br \/>\nanon_other_write_enable=YES\u00a0 \u00a0--\u8868\u793a\u7528\u6237\u5177\u6709\u6587\u4ef6\u6539\u540d\u548c\u5220\u9664\u6587\u4ef6\u7684\u6743\u9650<br \/>\n\u901a\u8fc7\u5bf9\u4ee5\u4e0a\u914d\u7f6e\u9879\u7684\u7ec4\u5408\u8bbe\u7f6e\uff0cvsftpd\u53ef\u4ee5\u4e3a\u6bcf\u4e2a\u865a\u62df\u7528\u6237\u914d\u7f6e\u4e0d\u540c\u7684FTP\u6743\u9650\uff0c\u7528\u6237\u914d\u7f6e\u6587\u4ef6\u4e2d\u6ca1\u6709\u7684\u914d\u7f6e\u9879\u5c06\u6309\u7167vsftpd.conf\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u5185\u5bb9\u8bbe\u7f6e\u3002<br \/>\n<strong><em>vsftpd<\/em>\u00a0<\/strong><strong><em>\u670d\u52a1\u5668\u7684\u5176\u5b83\u4e3b\u8981\u8bbe\u7f6e<\/em>\u00a0<\/strong><strong>\uff1a<\/strong><br \/>\n1\u00a0\uff0e\u6700\u5927\u4f20\u8f93\u901f\u7387\u8bbe\u7f6e\uff1a<br \/>\n\u8bbe\u7f6e\u533f\u540d\u7528\u6237\u7684\u6700\u5927\u4f20\u8f93\u7387\u4e3a20Kbps,\u4fee\u6539<strong>\/etc\/vsftpd\/vsftpd.conf<\/strong>\u00a0\u6dfb\u52a0\u8bed\u53e5\uff1a<strong>anon_max_rate=20000<\/strong><br \/>\n\u8bbe\u7f6e\u672c\u5730\u5e10\u53f7\u6700\u5927\u4f20\u8f93\u7387\u4e3a1Mbps\uff0c\u4fee\u6539<strong>\/etc\/vsftpd\/vsftpd.conf<\/strong>\u00a0\u6dfb\u52a0\u8bed\u53e5\uff1a<strong>local_max_rate=1000000<\/strong><br \/>\n2\u00a0\uff0e\u670d\u52a1\u5668\u6700\u5927\u5e76\u53d1\u6570\u548c\u7528\u6237\u6700\u5927\u7ebf\u7a0b\u6570\u8bbe\u7f6e\uff1a<br \/>\n\u4f8b\u5982\u8bbe\u7f6e\u670d\u52a1\u5668\u5141\u8bb8\u7684\u6700\u5927\u5e76\u53d1\u6570\u4e3a99\uff0c\u800c\u6bcf\u4e2a\u7528\u6237\u540c\u4e00\u65f6\u6bb5\u7684\u6700\u5927\u5e76\u53d1\u7ebf\u7a0b\u6570\u4e3a5\uff0c\u4fee\u6539<strong>\/etc\/vsftpd\/vsftpd.conf<\/strong>\u00a0\u6dfb\u52a0\u4e24\u884c\u8bed\u53e5\uff1a<strong>max_clients=99<\/strong>\u00a0\u548c\u00a0<strong>max_per_ip=5<\/strong><br \/>\n3\u00a0\uff0e\u4fee\u6539\u9ed8\u8ba4\u7aef\u53e3\uff1a<br \/>\n\u9ed8\u8ba4FTP\u670d\u52a1\u5668\u7aef\u53e3\u53f7\u662f21\uff0c\u51fa\u4e8e\u5b89\u5168\u76ee\u7684\uff0c\u6709\u65f6\u9700\u4fee\u6539\u9ed8\u8ba4\u7aef\u53e3\u53f7\uff0c\u4fee\u6539\/etc\/vsftpd\/vsftpd.conf<br \/>\n\u6dfb\u52a0\u8bed\u53e5(\u4f8b)\uff1a<strong>listen_port=4449<\/strong>\u00a0\u8be5\u8bed\u53e5\u6307\u5b9a\u4e86\u4fee\u6539\u540eFTP\u670d\u52a1\u5668\u7684\u7aef\u53e3\u53f7\uff0c\u5e94\u5c3d\u91cf\u5927\u4e8e4000\uff0c\u4fee\u6539\u540e\u8bbf\u95ee<br \/>\n<strong>#ftp 192.168.57.2 4449<\/strong>\u00a0(\u9700\u52a0\u4e0a\u6b63\u786e\u7684\u7aef\u53e3\u53f7\u4e86\uff0c\u5426\u5219\u4e0d\u80fd\u6b63\u5e38\u8fde\u63a5)<br \/>\n4\u00a0\uff0e\u8bbe\u7f6e\u7528\u6237\u7ec4\uff0c\u589e\u5f3aFTP\u670d\u52a1\u5668\u5b89\u5168\u6027\uff1a<br \/>\n<strong>\u4e3e\u4f8b\uff1a\u00a0<\/strong><br \/>\n#mkdir \u2013p \/home\/try\u00a0\u00a0\u9012\u5f52\u521b\u5efa\u65b0\u76ee\u5f55<br \/>\n#groupadd try\u00a0 \u00a0\u00a0 \u00a0\u00a0\u00a0\u65b0\u5efa\u7ec4<br \/>\n#useradd \u2013g try \u2013d \/home\/try try1 \u65b0\u5efa\u7528\u6237try1\u5e76\u6307\u5b9a\u5bb6\u76ee\u5f55\u548c\u5c5e\u7ec4<br \/>\n#useradd \u2013g try \u2013d \/home\/try try2 \u65b0\u5efa\u7528\u6237try2\u5e76\u6307\u5b9a\u5bb6\u76ee\u5f55\u548c\u5c5e\u7ec4<br \/>\n#useradd \u2013g try \u2013d \/home\/try try3 \u65b0\u5efa\u7528\u6237try3\u5e76\u6307\u5b9a\u5bb6\u76ee\u5f55\u548c\u5c5e\u7ec4<br \/>\n#passwd try1\u00a0\u00a0\u4e3a\u65b0\u7528\u6237\u8bbe\u5bc6\u7801<br \/>\n#passwd try2\u00a0\u00a0\u4e3a\u65b0\u7528\u6237\u8bbe\u5bc6\u7801<br \/>\n#passwd try3\u00a0\u00a0\u4e3a\u65b0\u7528\u6237\u8bbe\u5bc6\u7801<br \/>\n#chown try1 \/home\/try \u8bbe\u7f6e\u76ee\u5f55\u5c5e\u4e3b\u4e3a\u7528\u6237try1<br \/>\n#chown .try \/home\/try \u8bbe\u7f6e\u76ee\u5f55\u5c5e\u7ec4\u4e3a\u7ec4try<br \/>\n#chmod 750 \/home\/try\u00a0\u00a0\u8bbe\u7f6e\u76ee\u5f55\u8bbf\u95ee\u6743\u9650try1\u4e3a\u8bfb\uff0c\u5199\uff0c\u6267\u884c\uff1btry2\uff0ctry3\u4e3a\u8bfb\uff0c\u6267\u884c<br \/>\n\u7531\u4e8e\u672c\u5730\u7528\u6237\u767b\u5f55FTP\u670d\u52a1\u5668\u540e\u8fdb\u5165\u81ea\u5df1\u4e3b\u76ee\u5f55\uff0c\u800ctry1,try2 try3\u5bf9\u4e3b\u76ee\u5f55\/home\/try\u5206\u914d\u7684\u6743\u9650\u4e0d\u540c\uff0c\u6240\u4ee5\u901a\u8fc7FTP\u8bbf\u95ee\u7684\u6743\u9650\u4e5f\u4e0d\u540c\uff0ctry1\u8bbf\u95ee\u6743\u9650\u4e3a\uff1a\u4e0a\u4f20\uff0c\u4e0b\u8f7d\uff0c\u5efa\u76ee\u5f55 ;try2ty3\u8bbf\u95ee\u6743\u9650\u4e3a\u4e0b\u8f7d\uff0c\u6d4f\u89c8\uff0c\u4e0d\u80fd\u5efa\u76ee\u5f55\u548c\u4e0a\u4f20\u3002\u5b9e\u73b0\u4e86\u7fa4\u7ec4\u4e2d\u7528\u6237\u4e0d\u540c\u8bbf\u95ee\u7ea7\u522b\uff0c\u52a0\u5f3a\u4e86\u5bf9FTP\u670d\u52a1\u5668\u7684\u5206\u7ea7\u5b89\u5168\u7ba1\u7406\u3002<br \/>\n5\u00a0\uff0e\u5e38\u89c1\u7684vsftpd\u65e5\u5fd7\u89e3\u51b3\u65b9\u6848\u5982\u4e0b\uff1a<br \/>\nxferlog_enable=YES\u00a0(\u00a0\u8868\u660eFTP\u670d\u52a1\u5668\u8bb0\u5f55\u4e0a\u4f20\u4e0b\u8f7d\u7684\u60c5\u51b5)<br \/>\nxferlog_std_format=YES\u00a0\uff08\u8868\u660e\u5c06\u8bb0\u5f55\u7684\u4e0a\u4f20\u4e0b\u8f7d\u60c5\u51b5\u5199\u5728xferlog_file\u6240\u6307\u5b9a\u7684\u6587\u4ef6\u4e2d\uff0c\u5373xferlog_file\u9009\u9879\u6307\u5b9a\u7684\/var\/log\/xferlog\u6587\u4ef6\u4e2d\uff09<br \/>\nxferlog_file=\/var\/log\/xferlog<br \/>\ndual_log_enable=YES\u00a0\uff08\u8868\u660e\u542f\u7528\u4e86\u53cc\u4efd\u65e5\u5fd7\uff0c\u5728\u7528xferlog\u6587\u4ef6\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u4f20\u4e0b\u8f7d\u60c5\u51b5\u7684\u540c\u65f6\uff0cvsftpd_log_file\u6240\u6307\u5b9a\u7684\u6587\u4ef6\uff0c\u5373\/var\/log\/vsftpd.log\u4e5f\u5c06\u7528\u6765\u8bb0\u5f55\u670d\u52a1\u5668\u7684\u4f20\u8f93\u60c5\u51b5\uff09<br \/>\nvsftpd_log_file=\/var\/log\/vsftpd.log<br \/>\nvsftpdr\u00a0\u7684\u4e24\u4e2a\u65e5\u5fd7\u6587\u4ef6\u5206\u6790\u5982\u4e0b\uff1a<br \/>\n\/var\/log\/xferlog \u8bb0\u5f55\u5185\u5bb9\u4e3e\u4f8b<br \/>\nThu Sep 6 09:07:48 2007 7 192.168.57.1 4323279 \/home\/student\/phpMyadmin-2.11.0-all-languages.tar.gz b \u2013 i r student ftp 0 * c<br \/>\n\/var\/log\/vsftpd.log \u8bb0\u5f55\u5185\u5bb9\u4e3e\u4f8b<br \/>\nTue Sep 11 14:59:03 2007 [pid 3460]\u00a0 \u00a0 CONNECT: Client \u201c127.0.0.1\u201d<br \/>\nTue Sep 11 14:59:24 2007 [pid 3459] [ftp] OK LOGIN;Client \u201c127.0.0.1\u201d ,anon password\u00a0<strong>\u201d<\/strong>\u00a0<strong>?<\/strong>\u00a0<strong>\u201d<\/strong><br \/>\n<strong>\u00a0 \u00a0\u00a0 \u00a0\u00a0 \u00a0\u00a0 \u00a0\u00a0 \u00a0\u00a0 \u00a0\u00a0 \u00a0\u00a0 \u00a0\/var\/log\/xferlog<\/strong>\u00a0<strong>\u65e5\u5fd7\u6587\u4ef6\u4e2d\u6570\u636e\u7684\u5206\u6790\u548c\u53c2\u6570\u8bf4\u660e<\/strong><\/p>\n<table class=\"t_table\" cellspacing=\"0\">\n<tbody>\n<tr>\n<td><strong>\u8bb0\u5f55\u6570\u636e\u00a0<\/strong><\/td>\n<td><strong>\u53c2\u6570\u540d\u79f0\u00a0<\/strong><\/td>\n<td><strong>\u53c2\u6570\u8bf4\u660e\u00a0<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>Thu Sep 6 09:07:48 2007\u00a0<\/strong><\/td>\n<td>\u5f53\u524d\u65f6\u95f4<\/td>\n<td>\u5f53\u524d\u670d\u52a1\u5668\u672c\u5730\u65f6\u95f4\uff0c\u683c\u5f0f\u4e3a\uff1a<br \/>\nDDD MMM dd hh:mm:ss YYY<\/td>\n<\/tr>\n<tr>\n<td><strong>7\u00a0<\/strong><\/td>\n<td>\u4f20\u8f93\u65f6\u95f4<\/td>\n<td>\u4f20\u9001\u6587\u4ef6\u6240\u7528\u65f6\u95f4\uff0c\u5355\u4f4d\u4e3a\u79d2<\/td>\n<\/tr>\n<tr>\n<td><strong>192.168.57.1\u00a0<\/strong><\/td>\n<td>\u8fdc\u7a0b\u4e3b\u673a\u540d\u79f0\/IP<\/td>\n<td>\u8fdc\u7a0b\u4e3b\u673a\u540d\u79f0\/IP<\/td>\n<\/tr>\n<tr>\n<td><strong>4323279\u00a0<\/strong><\/td>\n<td>\u6587\u4ef6\u5927\u5c0f<\/td>\n<td>\u4f20\u9001\u6587\u4ef6\u7684\u5927\u5c0f\uff0c\u5355\u4f4d\u4e3abyte<\/td>\n<\/tr>\n<tr>\n<td><strong>\/home\/student\/phpMyadmin-\u00a0<\/strong><br \/>\n<strong>2.11.0-all-languages.tar.gz\u00a0<\/strong><\/td>\n<td>\u6587\u4ef6\u540d<\/td>\n<td>\u4f20\u8f93\u6587\u4ef6\u540d\uff0c\u5305\u62ec\u8def\u5f84<\/td>\n<\/tr>\n<tr>\n<td><strong>b\u00a0<\/strong><\/td>\n<td>\u4f20\u8f93\u7c7b\u578b<\/td>\n<td>\u4f20\u8f93\u65b9\u5f0f\u7684\u7c7b\u578b\uff0c\u5305\u62ec\u4e24\u79cd\uff1a<br \/>\na\u4ee5ASCII\u4f20\u8f93 b\u4ee5\u4e8c\u8fdb\u5236\u6587\u4ef6\u4f20\u8f93<\/td>\n<\/tr>\n<tr>\n<td><strong>\u2013<\/strong><\/td>\n<td>\u7279\u6b8a\u5904\u7406\u6807\u5fd7<\/td>\n<td>\u7279\u6b8a\u5904\u7406\u7684\u6807\u5fd7\u4f4d\uff0c\u53ef\u80fd\u7684\u503c\u5305\u62ec\uff1a<br \/>\n_ \u4e0d\u505a\u4efb\u4f55\u7279\u6b8a\u5904\u7406<br \/>\nC \u6587\u4ef6\u662f\u538b\u7f29\u683c\u5f0f<br \/>\nU \u6587\u4ef6\u662f\u975e\u538b\u7f29\u683c\u5f0f<br \/>\nT \u6587\u4ef6\u662ftar\u683c\u5f0f<\/td>\n<\/tr>\n<tr>\n<td><strong>i\u00a0<\/strong><\/td>\n<td>\u4f20\u8f93\u65b9\u5411<\/td>\n<td>\u6587\u4ef6\u4f20\u8f93\u65b9\u5411\uff0c\u5305\u62ec\u4e24\u79cd\uff1a<br \/>\no \u4eceFTP\u670d\u52a1\u5668\u5411\u5ba2\u6237\u7aef\u4f20\u8f93<br \/>\ni \u4ece\u5ba2\u6237\u7aef\u5411FTP\u670d\u52a1\u5668\u4f20\u8f93<\/td>\n<\/tr>\n<tr>\n<td><strong>r\u00a0<\/strong><\/td>\n<td>\u8bbf\u95ee\u6a21\u5f0f<\/td>\n<td>\u7528\u6237\u8bbf\u95ee\u6a21\u5f0f\uff0c\u5305\u62ec\uff1a<br \/>\na \u533f\u540d\u7528\u6237<br \/>\ng \u6765\u5bbe\u7528\u6237<br \/>\nr \u771f\u5b9e\u7528\u6237\uff0c\u5373\u7cfb\u7edf\u4e2d\u7684\u7528\u6237<\/td>\n<\/tr>\n<tr>\n<td><strong>student\u00a0<\/strong><\/td>\n<td>\u7528\u6237\u540d<\/td>\n<td>\u7528\u6237\u540d\u79f0<\/td>\n<\/tr>\n<tr>\n<td><strong>ftp\u00a0<\/strong><\/td>\n<td>\u670d\u52a1\u540d<\/td>\n<td>\u6240\u4f7f\u7528\u7684\u670d\u52a1\u540d\u79f0\uff0c\u4e00\u822c\u4e3aFTP<\/td>\n<\/tr>\n<tr>\n<td><strong>0\u00a0<\/strong><\/td>\n<td>\u8ba4\u8bc1\u65b9\u5f0f<\/td>\n<td>\u8ba4\u8bc1\u65b9\u5f0f\uff0c\u5305\u62ec\uff1a<br \/>\n0 \u65e0<br \/>\n1 RFC931\u8ba4\u8bc1<\/td>\n<\/tr>\n<tr>\n<td><strong>*\u00a0<\/strong><\/td>\n<td>\u8ba4\u8bc1\u7528\u6237id<\/td>\n<td>\u8ba4\u8bc1\u7528\u6237\u7684id\uff0c\u5982\u679c\u4f7f\u7528*\uff0c\u5219\u8868\u793a\u65e0\u6cd5\u83b7\u5f97\u8be5id<\/td>\n<\/tr>\n<tr>\n<td><strong>c\u00a0<\/strong><\/td>\n<td>\u5b8c\u6210\u72b6\u6001<\/td>\n<td>\u4f20\u8f93\u7684\u72b6\u6001\uff1a<br \/>\nc \u8868\u793a\u4f20\u8f93\u5df2\u5b8c\u6210<br \/>\ni \u8868\u793a\u4f20\u8f93\u793a\u5b8c\u6210<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>6<\/strong>\u00a0<strong>\uff0e\u533f\u540dFTP\u8bbe\u7f6e\u65b9\u6cd5\uff1a<\/strong><br \/>\n\u901a\u5e38\u5728\u767b\u5f55FTP\u670d\u52a1\u5668\u7684\u7528\u6237\u4e0d\u786e\u5b9a\u7684\u60c5\u51b5\u4e0b\uff0c\u5e94\u5c06FTP\u670d\u52a1\u5668\u8bbe\u7f6e\u4e3a\u5141\u8bb8\u533f\u540d\u8d26\u53f7\u767b\u5f55\u7684FTP\u670d\u52a1\u5668<br \/>\n1\uff0e\u542f\u7528\u533f\u540d\u5e10\u53f7<br \/>\n<strong>\u00a0\u00a0anonymous_enable=YES\u00a0<\/strong><br \/>\n<strong>\u00a0\u00a0local_enable=YES\u00a0<\/strong><br \/>\n<strong>\u00a0\u00a0write_enable=YES\u00a0<\/strong><br \/>\n<strong>\u00a0\u00a0listen=YES\u00a0<\/strong><br \/>\n\u8bbe\u7f6e\u5b8c\u6210\u540e\uff0c\u91cd\u542fvsftd.\u5c06\u5141\u8bb8\u533f\u540d\u8d26\u53f7\u548c\u672c\u5730\u8d26\u53f7\u767b\u5f55FTP\u670d\u52a1\u5668\uff0c\u540c\u65f6\u5141\u8bb8\u533f\u540d\u7528\u6237\u5177\u6709\u5bf9FTP\u670d\u52a1\u5668\u6587\u4ef6\u7684\u5199\u6743\u9650\uff0c\u5e76\u4e14\u53ea\u80fd\u4e0b\u8f7d\u6587\u4ef6\u800c\u4e0d\u80fd\u4e0a\u4f20\uff0c\u4e0d\u5141\u8bb8\u533f\u540d\u8d26\u53f7\u521b\u5efa\u6587\u4ef6\u5939\uff0c\u533f\u540d\u7528\u6237\u7684\u53e3\u4ee4\u4e3a\u4e00\u4e2aE-mail\u5730\u5740\u3002<br \/>\n2\uff0e\u5141\u8bb8\u533f\u540d\u8d26\u53f7\u4e0a\u4f20\u6587\u4ef6<br \/>\n<strong>anon_upload_enable=YES\u00a0<\/strong><br \/>\n<strong>anon_mkdir_write_enable=YES\u00a0<\/strong><br \/>\n\u5c06#\u53bb\u6389\u5373\u53ef\uff0c\u91cd\u542fvsftpd.\u5c06\u5141\u8bb8\u533f\u540d\u8d26\u53f7\u4e0a\u4f20\u6587\u4ef6\uff0c\u4e5f\u5c31\u662f\u5177\u6709\u5728FTP\u670d\u52a1\u5668\u7684\u672c\u5730\u76ee\u5f55\u4e2d\u65b0\u5efa\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u7684\u529f\u80fd<br \/>\n3\uff0e\u4ec5\u5141\u8bb8\u533f\u540d\u7528\u6237\u8bbf\u95ee<br \/>\n<strong>#local_enable=YES\u00a0<\/strong><br \/>\n<strong>#write_enable=YES\u00a0<\/strong><br \/>\n\u5728\u524d\u9762\u52a0\u4e0a#\uff0c\u5373\u9650\u5236\u672c\u5730\u8d26\u53f7\u8bbf\u95ee\uff0c\u4ec5\u5141\u8bb8\u533f\u540d\u7528\u6237\u8bbf\u95ee<br \/>\n4\uff0e\u7981\u6b62\u533f\u540d\u8bbf\u95ee\uff0c\u5141\u8bb8\u672c\u5730\u8d26\u53f7\u8bbf\u95ee<br \/>\n<strong>anonymous_enable=NO\u00a0<\/strong><br \/>\n<strong>\u00a0\u00a0local_enable=YES\u00a0<\/strong><br \/>\n<strong>\u00a0\u00a0write_enable=YES\u00a0<\/strong><br \/>\n<strong>\u5e38\u89c1FTP\u547d\u4ee4\u53ca\u5176\u529f\u80fd\u00a0<\/strong><\/p>\n<table class=\"t_table\" cellspacing=\"0\">\n<tbody>\n<tr>\n<td width=\"199\"><strong>FTP<\/strong>\u00a0<strong>\u547d\u4ee4<\/strong><\/td>\n<td width=\"170\"><strong>\u529f\u80fd\u00a0<\/strong><\/td>\n<td width=\"211\"><strong>FTP<\/strong>\u00a0<strong>\u547d\u4ee4<\/strong><\/td>\n<td width=\"187\"><strong>\u529f\u80fd\u00a0<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\"><strong>ls<\/strong><\/p>\n<\/td>\n<td width=\"170\">\u663e\u793a\u670d\u52a1\u5668\u4e0a\u7684\u76ee\u5f55<\/td>\n<td width=\"211\"><strong>ls\u00a0<\/strong>[remote-dir][local-file]<\/td>\n<td width=\"187\">\u663e\u793a\u8fdc\u7a0b\u76ee\u5f55remote-dir\uff0c\u5e76\u5b58\u5165\u672c\u5730\u6587\u4ef6local-file<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\"><strong>get<\/strong>\u00a0remote-file [local-file]<\/p>\n<\/td>\n<td width=\"170\">\u4ece\u670d\u52a1\u5668\u4e0b\u8f7d\u6307\u5b9a\u6587\u4ef6\u5230\u5ba2\u6237\u7aef<\/td>\n<td width=\"211\"><strong>mget\u00a0<\/strong>remote-files<\/td>\n<td width=\"187\">\u4e0b\u8f7d\u591a\u4e2a\u8fdc\u7a0b\u6587\u4ef6(mget\u547d\u4ee4\u5141\u8bb8\u7528\u901a\u914d\u7b26\u4e0b\u8f7d\u591a\u4e2a\u6587\u4ef6)<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\"><strong>put<\/strong>\u00a0local-file [remote-file]<\/p>\n<\/td>\n<td width=\"170\">\u4ece\u5ba2\u6237\u7aef\u4e0a\u4f20\u6307\u5b9a\u6587\u4ef6\u5230\u670d\u52a1\u5668<\/td>\n<td width=\"211\"><strong>mput\u00a0<\/strong>local-file<\/td>\n<td width=\"187\">\u5c06\u591a\u4e2a\u6587\u4ef6\u4e0a\u4f20\u81f3\u8fdc\u7a0b\u4e3b\u673a(mput\u547d\u4ee4\u5141\u8bb8\u7528\u901a\u914d\u7b26\u4e0a\u4f20\u591a\u4e2a\u6587\u4ef6)<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\">open<\/p>\n<\/td>\n<td width=\"170\">\u8fde\u63a5FTP\u670d\u52a1\u5668<\/td>\n<td width=\"211\">mdelete [remote-file]<\/td>\n<td width=\"187\">\u5220\u9664\u8fdc\u7a0b\u4e3b\u673a\u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\">close<\/p>\n<\/td>\n<td width=\"170\">\u4e2d\u65ad\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u7684ftp\u4f1a\u8bdd\uff08\u4e0eopen\u5bf9\u5e94\uff09<\/td>\n<td width=\"211\">mkdir dir-name<\/td>\n<td width=\"187\">\u5728\u8fdc\u7a0b\u4e3b\u673a\u4e2d\u521b\u5efa\u76ee\u5f55<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\">open host[port]<\/p>\n<\/td>\n<td width=\"170\">\u5efa\u7acb\u6307\u5b9a\u7684ftp\u670d\u52a1\u5668\u8fde\u63a5\uff0c\u53ef\u6307\u5b9a\u8fde\u63a5\u7aef\u53e3<\/td>\n<td width=\"211\">newer file-name<\/td>\n<td width=\"187\">\u5982\u679c\u8fdc\u7a0b\u4e3b\u673a\u4e2dfile-name\u7684\u4fee\u6539\u65f6\u95f4\u6bd4\u672c\u5730\u786c\u76d8\u540c\u540d\u6587\u4ef6\u7684\u65f6\u95f4\u66f4\u8fd1\uff0c\u5219\u91cd\u4f20\u8be5\u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\"><strong>cd\u00a0<\/strong>directory<\/p>\n<\/td>\n<td width=\"170\">\u6539\u53d8\u670d\u52a1\u5668\u7684\u5de5\u4f5c\u76ee\u5f55<\/td>\n<td width=\"211\">rename [from][to]<\/td>\n<td width=\"187\">\u66f4\u6539\u8fdc\u7a0b\u4e3b\u673a\u7684\u6587\u4ef6\u540d<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\">lcd directory<\/p>\n<\/td>\n<td width=\"170\">\u5728\u5ba2\u6237\u7aef\u4e0a(\u672c\u5730)\u6539\u53d8\u5de5\u4f5c\u76ee\u5f55<\/td>\n<td width=\"211\"><strong>pwd\u00a0<\/strong><\/td>\n<td width=\"187\">\u663e\u793a\u8fdc\u7a0b\u4e3b\u673a\u7684\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\"><strong>bye<\/strong><\/p>\n<\/td>\n<td width=\"170\">\u9000\u51faFTP\u547d\u4ee4\u72b6\u6001<\/td>\n<td width=\"211\"><strong>quit\u00a0<\/strong><\/td>\n<td width=\"187\">\u540cbye,\u9000\u51faftp\u4f1a\u8bdd<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\">ascii<\/p>\n<\/td>\n<td width=\"170\">\u8bbe\u7f6e\u6587\u4ef6\u4f20\u8f93\u65b9\u5f0f\u4e3aASCII\u6a21\u5f0f<\/td>\n<td width=\"211\">reget remote-file [local-file]<\/td>\n<td width=\"187\">\u7c7b\u4f3c\u4e8eget,\u4f46\u82e5local-file\u5b58\u5728\uff0c\u5219\u4ece\u4e0a\u6b21\u4f20\u8f93\u4e2d\u65ad\u5904\u7eed\u4f20<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\"><strong>binary<\/strong><\/p>\n<\/td>\n<td width=\"170\">\u8bbe\u7f6e\u6587\u4ef6\u4f20\u8f93\u65b9\u5f0f\u4e3a\u4e8c\u8fdb\u5236\u6a21\u5f0f<\/td>\n<td width=\"211\">rhelp [cmd-name]<\/td>\n<td width=\"187\">\u8bf7\u6c42\u83b7\u5f97\u8fdc\u7a0b\u4e3b\u673a\u7684\u5e2e\u52a9<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\">![cmd [args]]<\/p>\n<\/td>\n<td width=\"170\">\u5728\u672c\u5730\u4e3b\u673a\u4e2d\u4ea4\u4e92shell\u540e\u9000\u56de\u5230ftp\u73af\u5883\uff0c\u5982:!ls *.zip<\/td>\n<td width=\"211\">rstatus [file-name]<\/td>\n<td width=\"187\">\u82e5\u672a\u6307\u5b9a\u6587\u4ef6\u540d\uff0c\u5219\u663e\u793a\u8fdc\u7a0b\u4e3b\u673a\u7684\u72b6\u6001\uff0c\u5426\u5219\u663e\u793a\u6587\u4ef6\u72b6\u6001<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\">accout [password]<\/p>\n<\/td>\n<td width=\"170\">\u63d0\u4f9b\u767b\u5f55\u8fdc\u7a0b\u7cfb\u7edf\u6210\u529f\u540e\u8bbf\u95ee\u7cfb\u7edf\u8d44\u6e90\u6240\u9700\u7684\u5bc6\u7801<\/td>\n<td width=\"211\">hash<\/td>\n<td width=\"187\">\u6bcf\u4f20\u8f931024\u5b57\u8282\uff0c\u663e\u793a\u4e00\u4e2ahash\u7b26\u53f7\uff08#\uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\">append local-file [remote-file]<\/p>\n<\/td>\n<td width=\"170\">\u5c06\u672c\u5730\u6587\u4ef6\u8ffd\u52a0\u5230\u8fdc\u7a0b\u7cfb\u7edf\u4e3b\u673a\uff0c\u82e5\u672a\u6307\u5b9a\u8fdc\u7a0b\u7cfb\u7edf\u6587\u4ef6\u540d\uff0c\u5219\u4f7f\u7528\u672c\u5730\u6587\u4ef6\u540d<\/td>\n<td width=\"211\">restart marker<\/td>\n<td width=\"187\">\u4ece\u6307\u5b9a\u7684\u6807\u5fd7marker\u5904\uff0c\u91cd\u65b0\u5f00\u59cbget\u6216put\uff0c\u5982restart 130<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\">bye<\/p>\n<\/td>\n<td width=\"170\">\u9000\u51faftp\u4f1a\u8bdd\u8fc7\u7a0b<\/td>\n<td width=\"211\"><strong>rmdir<\/strong>\u00a0dir-name<\/td>\n<td width=\"187\">\u5220\u9664\u8fdc\u7a0b\u4e3b\u673a\u76ee\u5f55<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\">case<\/p>\n<\/td>\n<td width=\"170\">\u5728\u4f7f\u7528mget\u547d\u4ee4\u65f6\uff0c\u5c06\u8fdc\u7a0b\u4e3b\u673a\u6587\u4ef6\u540d\u4e2d\u7684\u5927\u5199\u8f6c\u4e3a\u5c0f\u5199\u5b57\u6bcd<\/td>\n<td width=\"211\">size file-name<\/td>\n<td width=\"187\">\u663e\u793a\u8fdc\u7a0b\u4e3b\u673a\u6587\u4ef6\u5927\u5c0f\uff0c\u5982\uff1a<br \/>\nsize idle 7200<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\">cd remote-dir<\/p>\n<\/td>\n<td width=\"170\">\u8fdb\u5165\u8fdc\u7a0b\u4e3b\u673a\u76ee\u5f55<\/td>\n<td width=\"211\">status<\/td>\n<td width=\"187\">\u663e\u793a\u5f53\u524dftp\u72b6\u6001<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\">cdup<\/p>\n<\/td>\n<td width=\"170\">\u8fdb\u5165\u8fdc\u7a0b\u4e3b\u673a\u76ee\u5f55\u7684\u7236\u76ee\u5f55<\/td>\n<td width=\"211\">system<\/td>\n<td width=\"187\">\u663e\u793a\u8fdc\u7a0b\u4e3b\u673a\u7684\u64cd\u4f5c\u7cfb\u7edf<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\">delete remote-file<\/p>\n<\/td>\n<td width=\"170\">\u5220\u9664\u8fdc\u7a0b\u4e3b\u673a\u6587\u4ef6<\/td>\n<td width=\"211\">user user-name [password][account]<\/td>\n<td width=\"187\">\u5411\u8fdc\u7a0b\u4e3b\u673a\u8868\u660e\u81ea\u5df1\u7684\u8eab\u4efd\uff0c\u9700\u8981\u5bc6\u7801\u65f6\uff0c\u5fc5\u987b\u8f93\u5165\u5bc6\u7801\uff0c\u5982:user anonymous\u00a0my@email<\/td>\n<\/tr>\n<tr>\n<td width=\"199\">\n<p align=\"center\">dir [remote-dir][local-file]<\/p>\n<\/td>\n<td width=\"170\">\u663e\u793a\u8fdc\u7a0b\u4e3b\u673a\u76ee\u5f55\uff0c\u5e76\u5c06\u7ed3\u679c\u5b58\u5165\u672c\u5730\u6587\u4ef6<\/td>\n<td width=\"211\">help [cmd]<\/td>\n<td width=\"187\">\u663e\u793aftp\u5185\u90e8\u547d\u4ee4cmd\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5982help get<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>FTP\u00a0\u6570\u5b57\u4ee3\u7801\u7684\u610f\u4e49\u00a0<strong>110\u00a0<\/strong><strong>\u91cd\u65b0\u542f\u52a8\u6807\u8bb0\u5e94\u7b54\u3002<\/strong><br \/>\n<strong>120\u00a0<\/strong><strong>\u670d\u52a1\u5728\u591a\u4e45\u65f6\u95f4\u5185<\/strong>\u00a0<strong>ready<\/strong>\u00a0<strong>\u3002<\/strong><br \/>\n<strong>125\u00a0<\/strong><strong>\u6570\u636e\u94fe\u8def\u7aef\u53e3\u5f00\u542f\uff0c\u51c6\u5907\u4f20\u9001\u3002<\/strong><br \/>\n<strong>150\u00a0<\/strong><strong>\u6587\u4ef6\u72b6\u6001\u6b63\u5e38\uff0c\u5f00\u542f\u6570\u636e\u8fde\u63a5\u7aef\u53e3\u3002<\/strong><br \/>\n<strong>200\u00a0<\/strong><strong>\u547d\u4ee4\u6267\u884c\u6210\u529f\u3002<\/strong><br \/>\n<strong>202\u00a0<\/strong><strong>\u547d\u4ee4\u6267\u884c\u5931\u8d25\u3002<\/strong><br \/>\n<strong>211\u00a0<\/strong><strong>\u7cfb\u7edf\u72b6\u6001\u6216\u662f\u7cfb\u7edf\u6c42\u52a9\u54cd\u5e94\u3002<\/strong><br \/>\n<strong>212\u00a0<\/strong><strong>\u76ee\u5f55\u7684\u72b6\u6001\u3002<\/strong><br \/>\n<strong>213\u00a0<\/strong><strong>\u6587\u4ef6\u7684\u72b6\u6001\u3002<\/strong><br \/>\n<strong>214\u00a0<\/strong><strong>\u6c42\u52a9\u7684\u8baf\u606f\u3002<\/strong><br \/>\n<strong>215\u00a0<\/strong><strong>\u540d\u79f0\u7cfb\u7edf\u7c7b\u578b\u3002<\/strong><br \/>\n<strong>220\u00a0<\/strong><strong>\u65b0\u7684\u8054\u673a\u670d\u52a1<\/strong>\u00a0<strong>ready<\/strong>\u00a0<strong>\u3002<\/strong><br \/>\n<strong>221\u00a0<\/strong><strong>\u670d\u52a1\u7684\u63a7\u5236\u8fde\u63a5\u7aef\u53e3\u5173\u95ed\uff0c\u53ef\u4ee5\u6ce8\u9500\u3002<\/strong><br \/>\n<strong>225\u00a0<\/strong><strong>\u6570\u636e\u8fde\u7ed3\u5f00\u542f\uff0c\u4f46\u65e0\u4f20\u8f93\u52a8\u4f5c\u3002<\/strong><br \/>\n<strong>226\u00a0<\/strong><strong>\u5173\u95ed\u6570\u636e\u8fde\u63a5\u7aef\u53e3\uff0c\u8bf7\u6c42\u7684\u6587\u4ef6\u64cd\u4f5c\u6210\u529f\u3002<\/strong><br \/>\n<strong>227\u00a0<\/strong><strong>\u8fdb\u5165<\/strong>\u00a0<strong>passive mode<\/strong>\u00a0<strong>\u3002<\/strong><br \/>\n<strong>230\u00a0<\/strong><strong>\u4f7f\u7528\u8005\u767b\u5165\u3002<\/strong><br \/>\n<strong>250\u00a0<\/strong><strong>\u8bf7\u6c42\u7684\u6587\u4ef6\u64cd\u4f5c\u5b8c\u6210\u3002<\/strong><br \/>\n<strong>257\u00a0<\/strong><strong>\u663e\u793a\u76ee\u524d\u7684\u8def\u5f84\u540d\u79f0\u3002<\/strong><br \/>\n<strong>331\u00a0<\/strong><strong>\u7528\u6237\u540d\u79f0\u6b63\u786e\uff0c\u9700\u8981\u5bc6\u7801\u3002<\/strong><br \/>\n<strong>332\u00a0<\/strong><strong>\u767b\u5165\u65f6\u9700\u8981\u8d26\u53f7\u4fe1\u606f\u3002<\/strong><br \/>\n<strong>350\u00a0<\/strong><strong>\u8bf7\u6c42\u7684\u64cd\u4f5c\u9700\u8981\u8fdb\u4e00\u90e8\u7684\u547d\u4ee4\u3002<\/strong><br \/>\n<strong>421\u00a0<\/strong><strong>\u65e0\u6cd5\u63d0\u4f9b\u670d\u52a1\uff0c\u5173\u95ed\u63a7\u5236\u8fde\u7ed3\u3002<\/strong><br \/>\n<strong>425\u00a0<\/strong><strong>\u65e0\u6cd5\u5f00\u542f\u6570\u636e\u94fe\u8def\u3002<\/strong><br \/>\n<strong>426\u00a0<\/strong><strong>\u5173\u95ed\u8054\u673a\uff0c\u7ec8\u6b62\u4f20\u8f93\u3002<\/strong><br \/>\n<strong>450\u00a0<\/strong><strong>\u8bf7\u6c42\u7684\u64cd\u4f5c\u672a\u6267\u884c\u3002<\/strong><br \/>\n<strong>451\u00a0<\/strong><strong>\u547d\u4ee4\u7ec8\u6b62<\/strong>\u00a0<strong>:<\/strong>\u00a0<strong>\u6709\u672c\u5730\u7684\u9519\u8bef\u3002<\/strong><br \/>\n<strong>452\u00a0<\/strong><strong>\u672a\u6267\u884c\u547d\u4ee4<\/strong>\u00a0<strong>:<\/strong>\u00a0<strong>\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db3\u3002<\/strong><br \/>\n<strong>500\u00a0<\/strong><strong>\u683c\u5f0f\u9519\u8bef\uff0c\u65e0\u6cd5\u8bc6\u522b\u547d\u4ee4\u3002<\/strong><br \/>\n<strong>501\u00a0<\/strong><strong>\u53c2\u6570\u8bed\u6cd5\u9519\u8bef\u3002<\/strong><br \/>\n<strong>502\u00a0<\/strong><strong>\u547d\u4ee4\u6267\u884c\u5931\u8d25\u3002<\/strong><br \/>\n<strong>503\u00a0<\/strong><strong>\u547d\u4ee4\u987a\u5e8f\u9519\u8bef\u3002<\/strong><br \/>\n<strong>504\u00a0<\/strong><strong>\u547d\u4ee4\u6240\u63a5\u7684\u53c2\u6570\u4e0d\u6b63\u786e\u3002<\/strong><br \/>\n<strong>530\u00a0<\/strong><strong>\u672a\u767b\u5165\u3002<\/strong>\u00a0<strong>\u00a0\u00a0532\u00a0<\/strong><strong>\u50a8\u5b58\u6587\u4ef6\u9700\u8981\u8d26\u6237\u767b\u5165\u3002<\/strong>\u00a0<strong>550\u00a0<\/strong><strong>\u672a\u6267\u884c\u8bf7\u6c42\u7684\u64cd\u4f5c\u3002<\/strong>\u00a0<strong>551\u00a0<\/strong><strong>\u8bf7\u6c42\u7684\u547d\u4ee4\u7ec8\u6b62\uff0c\u7c7b\u578b\u672a\u77e5\u3002<\/strong><br \/>\n<strong>552\u00a0<\/strong><strong>\u8bf7\u6c42\u7684\u6587\u4ef6\u7ec8\u6b62\uff0c\u50a8\u5b58\u4f4d\u6ea2\u51fa\u3002<\/strong>\u00a0<strong>\u00a0 \u00a0553\u00a0<\/strong><strong>\u672a\u6267\u884c\u8bf7\u6c42\u7684\u7684\u547d\u4ee4\uff0c\u540d\u79f0\u4e0d\u6b63\u786e\u3002<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u6211\u867d\u7136\u77e5\u9053FTP\u5b58\u5728\u4e24\u79cd\u6a21\u5f0f\uff1aPORT\uff08\u4e3b\u52a8\uff09\u6a21\u5f0f\u3001PASV\uff08\u88ab\u52a8\uff09\u6a21\u5f0f\uff0c\u4f46\u662f\u5374\u4e0d\u77e5\u9053vsftpd\u6b64\u65f6\u7adf\u7136\u201c\u4e0d\u652f\u6301\u201d\u88ab\u52a8\u6a21\u5f0f\uff01\u4e0d\u4f1a\u7684\uff0c\u4e00\u5b9a\u662f\u914d\u7f6e\u51fa\u4e86\u95ee\u9898~\u7ecf\u8fc7\u4e00\u756a\u641c\u7d22\uff0c\u53d1\u73b0\u4e86\u5176\u4e2d\u7684\u7aef\u502a\uff1a<\/p>\n<p><strong>FTP\u4e24\u79cd\u6a21\u5f0f\u7684\u533a\u522b\uff1a<\/strong><\/p>\n<p>\uff081\uff09PORT\uff08\u4e3b\u52a8\uff09\u6a21\u5f0f<\/p>\n<p>\u6240\u8c13\u4e3b\u52a8\u6a21\u5f0f\uff0c\u6307\u7684\u662fFTP\u670d\u52a1\u5668\u201c\u4e3b\u52a8\u201d\u53bb\u8fde\u63a5\u5ba2\u6237\u7aef\u7684\u6570\u636e\u7aef\u53e3\u6765\u4f20\u8f93\u6570\u636e\uff0c\u5176\u8fc7\u7a0b\u5177\u4f53\u6765\u8bf4\u5c31\u662f\uff1a\u5ba2\u6237\u7aef\u4ece\u4e00\u4e2a\u4efb\u610f\u7684\u975e\u7279\u6743\u7aef\u53e3N\uff08N&gt;1024\uff09\u8fde\u63a5\u5230FTP\u670d\u52a1\u5668\u7684\u547d\u4ee4\u7aef\u53e3\uff08\u5373tcp 21\u7aef\u53e3\uff09\uff0c\u7d27\u63a5\u7740\u5ba2\u6237\u7aef\u5f00\u59cb\u76d1\u542c\u7aef\u53e3N+1\uff0c\u5e76\u53d1\u9001FTP\u547d\u4ee4\u201cport N+1\u201d\u5230FTP\u670d\u52a1\u5668\u3002\u7136\u540e\u670d\u52a1\u5668\u4f1a\u4ece\u5b83\u81ea\u5df1\u7684\u6570\u636e\u7aef\u53e3\uff0820\uff09\u201c\u4e3b\u52a8\u201d\u8fde\u63a5\u5230\u5ba2\u6237\u7aef\u6307\u5b9a\u7684\u6570\u636e\u7aef\u53e3\uff08N+1\uff09\uff0c\u8fd9\u6837\u5ba2\u6237\u7aef\u5c31\u53ef\u4ee5\u548cftp\u670d\u52a1\u5668\u5efa\u7acb\u6570\u636e\u4f20\u8f93\u901a\u9053\u4e86\u3002<\/p>\n<p>\uff082\uff09PASV\uff08\u88ab\u52a8\uff09\u6a21\u5f0f<\/p>\n<p>\u6240\u8c13\u88ab\u52a8\u6a21\u5f0f\uff0c\u6307\u7684\u662fFTP\u670d\u52a1\u5668\u201c\u88ab\u52a8\u201d\u7b49\u5f85\u5ba2\u6237\u7aef\u6765\u8fde\u63a5\u81ea\u5df1\u7684\u6570\u636e\u7aef\u53e3\uff0c\u5176\u8fc7\u7a0b\u5177\u4f53\u662f\uff1a\u5f53\u5f00\u542f\u4e00\u4e2aFTP\u8fde\u63a5\u65f6\uff0c\u5ba2\u6237\u7aef\u6253\u5f00\u4e24\u4e2a\u4efb\u610f\u7684\u975e\u7279\u6743\u672c\u5730\u7aef\u53e3\uff08N &gt;1024\u548cN+1\uff09\u3002\u7b2c\u4e00\u4e2a\u7aef\u53e3\u8fde\u63a5\u670d\u52a1\u5668\u768421\u7aef\u53e3\uff0c\u4f46\u4e0e\u4e3b\u52a8\u65b9\u5f0f\u7684FTP\u4e0d\u540c\uff0c\u5ba2\u6237\u7aef\u4e0d\u4f1a\u63d0\u4ea4PORT\u547d\u4ee4\u5e76\u5141\u8bb8\u670d\u52a1\u5668\u6765\u56de\u8fde\u5b83\u7684\u6570\u636e\u7aef\u53e3\uff0c\u800c\u662f\u63d0\u4ea4PASV\u547d\u4ee4\u3002\u8fd9\u6837\u505a\u7684\u7ed3\u679c\u662f\u670d\u52a1\u5668\u4f1a\u5f00\u542f\u4e00\u4e2a\u4efb\u610f\u7684\u975e\u7279\u6743\u7aef\u53e3\uff08P &gt; 1024\uff09\uff0c\u5e76\u53d1\u9001PORT P\u547d\u4ee4\u7ed9\u5ba2\u6237\u7aef\u3002\u7136\u540e\u5ba2\u6237\u7aef\u53d1\u8d77\u4ece\u672c\u5730\u7aef\u53e3N+1\u5230\u670d\u52a1\u5668\u7684\u7aef\u53e3P\u7684\u8fde\u63a5\u7528\u6765\u4f20\u9001\u6570\u636e\u3002\uff08\u6ce8\u610f\u6b64\u6a21\u5f0f\u4e0b\u7684FTP\u670d\u52a1\u5668\u4e0d\u9700\u8981\u5f00\u542ftcp 20\u7aef\u53e3\u4e86\uff09<\/p>\n<p><strong>\u4e24\u79cd\u6a21\u5f0f\u7684\u6bd4\u8f83\uff1a<\/strong><\/p>\n<p>\uff081\uff09PORT\uff08\u4e3b\u52a8\uff09\u6a21\u5f0f\u6a21\u5f0f\u53ea\u8981\u5f00\u542f\u670d\u52a1\u5668\u768421\u548c20\u7aef\u53e3\uff0c\u800cPASV\uff08\u88ab\u52a8\uff09\u6a21\u5f0f\u9700\u8981\u5f00\u542f\u670d\u52a1\u5668\u5927\u4e8e1024\u6240\u6709tcp\u7aef\u53e3\u548c21\u7aef\u53e3\u3002<\/p>\n<p>\uff082\uff09\u4ece\u7f51\u7edc\u5b89\u5168\u7684\u89d2\u5ea6\u6765\u770b\u7684\u8bdd\u4f3c\u4e4eftp PORT\u6a21\u5f0f\u66f4\u5b89\u5168\uff0c\u800cftp PASV\u66f4\u4e0d\u5b89\u5168\uff0c\u90a3\u4e48\u4e3a\u4ec0\u4e48RFC\u8981\u5728ftp PORT\u57fa\u7840\u518d\u5236\u5b9a\u4e00\u4e2aftp PASV\u6a21\u5f0f\u5462\uff1f\u5176\u5b9eRFC\u5236\u5b9aftp PASV\u6a21\u5f0f\u7684\u4e3b\u8981\u76ee\u7684\u662f\u4e3a\u4e86\u6570\u636e\u4f20\u8f93\u5b89\u5168\u89d2\u5ea6\u51fa\u53d1\u7684\uff0c\u56e0\u4e3aftp port\u4f7f\u7528\u56fa\u5b9a20\u7aef\u53e3\u8fdb\u884c\u4f20\u8f93\u6570\u636e\uff0c\u90a3\u4e48\u4f5c\u4e3a\u9ed1\u5ba2\u5f88\u5bb9\u4f7f\u7528sniffer\u7b49\u63a2\u55c5\u5668\u6293\u53d6ftp\u6570\u636e\uff0c\u8fd9\u6837\u4e00\u6765\u901a\u8fc7ftp PORT\u6a21\u5f0f\u4f20\u8f93\u6570\u636e\u5f88\u5bb9\u6613\u88ab\u9ed1\u5ba2\u7a83\u53d6\uff0c\u56e0\u6b64\u4f7f\u7528PASV\u65b9\u5f0f\u6765\u67b6\u8bbeftp server\u662f\u6700\u5b89\u5168\u7edd\u4f73\u65b9\u6848\u3002<\/p>\n<p><strong>\u56e0\u6b64\uff1a<\/strong>\u5982\u679c\u53ea\u662f\u7b80\u5355\u7684\u4e3a\u4e86\u6587\u4ef6\u5171\u4eab\uff0c\u5b8c\u5168\u53ef\u4ee5\u7981\u7528PASV\u6a21\u5f0f\uff0c\u89e3\u9664\u5f00\u653e\u5927\u91cf\u7aef\u53e3\u7684\u5a01\u80c1\uff0c\u540c\u65f6\u4e5f\u4e3a\u9632\u706b\u5899\u7684\u8bbe\u7f6e\u5e26\u6765\u4fbf\u5229\u3002<\/p>\n<p>\u4e0d\u5e78\u7684\u662f\uff0cFTP\u5de5\u5177\u6216\u8005\u6d4f\u89c8\u5668\u9ed8\u8ba4\u4f7f\u7528\u7684\u90fd\u662fPASV\u6a21\u5f0f\u8fde\u63a5FTP\u670d\u52a1\u5668\uff0c\u56e0\u6b64\uff0c\u5fc5\u987b\u8981\u4f7fvsftpd\u5728\u5f00\u542f\u4e86\u9632\u706b\u5899\u7684\u60c5\u51b5\u4e0b\uff0c\u4e5f\u80fd\u591f\u652f\u6301PASV\u6a21\u5f0f\u8fdb\u884c\u6570\u636e\u8bbf\u95ee\u3002<\/p>\n<p><strong>\u5982\u4f55\u5f00\u542fvsftpd\u7684PASV\u6a21\u5f0f\uff1f<\/strong><\/p>\n<p>\uff081\uff09\u4fee\u6539\/etc\/vsftpd\/vsftpd.conf\u6587\u4ef6\u914d\u7f6e<\/p>\n<div class=\"cnblogs_code\">\n<pre>pasv_enable=yes \uff08Default: YES\uff09 \u8bbe\u7f6e\u662f\u5426\u5141\u8bb8pasv\u6a21\u5f0f\n#pasv_promiscuous=no \uff08Default: NO\uff09 \u662f\u5426\u5c4f\u853d\u5bf9pasv\u8fdb\u884c\u5b89\u5168\u68c0\u67e5\uff0c\uff08\u5f53\u6709\u5b89\u5168\u96a7\u9053\u65f6\u53ef\u7981\u7528\uff09\npasv_max_port=10240 \uff08Default: 0 (use any port)\uff09 pasv\u4f7f\u7528\u7684\u6700\u5927\u7aef\u53e3\npasv_min_port=20480 \uff08Default: 0 (use any port)\uff09 pasv\u4f7f\u7528\u7684\u6700\u5c0f\u7aef\u53e3<\/pre>\n<\/div>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0bvsftpd\u662f\u652f\u6301PASV\u6a21\u5f0f\u8bbf\u95ee\u7684\uff0c\u53ef\u4ee5\u4e0d\u4f5c\u4fee\u6539\u3002<\/p>\n<p>\uff082\uff09\u7ed9\u9632\u706b\u5899\u6dfb\u52a0FTP\u8bbf\u95ee\u8f6c\u6362\u652f\u6301\u6a21\u5757<\/p>\n<div class=\"cnblogs_code\">\n<pre>#vi \/etc\/sysconfig\/iptables-config\n\n\/\/ \u6dfb\u52a0\u4ee5\u4e0b\u4e24\u884c\uff1a\nIPTABLES_MODULES=\"ip_conntrack_ftp\"\nIPTABLES_MODULES=\"ip_nat_ftp\"<\/pre>\n<\/div>\n<p>\u8bf7\u4e00\u5b9a\u6ce8\u610f\u4e24\u884c\u5185\u5bb9\u7684\u4f4d\u7f6e\u5173\u7cfb\u4e0d\u8981\u641e\u53cd\u4e86\u3002\u5982\u679c\u5c06\"ip_nat_ftp\"\u653e\u5230\u524d\u9762\u662f\u52a0\u8f7d\u4e0d\u5230\u7684\u3002\u5982\u679c\u4f60\u7684ftp\u670d\u52a1\u662f\u8fc7\u8def\u7531\u6216\u8005\u9632\u706b\u5899\uff08\u5373\u5185\u7f51\u6620\u5c04\u65b9\u5f0f\u4e00\u5b9a\u9700\u8981\u6b64\u6a21\u5757\uff09\u3002\u4ee5\u4e0a\u7b49\u540c\u4e8e\u5728\u52a0\u8f7diptables\u4e4b\u524d\u8fd0\u884cmodprobe\u547d\u4ee4\u52a0\u8f7d\"ip_nat_ftp\"\u548c\"ip_conntrack_ftp\"\u6a21\u5757\u3002<\/p>\n<p>\uff083\uff09\u7ed9\u9632\u706b\u5899\u6dfb\u52a0\u8bbf\u95ee\u89c4\u5219\u5141\u8bb8<\/p>\n<div class=\"cnblogs_code\">\n<pre>-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT\n-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --sport 21 -j<\/pre>\n<\/div>\n<p>\uff084\uff09\u91cd\u542f\u9632\u706b\u5899\u670d\u52a1<\/p>\n<div class=\"cnblogs_code\">\n<pre>service iptables restart<\/pre>\n<\/div>\n<p>\uff085\uff09\u68c0\u67e5\u6a21\u5757\u662f\u5426\u52a0\u8f7d\u6210\u529f<\/p>\n<div class=\"cnblogs_code\">\n<pre>#lsmod |grep ftp\n\np_nat_ftp              7361  0 \nip_nat                 21229  1 ip_nat_ftp\nip_conntrack_ftp       11569  1 ip_nat_ftp\nip_conntrack           53665  4 ip_nat_ftp,ip_nat,ip_conntrack_ftp,xt_state<\/pre>\n<\/div>\n<p>\u4ee5\u4e0a\u4fe1\u606f\u8868\u660e\u6a21\u5757\u52a0\u8f7d\u6210\u529f\uff0c\u53ef\u4ee5\u5728\u5176\u4ed6\u673a\u5668\u4e0a\u4f7f\u7528FTP\u5ba2\u6237\u7aef\u8fdb\u884c\u8bbf\u95ee\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u4f7f\u7528cmds_allows\u547d\u4ee4\u914d\u7f6e\uff0c\u5c06\u4e0d\u5141\u8bb8\u7684\u547d\u4ee4(\u91cd\u547d\u540d,\u4e0b\u8f7d,\u5220\u9664,\u521b\u5efa\u6587\u4ef6\u5939)\u9664\u53bb\u5373\u53ef:<\/p>\n<p>cmds_allowed=FEAT,REST,CWD,LIST,MDTM,NLST,PASS,PASV,PORT,PWD,QUIT,RMD,SIZE,STOR,TYPE,USER,ACCT,APPE,CDUP,HELP,MODE,NOOP,REIN,STAT,STOU,STRU,SYST<br \/>\n\u4e3b\u8981\u547d\u4ee4\u89e3\u91ca\u5982\u4e0b:<\/p>\n<p>=====================\u6700\u5e38\u7528\u7684\uff0c\u51fa\u53bb\u5bf9\u5e94\u547d\u4ee4\u5373\u53ef========================<br \/>\nMKD - make a remote directory \u65b0\u5efa\u6587\u4ef6\u5939<br \/>\nNLST - name list of remote directory<br \/>\nPWD - print working directory \u663e\u793a\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<br \/>\nRETR - retrieve a remote file \u4e0b\u8f7d\u6587\u4ef6<br \/>\nSTOR - store a file on the remote host \u4e0a\u4f20\u6587\u4ef6<br \/>\nDELE - delete a remote file \u5220\u9664\u6587\u4ef6<br \/>\nRMD - remove a remote directory \u5220\u9664\u76ee\u5f55<br \/>\nRNFR - rename from \u91cd\u547d\u540d<\/p>\n<h1>RNTO - rename to \u91cd\u547d\u540d<\/h1>\n<p>ABOR - abort a file transfer \u53d6\u6d88\u6587\u4ef6\u4f20\u8f93<br \/>\nCWD - change working directory \u66f4\u6539\u76ee\u5f55<br \/>\nDELE - delete a remote file \u5220\u9664\u6587\u4ef6<br \/>\nLIST - list remote files \u5217\u76ee\u5f55<br \/>\nMDTM - return the modification time of a file \u8fd4\u56de\u6587\u4ef6\u7684\u66f4\u65b0\u65f6\u95f4<br \/>\nMKD - make a remote directory \u65b0\u5efa\u6587\u4ef6\u5939<br \/>\nNLST - name list of remote directory<br \/>\nPASS - send password<br \/>\nPASV - enter passive mode<br \/>\nPORT - open a data port \u6253\u5f00\u4e00\u4e2a\u4f20\u8f93\u7aef\u53e3<br \/>\nPWD - print working directory \u663e\u793a\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<br \/>\nQUIT - terminate the connection \u9000\u51fa<br \/>\nRETR - retrieve a remote file \u4e0b\u8f7d\u6587\u4ef6<br \/>\nRMD - remove a remote directory<br \/>\nRNFR - rename from<br \/>\nRNTO - rename to<br \/>\nSITE - site-specific commands<br \/>\nSIZE - return the size of a file \u8fd4\u56de\u6587\u4ef6\u5927\u5c0f<br \/>\nSTOR - store a file on the remote host \u4e0a\u4f20\u6587\u4ef6<br \/>\nTYPE - set transfer type<\/p>\n<h2>USER - send username<\/h2>\n<div>VSFTPD\u7684\u975e\u5e38\u6709\u7528\u7684\u6743\u9650\u63a7\u5236\u8bed\u53e5<br \/>\n\u4e5f\u8bb8\u5728\u4f7f\u7528FTP\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u662f\u6709\u4e00\u4e9b\u6743\u9650\u63a7\u5236\u7684\u4e0d\u5982\u610f\uff0c\u90a3\u4e0b\u9762\u6211\u7ed9\u5927\u5bb6\u63d0\u4f9b\u7684\u5e0c\u671b\u80fd\u5bf9\u5927\u5bb6\u6709\u7528\uff01<br \/>\n\u6211\u4eec\u9996\u5148\u6765\u770b\u770b\u4e0b\u9762\u7684\u51e0\u4e2a\u4f8b\u5b50\uff1a<br \/>\n1\u3001\u53ea\u80fd\u4e0a\u4f20\u3002\u4e0d\u80fd\u4e0b\u8f7d\u3001\u5220\u9664\u3001\u91cd\u547d\u540d\u3002<br \/>\ncmds_allowed\uff1dFEAT,REST,CWD,LIST,MDTM,MKD,NLST,PASS,PASV,PORT,PWD,QUIT,RMD,SIZE,STOR,TYPE,USER,ACCT,APPE,CDUP,HELP,MODE,NOOP,REIN,STAT,STOU,STRU,SYST<br \/>\n2\u3001\u53ea\u80fd\u4e0b\u8f7d\u3002\u4e0d\u80fd\u4e0a\u4f20\u3001\u5220\u9664\u3001\u91cd\u547d\u540d\u3002write_enable=NO<br \/>\n3\u3001\u53ea\u80fd\u4e0a\u4f20\u3001\u5220\u9664\u3001\u91cd\u547d\u540d\u3002\u4e0d\u80fd\u4e0b\u8f7d\u3002download_enable\uff1dNO<br \/>\n4\u3001\u53ea\u80fd\u4e0b\u8f7d\u3001\u5220\u9664\u3001\u91cd\u547d\u540d\u3002\u4e0d\u80fd\u4e0a\u4f20\u3002<br \/>\ncmds_allowed=FEAT,REST,CWD,LIST,MDTM,MKD,NLST,PASS,PASV,PORT,PWD,QUIT,RMD,RNFR,RNTO,RETR,DELE,SIZE,TYPE,USER,ACCT,APPE,CDUP,HELP,MODE,NOOP,REIN,STAT,STOU,STRU,SYST<br \/>\n\u4ee5\u4e0a\u76842\u30013\u4e24\u70b9\u597d\u63a7\u5236\uff0c\u53ef\u662f1\u548c4\u5c31\u4e0d\u662f\u90a3\u4e48\u597d\u63a7\u5236\u4e86\uff01\u6211\u7ed9\u51fa\u4e861\u548c4\u7684\u65b9\u6cd5\uff0c\u5f53\u7136\uff0c\u5927\u5bb6\u4e5f\u53ef\u4ee5\u8bf4\u8bf4\u81ea\u5df1\u662f\u5982\u4f55\u5b9e\u73b01\u548c4\u7684\u63a7\u5236\u7684\uff0c\u6211\u4eec\u76f8\u4e92\u4ea4\u6d41\uff01<br \/>\n\u4e0b\u9762\u6211\u5c31\u628a\u5177\u4f53\u7684\u4e00\u4e9b\u53c2\u6570\u6765\u548c\u5927\u5bb6\u8bf4\u8bf4\uff01CWD - change working directory \u66f4\u6539\u76ee\u5f55<br \/>\nLIST - list remote files \u5217\u76ee\u5f55<br \/>\nMKD - make a remote directory \u65b0\u5efa\u6587\u4ef6\u5939<br \/>\nNLST - name list of remote directory<br \/>\nPWD - print working directory \u663e\u793a\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<br \/>\nRETR - retrieve a remote file \u4e0b\u8f7d\u6587\u4ef6<br \/>\nSTOR - store a file on the remote host \u4e0a\u4f20\u6587\u4ef6DELE - delete a remote file \u5220\u9664\u6587\u4ef6<br \/>\nRMD - remove a remote directory \u5220\u9664\u76ee\u5f55<br \/>\nRNFR - rename from \u91cd\u547d\u540d<br \/>\nRNTO - rename to \u91cd\u547d\u540d<\/p>\n<p>\u4ee5\u4e0a\u662f\u5e38\u7528\u7684\u4e00\u4e9b\u53c2\u6570\uff0c\u5927\u5bb6\u5bf9\u7167\u5b66\u4e60\u4e00\u4e0b\uff01\u4e0b\u9762\u662f\u5217\u4e5f\u7684\u5168\u90e8\u53c2\u6570\uff0c\u4f9b\u5927\u5bb6\u53c2\u8003\uff01<\/p>\n<p># ABOR - abort a file transfer \u53d6\u6d88\u6587\u4ef6\u4f20\u8f93<br \/>\n# CWD - change working directory \u66f4\u6539\u76ee\u5f55<br \/>\n# DELE - delete a remote file \u5220\u9664\u6587\u4ef6<br \/>\n# LIST - list remote files \u5217\u76ee\u5f55<br \/>\n# MDTM - return the modification time of a file \u8fd4\u56de\u6587\u4ef6\u7684\u66f4\u65b0\u65f6\u95f4<br \/>\n# MKD - make a remote directory \u65b0\u5efa\u6587\u4ef6\u5939<br \/>\n# NLST - name list of remote directory<br \/>\n# PASS - send password<br \/>\n# PASV - enter passive mode<br \/>\n# PORT - open a data port \u6253\u5f00\u4e00\u4e2a\u4f20\u8f93\u7aef\u53e3<br \/>\n# PWD - print working directory \u663e\u793a\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<br \/>\n# QUIT - terminate the connection \u9000\u51fa<br \/>\n# RETR - retrieve a remote file \u4e0b\u8f7d\u6587\u4ef6<br \/>\n# RMD - remove a remote directory<br \/>\n# RNFR - rename from<br \/>\n# RNTO - rename to<br \/>\n# SITE - site-specific commands<br \/>\n# SIZE - return the size of a file \u8fd4\u56de\u6587\u4ef6\u5927\u5c0f<br \/>\n# STOR - store a file on the remote host \u4e0a\u4f20\u6587\u4ef6<br \/>\n# TYPE - set transfer type<br \/>\n# USER - send username<\/p>\n<p># less common commands:<\/p>\n<p># ACCT* - send account information<br \/>\n# APPE - append to a remote file<br \/>\n# CDUP - CWD to the parent of the current directory<br \/>\n# HELP - return help on using the server<br \/>\n# MODE - set transfer mode<br \/>\n# NOOP - do nothing<br \/>\n# REIN* - reinitialize the connection<br \/>\n# STAT - return server status<br \/>\n# STOU - store a file uniquely<br \/>\n# STRU - set file transfer structure<br \/>\n# SYST - return system type<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>\u5c0f\u95ee\u9898\u6c47\u96c6\uff1a<\/strong><\/p>\n<p>&lt;1&gt;vsftpd\u8fde\u63a5\u901f\u5ea6\u975e\u5e38\u6162\uff0c\u9700\u8981\u7b49\u4e0a\u5341\u51e0\u79d2\uff0c\u8fd9\u662f\u4e3a\u4ec0\u4e48\uff1f<\/p>\n<p><strong>\u89e3\u7b54\uff1a<\/strong>\u539f\u56e0\u662fvsftp\u5728\u767b\u9646\u65f6\u505a\u4e86DNS\u68c0\u67e5\u6765\u786e\u8ba4\u57df\u540d\uff0c\u89e3\u51b3\u529e\u6cd5\u6709\u4e24\u4e2a\uff1a1\u3001\u5728resolv.conf\u6587\u4ef6\u4e2d\u5220\u9664localhost\u6216\u8005127.0.0.1\u8fd9\u6837\u7684\u5730\u5740\uff1b2\u3001\u5728vsftpd.conf\u6587\u4ef6\u4e2d\u52a0\u5165\uff1areverse_lookup_enable=NO\u3002<\/p>\n<p>&lt;2&gt;\u5982\u4f55\u6307\u5b9a\u7279\u5b9a\u7528\u6237\u7684\u64cd\u4f5c\u6743\u9650\uff1f<\/p>\n<p><strong>\u89e3\u7b54\uff1a<\/strong>\u5728vsftp\u7684\u914d\u7f6e\u6587\u4ef6\/etc\/vsftpd.conf\u91cc\u5934\u6dfb\u52a0\u8fd9\u4e48\u4e00\u884c\uff1auser_config_dir=\/etc\/vsftpd_user_conf\uff0c\u7136\u540e\u5728\/etc\/vsftpd_user_conf\u76ee\u5f55\u91cc\u5934\u521b\u5efa\u548c\u7528\u6237\u540d\u540c\u540d\u7684\u6587\u4ef6\uff0c\u6bd4\u5982ftpuser\uff0c\u6dfb\u52a0\u5982\u4e0b\u5185\u5bb9\uff1a<\/p>\n<div class=\"cnblogs_code\">\n<pre>local_root=\/vsr\/www\/html        \/\/ \u6307\u5b9a\u7528\u6237\u76ee\u5f55\n\/\/ \u6307\u5b9a\u7528\u6237\u7684\u64cd\u4f5c\u6743\u9650\uff08\u8fd9\u91cc\u8868\u793a\u53ef\u4e0a\u4f20\u4e0b\u8f7d\uff0c\u5220\u9664\uff0c\u521b\u5efa\u6587\u4ef6\u5939\u7b49\uff09 \ncmds_allowed=ABOR,CWD,LIST,DELE,RMD,MDTM,MKD,NLST,PASS,PASV,PORT,PWD,QUIT,REST,RETR,RNFR,RNTO,SIZE,STOR,TYPE,USER,ACCT,APPE,CDUP,HELP,MODE,NOOP,REIN,STAT,STOU,STRU,SYST<\/pre>\n<\/div>\n<p>\u6ce8\u610f\uff0c\u7528\u6237\u4e0d\u80fd\u4e0a\u4f20\u548c\u5220\u9664\u6781\u6709\u53ef\u80fd\u662f\u6587\u4ef6\u5939\u64cd\u4f5c\u6743\u9650\u7684\u95ee\u9898\uff0c\u901a\u8fc7chmod\u53ef\u4ee5\u89e3\u51b3\u3002<\/p>\n<p>&lt;3&gt;\u5982\u4f55\u5f00\u542fFTP\u64cd\u4f5c\u65e5\u5fd7\u529f\u80fd\uff1f<\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u89e3\u7b54\uff1a<\/strong>\u5728vsftp\u7684\u914d\u7f6e\u6587\u4ef6\/etc\/vsftp.conf\u91cc\u5934\u6dfb\u52a0\u5982\u4e0b\u5185\u5bb9\uff0c\u5df2\u6709\u7684\u8fdb\u884c\u4fee\u6539\u5373\u53ef\uff1a<\/p>\n<div class=\"cnblogs_code\">\n<pre class=\"cnblogs_code_toolbar\">xferlog_enable=YES             \/\/ FTP\u670d\u52a1\u5668\u8bb0\u5f55\u4e0a\u4f20\u4e0b\u8f7d\u60c5\u51b5\nxferlog_std_format=YES      \u3000\u3000\/\/ \u8868\u793a\u5c06\u8bb0\u5f55\u7684\u4e0a\u4f20\u4e0b\u8f7d\u60c5\u51b5\u5199\u5728xferlog_file\u6240\u6307\u5b9a\u7684\u6587\u4ef6\u4e2d\uff0c\u5373\/var\/log\/xferlog\u6587\u4ef6\nxferlog_file=\/var\/log\/xferlog   \/\/ \u6307\u5b9a\u65e5\u5fd7\u8bb0\u5f55\u6587\u4ef6\uff08\u8be5\u6587\u4ef6\u53ef\u4ee5\u5229\u7528\u6807\u51c6\u65e5\u5fd7\u5de5\u5177\u8fdb\u884c\u5206\u6790\uff09\ndual_log_enable=YES         \u3000\u3000\/\/ \u5f00\u542f\u53cc\u4efd\u65e5\u5fd7\u8bb0\u5f55\u529f\u80fd\uff0c\u5728\u7528xferlog\u6587\u4ef6\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u4f20\u4e0b\u8f7d\u60c5\u51b5\u7684\u540c\u65f6\uff0cvsftpd_log_file\u6240\u6307\u5b9a\u7684\u6587\u4ef6\uff08\u5373\/var\/log\/vsftpd.log\uff09\uff0c\u4e5f\u5c06\u7528\u6765\u8bb0\u5f55\u670d\u52a1\u5668\u7684\u4f20\u8f93\u60c5\u51b5\nvsftpd_log_file=\/var\/log\/vsftpd.log      \/\/ vsftpd\u683c\u5f0f\u7684\u65e5\u5fd7\u6587\u4ef6\nsyslog_enable=NO            \u3000\u3000\/\/ \u5c06vsftpd\u65e5\u5fd7\u8f93\u51fa\u5230\u7cfb\u7edf\u65e5\u5fd7\u4e2d<\/pre>\n<\/div>\n<div>-----------------------------------------------------------------------------------------------------------------------------------------<\/div>\n<div>\n<p><strong>\u865a\u62df\u7528\u6237\u9ad8\u7ea7\u8bbe\u7f6e<\/strong><\/p>\n<p><strong>1.\u00a0<\/strong><strong>virtual_use_local_privs<\/strong><strong>\u53c2\u6570<\/strong><\/p>\n<p>\u5f53virtual_use_local_privs=YES\u65f6\uff0c\u865a\u62df\u7528\u6237\u548c\u672c\u5730\u7528\u6237\u6709\u76f8\u540c\u7684\u6743\u9650\uff1b<\/p>\n<p>\u5f53virtual_use_local_privs=NO\u65f6\uff0c\u865a\u62df\u7528\u6237\u548c\u533f\u540d\u7528\u6237\u6709\u76f8\u540c\u7684\u6743\u9650\uff0c\u9ed8\u8ba4\u662fNO\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u5f53virtual_use_local_privs=YES\uff0cwrite_enable=YES\u65f6\uff0c\u865a\u62df\u7528\u6237\u5177\u6709\u5199\u6743\u9650\uff08\u4e0a\u4f20\u3001\u4e0b\u8f7d\u3001\u5220\u9664\u3001\u91cd\u547d\u540d\uff09\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u5f53virtual_use_local_privs=NO\uff0cwrite_enable=YES\uff0canon_world_readable_only=YES\uff0c<\/p>\n<p>anon_upload_enable=YES\u65f6\uff0c\u865a\u62df\u7528\u6237\u4e0d\u80fd\u6d4f\u89c8\u76ee\u5f55\uff0c\u53ea\u80fd\u4e0a\u4f20\u6587\u4ef6\uff0c\u65e0\u5176\u4ed6\u6743\u9650\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u5f53virtual_use_local_privs=NO\uff0cwrite_enable=YES\uff0canon_world_readable_only=NO\uff0c<\/p>\n<p>anon_upload_enable=NO\u65f6\uff0c\u865a\u62df\u7528\u6237\u53ea\u80fd\u4e0b\u8f7d\u6587\u4ef6\uff0c\u65e0\u5176\u4ed6\u6743\u9650\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u5f53virtual_use_local_privs=NO\uff0cwrite_enable=YES\uff0canon_world_readable_only=NO\uff0c<\/p>\n<p>anon_upload_enable=YES\u65f6\uff0c\u865a\u62df\u7528\u6237\u53ea\u80fd\u4e0a\u4f20\u548c\u4e0b\u8f7d\u6587\u4ef6\uff0c\u65e0\u5176\u4ed6\u6743\u9650\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u5f53virtual_use_local_privs=NO\uff0cwrite_enable=YES\uff0canon_world_readable_only=NO\uff0c<\/p>\n<p>anon_mkdir_write_enable=YES\u65f6\uff0c\u865a\u62df\u7528\u6237\u53ea\u80fd\u4e0b\u8f7d\u6587\u4ef6\u548c\u521b\u5efa\u6587\u4ef6\u5939\uff0c\u65e0\u5176\u4ed6\u6743\u9650\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u5f53virtual_use_local_privs=NO\uff0cwrite_enable=YES\uff0canon_world_readable_only=NO\uff0c<\/p>\n<p>anon_other_write_enable=YES\u65f6\uff0c\u865a\u62df\u7528\u6237\u53ea\u80fd\u4e0b\u8f7d\u3001\u5220\u9664\u548c\u91cd\u547d\u540d\u6587\u4ef6\uff0c\u65e0\u5176\u4ed6\u6743\u9650\u3002<\/p>\n<\/div>\n<div><\/div>\n<div><\/div>\n<div>https:\/\/help.ubuntu.com\/community\/vsftpd<\/div>\n<div>http:\/\/www.webmin.com\/third.html<\/div>\n<div>https:\/\/security.appspot.com\/vsftpd.html<\/div>\n<div>https:\/\/wiki.debian.org\/vsftpd<\/div>\n","protected":false},"excerpt":{"rendered":"<p>vsftpd\u4f5c\u4e3a\u4e00\u4e2a\u4e3b\u6253\u5b89\u5168\u7684FTP\u670d\u52a1\u5668\uff0c\u6709\u5f88\u591a\u7684\u9009\u9879\u8bbe\u7f6e\u3002\u4e0b\u9762\u4ecb\u7ecd\u4e86vsftpd\u7684\u914d\u7f6e\u6587\u4ef6\u5217\u8868\uff0c\u800c\u6240\u6709\u7684\u914d\u7f6e\u90fd\u662f\u57fa\u4e8evsftpd.conf\u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\u7684\u3002\u672c\u6587\u5c06\u63d0\u4f9b\u5b8c\u6574\u7684vsftpd.conf\u7684\u4e2d&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-2733","post","type-post","status-publish","format-standard","hentry","category-ftp"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/2733","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2733"}],"version-history":[{"count":6,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/2733\/revisions"}],"predecessor-version":[{"id":4433,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/2733\/revisions\/4433"}],"wp:attachment":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}