{"id":83,"date":"2004-07-12T17:46:00","date_gmt":"2004-07-12T09:46:00","guid":{"rendered":"http:\/\/www\/zhouhonghe.com\/wordpress\/?p=83"},"modified":"2007-01-29T21:46:20","modified_gmt":"2007-01-29T13:46:20","slug":"proftp%e9%85%8d%e7%bd%ae%e4%b8%80%e4%be%8b","status":"publish","type":"post","link":"https:\/\/blog.zhouhonghe.com\/?p=83","title":{"rendered":"ProFTP\u914d\u7f6e\u4e00\u4f8b"},"content":{"rendered":"<p># This is a basic ProFTPD configuration file (rename it to<br \/>\n# 'proftpd.conf' for actual use.\u00a0 It establishes a single server<br \/>\n# and a single anonymous login.\u00a0 It assumes that you have a user\/group<br \/>\n# \"nobody\" and \"ftp\" for normal operation and anon.<\/p>\n<p>ServerName\u00a0\u00a0\u00a0\"XXX.COM\"<br \/>\nServerType\u00a0\u00a0\u00a0standalone<br \/>\nDefaultServer\u00a0\u00a0\u00a0on<\/p>\n<p>DisplayLogin \/www\/bin\/proftp\/etc\/msg.txt\u00a0\u00a0 #\u6b22\u8fce\u8bcd\u6587\u4ef6<br \/>\nWtmpLog off<\/p>\n<p>ServerIdent off<br \/>\nTimesGMT off<br \/>\nRequireValidShell\u00a0\u00a0 off\u00a0\u00a0\u00a0 #\u8bbe\u7f6e\u5982\u679cshell\u4e3a\u7a7a\u65f6\u5141\u8bb8\u7528\u6237\u767b\u5f55<\/p>\n<p>MaxLoginAttempts 3<br \/>\nTimeoutIdle\u00a0\u00a0 120\u00a0\u00a0\u00a0\u00a0\u00a0 #-- \u8bbe\u7f6e\u7a7a\u95f2\u8fde\u63a5\u8d85\u65f6\u65f6\u949f<br \/>\nTimeoutLogin\u00a0\u00a0 120\u00a0\u00a0\u00a0\u00a0\u00a0 #-- \u8bbe\u7f6e\u7a7a\u95f2\u767b\u9646\u8d85\u65f6\u65f6\u949f<br \/>\nTimeoutNoTransfer\u00a0 120\u00a0\u00a0\u00a0\u00a0\u00a0 # -- \u8bbe\u7f6e\u5f53\u6ca1\u6709\u6570\u636e\u4f20\u8f93\u65f6\u7684\u8d85\u65f6\u65f6\u949f<br \/>\nTimeoutStalled\u00a0 30\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 #-- \u8bbe\u7f6e\u88ab\u963b\u585e\u7684\u4e0b\u8f7d\u7684\u8d85\u65f6\u65f6\u949f<\/p>\n<p>MaxClients 300\u00a0\u00a0\u00a0\u00a0\u00a0 #\u6700\u591a\u5141\u8bb8300\u4e2a\u7528\u6237\u5728\u7ebf<br \/>\nMaxClientsPerHost\u00a01\u00a0 \"\u3000\u3000\u3000\u3000\u5bf9\u4e0d\u8d77\uff0c\u4e00\u4e2aIP\u540c\u4e00\u65f6\u95f4\u53ea\u5141\u8bb8\u4e00\u4e2a\u8fde\u63a5\"<br \/>\nMaxHostsPerUser 1 \"\u3000\u3000\u3000\u3000\u5bf9\u4e0d\u8d77\uff0c\u6bcf\u4e2a\u5e10\u6237\u6700\u591a\u5141\u8bb8\u6765\u6e90ip\u4e3a1\u4e2a\"<br \/>\nMaxClientsPerUser 1 \"\u3000\u3000\u3000\u3000\u5bf9\u4e0d\u8d77\uff0c\u6bcf\u4e2a\u5e10\u6237\u5728\u6bcf\u4e2a\u5ba2\u6237\u7aef\u6700\u591a\u53ef\u4ee5\u540c\u65f6\u767b\u96461\u6b21\"<\/p>\n<p>#\u5141\u8bb8\u65ad\u70b9\u7eed\u4f20\uff08\u4e0a\u4f20\uff09\uff0c\u65ad\u70b9\u7eed\u7eed\uff08\u4e0b\u8f7d\uff09\u662f\u9ed8\u8ba4\u652f\u6301\u7684\uff0c\u4e0d\u7528\u8bbe\u7f6e<br \/>\nAllowStoreRestart on<\/p>\n<p>SQLAuthTypes Backend Plaintext<br \/>\n#Backend\u8868\u793a\u7528\u6237\u8ba4\u8bc1\u65b9\u5f0f\u4e3aMySQL\u6570\u636e\u5e93\u7684\u8ba4\u8bc1\u65b9\u5f0f<br \/>\n#Plaintext\u8868\u793a\u660e\u6587\u8ba4\u8bc1\u65b9\u5f0f\uff0c\u6392\u5728\u6700\u524d\u9762\u7684\u4e3a\u6700\u5148\u4f7f\u7528\u7684\u65b9\u5f0f<br \/>\nSQLAuthenticate users* groups*<\/p>\n<p># databasename@host database_user user_password<br \/>\nSQLConnectInfo proftpd@localhost proftp_user proftp_pwd<br \/>\nSQLUserInfo ftpuser userid passwd uid gid homedir shell<br \/>\nSQLGroupInfo ftpgroup groupname gid members<br \/>\n#\u5982\u679c\u7528\u6237\u4e3b\u76ee\u5f55\u4e0d\u5b58\u5728\uff0c\u5219\u7cfb\u7edf\u4f1a\u6839\u636e\u6b64\u7528\u6237\u5728\u7528\u6237\u6570\u636e\u8868\u4e2d\u7684homedir\u5b57\u6bb5\u7684\u503c\u65b0\u5efa\u4e00\u4e2a\u76ee\u5f55<br \/>\nSQLHomedirOnDemand off<br \/>\n# Update count every time user logs in<br \/>\nSQLLog PASS updatecount<br \/>\nSQLNamedQuery updatecount UPDATE \"count=count+1,accessed=now() WHERE userid='%u'\" ftpuser<\/p>\n<p># Update modified everytime user uploads or deletes a file<br \/>\nSQLLog STOR,DELE modified<br \/>\nSQLNamedQuery modified UPDATE \"modified=now() WHERE userid='%u'\" ftpuser<\/p>\n<p># Port 21 is the standard FTP port.<br \/>\nPort\u00a0\u00a0\u00a0\u00a021<\/p>\n<p># Umask 022 is a good standard umask to prevent new dirs and files<br \/>\n# from being group and world writable.<br \/>\nUmask\u00a0\u00a0\u00a0\u00a0022<\/p>\n<p># To prevent DoS attacks, set the maximum number of child processes<br \/>\n# to 30.\u00a0 If you need to allow more than 30 concurrent connections<br \/>\n# at once, simply increase this value.\u00a0 Note that this ONLY works<br \/>\n# in standalone mode, in inetd mode you should use an inetd server<br \/>\n# that allows you to limit maximum number of processes per service<br \/>\n# (such as xinetd).<br \/>\nMaxInstances\u00a0\u00a0\u00a0300<\/p>\n<p># Set the user and group under which the server will run.<br \/>\nUser\u00a0\u00a0\u00a0\u00a0nobody<br \/>\nGroup\u00a0\u00a0\u00a0\u00a0nobody<\/p>\n<p># To cause every FTP user to be \"jailed\" (chrooted) into their home<br \/>\n# directory, uncomment this line.<br \/>\n#DefaultRoot ~ ftpusers<br \/>\nDefaultRoot ~<\/p>\n<p># Normally, we want files to be overwriteable.<br \/>\n&lt;DIRECTORY \/&gt;<br \/>\n\u00a0 AllowOverwrite\u00a0\u00a0off<br \/>\n&lt;\/DIRECTORY&gt;<br \/>\n&lt;LIMIT READ RETR&gt;#\u5141\u8bb8\u4e0b\u8f7d<br \/>\nAllowAll<br \/>\n&lt;\/LIMIT&gt;<\/p>\n<p>&lt;LIMIT CMD MKD RNFR DELE RMD STOR WRITE DIRS&gt;#\u4e0d\u5141\u8bb8\u5176\u5b83\u6743\u9650\u00a0<br \/>\nDenyAll<br \/>\n&lt;\/LIMIT&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p># This is a basic ProFTPD configuration file (rename it [&hellip;]<\/p>... ","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-83","post","type-post","status-publish","format-standard","hentry","category-4"],"_links":{"self":[{"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=\/wp\/v2\/posts\/83","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=83"}],"version-history":[{"count":0,"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=\/wp\/v2\/posts\/83\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=83"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=83"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}