自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

ProFTPD的配置文件proftpd.conf

運(yùn)維 系統(tǒng)運(yùn)維
ProFTPD是一個(gè)Unix平臺(tái)、或者Unix類(如Linux, FreeBSD等) 下的FTP服務(wù)器程序,是自由軟件基金會(huì)版權(quán)聲明 發(fā)布一項(xiàng)的免費(fèi)軟件,可以說(shuō)任何只要遵守 自由軟件基金會(huì)版權(quán)聲明,就可以自己修改源始代碼。本文主要是ProFTPD的配置文件proftpd.conf 的講解。

  ProFTPD的配置文件proftpd.conf

  在我們這個(gè)例子中,ProFTPD的配置文件在/opt/proftpd/etc目錄中,就是proftpd.conf文件;您可以把它改名備份;

  1.   [root@localhost ~]# cd /opt/proftpd/etc/  
  2.  
  3.   [root@localhost etc]# mv proftpd.conf proftpd.confBAK  
  4.  

  然后再新建一個(gè) proftpd.conf 文件,內(nèi)容如下;您可以對(duì)這個(gè)文件進(jìn)行相應(yīng)的調(diào)整;其中#號(hào)部份就是注掉的,不會(huì)生效;注意一下MySQL連接數(shù)據(jù)庫(kù)部份;另外如果您不是把ProFTPD安裝在了/opt/proftpd目錄下,一些東西也是需要調(diào)整的;自己看著辦吧;

  1.   # This is a basic ProFTPD configuration file (rename it to  
  2.  
  3.   # 'proftpd.conf' for actual use. It establishes a single server  
  4.  
  5.   # and a single anonymous login. It assumes that you have a user/group  
  6.  
  7.   # "nobody" and "ftp" for normal operation and anon.  
  8.  
  9.   ServerName "My TestFTP" #這是您的FTP服務(wù)器的名字,自己寫定  
  10.  
  11.   ServerType standalone  
  12.  
  13.   ServerAdmin xxxxx@xxxxxxxxxxx.com #這是管理員信箱,自己來(lái)寫;  
  14.  
  15.   DefaultServer On  
  16.  
  17.   # Display message  
  18.  
  19.   DisplayLogin /opt/proftpd/etc/ftplogin.msg  
  20.  
  21.   #DisplayConnect /net/messages/ftp.pre  
  22.  
  23.   #DisplayFirstChdir index.txt  
  24.  
  25.   # Port 21 is the standard FTP port.  
  26.  
  27.   Port 21  
  28.  
  29.   # Limit users to login by username  
  30.  
  31.     
  32.  
  33.   AllowAll  
  34.  
  35.     
  36.  
  37.   # Umask 022 is a good standard umask to prevent new dirs and files  
  38.  
  39.   # from being group and world writable.  
  40.  
  41.   Umask 022  
  42.  
  43.   # Limit login attempts  
  44.  
  45.   #  
  46.  
  47.   MaxLoginAttempts 5  
  48.  
  49.   # Set the maximum number of seconds a data connection is allowed  
  50.  
  51.   # to "stall" before being aborted.  
  52.  
  53.   TimeoutStalled 600  
  54.  
  55.   TimeoutLogin 900  
  56.  
  57.   TimeoutIdle 600  
  58.  
  59.   TimeoutNoTransfer 600  
  60.  
  61.   # Set the user and group under which the server will run.  
  62.  
  63.   User nobody  
  64.  
  65.   Group nobody  
  66.  
  67.   # To cause every FTP user to be "jailed" (chrooted) into their home  
  68.  
  69.   # directory, uncomment this line.  
  70.  
  71.   DefaultRoot ~  
  72.  
  73.   # Users needs a valid shell  
  74.  
  75.   #  
  76.  
  77.   RequireValidShell off  
  78.  
  79.   # Performance: skip DNS resolution when we process the logs...  
  80.  
  81.   UseReverseDNS off  
  82.  
  83.   # Turn off Ident lookups  
  84.  
  85.   IdentLookups off  
  86.  
  87.   # Restart session support  
  88.  
  89.   #  
  90.  
  91.   AllowStoreRestart on  
  92.  
  93.   AllowRetrieveRestart on  
  94.  
  95.   #-------- load sql.mod for mysql authoritative --------#  
  96.  
  97.   SQLConnectInfo proftpd@localhost proftpd 123456  
  98.  
  99.   #注:上面這行是MySQL連接服務(wù)器部份,自己根據(jù)情況來(lái)改一改;  
  100.  
  101.   SQLAuthTypes Plaintext  
  102.  
  103.   SQLUserInfo ftpusers userid passwd uid gid homedir shell  
  104.  
  105.   SQLGroupInfo ftpgroups groupname gid members  
  106.  
  107.   SQLAuthenticate users groups  
  108.  
  109.   SQLNegativeCache on  
  110.  
  111.   SQLHomedirOnDemand on  
  112.  
  113.   SQLLogFile /var/log/proftpd.sql.log  
  114.  
  115.   SQLNamedQuery getcount SELECT "count from ftpusers where userid='%u'"  
  116.  
  117.   SQLNamedQuery getlastlogin SELECT "lastlogin from ftpusers where userid='%u'"  
  118.  
  119.   SQLNamedQuery updatelogininfo UPDATE "countcount=count+1,host='%h',lastlogin=current_timestamp() WHERE userid='%u'" ftpusers  
  120.  
  121.   SQLShowInfo PASS "230" "You've logged on %{getcount} times, last login at %{getlastlogin}"  
  122.  
  123.   SQLLog PASS updatelogininfo  
  124.  
  125.   #-------- load sql.mod for mysql authoritative --------#  
  126.  
  127.   #--------- load qudes.mod for Quota limit --------#  
  128.  
  129.   QuotaDirectoryTally on  
  130.  
  131.   QuotaDisplayUnits "Mb"  
  132.  
  133.   QuotaEngine on  
  134.  
  135.   #QuotaLog /var/log/proftpd.quota.log  
  136.  
  137.   QuotaShowQuotas on  
  138.  
  139.   SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session, limit_type, bytes_in_avail, \  
  140.  
  141.   bytes_out_avail, bytes_xfer_avail, files_in_avail, files_out_avail, files_xfer_avail FROM quotalimits \  
  142.  
  143.   WHERE name = '%{0}' AND quota_type = '%{1}'"  
  144.  
  145.   SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used, bytes_out_used, \  
  146.  
  147.   bytes_xfer_used, files_in_used, files_out_used, files_xfer_used FROM quotatallies \  
  148.  
  149.   WHERE name = '%{0}' AND quota_type = '%{1}'"  
  150.  
  151.   SQLNamedQuery update-quota-tally UPDATE "bytes_in_usedbytes_in_used = bytes_in_used + %{0}, \  
  152.  
  153.   bytes_out_usedbytes_out_used = bytes_out_used + %{1}, bytes_xfer_usedbytes_xfer_used = bytes_xfer_used + %{2}, \  
  154.  
  155.   files_in_usedfiles_in_used = files_in_used + %{3}, files_out_usedfiles_out_used = files_out_used + %{4}, \  
  156.  
  157.   files_xfer_usedfiles_xfer_used = files_xfer_used + %{5} \  
  158.  
  159.   WHERE name = '%{6}' AND quota_type = '%{7}'" quotatallies  
  160.  
  161.   SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" quotatallies  
  162.  
  163.   QuotaLimitTable sql:/get-quota-limit  
  164.  
  165.   QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally  
  166.  
  167.   #--------- load qudes.mod for Quota limit --------#  
  168.  
  169.   # Logging options  
  170.  
  171.   # Debug Level  
  172.  
  173.   # emerg, alert, crit (empfohlen), error, warn. notice, info, debug  
  174.  
  175.   #  
  176.  
  177.   SyslogLevel emerg  
  178.  
  179.   SystemLog /var/log/proftpd.system.log  
  180.  
  181.   TransferLog /var/log/proftpd.xferlog  
  182.  
  183.   # Some logging formats  
  184.  
  185.   #  
  186.  
  187.   LogFormat default "%h %l %u %t \"%r\" %s %b"  
  188.  
  189.   LogFormat auth "%v [%P] %h %t \"%r\" %s"  
  190.  
  191.   LogFormat write "%h %l %u %t \"%r\" %s %b"  
  192.  
  193.   # Log file/dir access  
  194.  
  195.   # ExtendedLog /var/log/proftpd.access_log WRITE,READ write  
  196.  
  197.   # Record all logins  
  198.  
  199.   ExtendedLog /var/log/proftpd.auth_log AUTH auth  
  200.  
  201.   # Paranoia logging level....  
  202.  
  203.   ExtendedLog /var/log/proftpd.paranoid_log ALL default  
  204.  
  205.   #注;上面幾行是存放log的設(shè)置,不必改動(dòng)也行;查看log就到上面相應(yīng)的文件看吧;  
  206.  
  207.   # To prevent DoS attacks, set the maximum number of child processes  
  208.  
  209.   # to 30. If you need to allow more than 30 concurrent connections  
  210.  
  211.   # at once, simply increase this value. Note that this ONLY works  
  212.  
  213.   # in standalone mode, in inetd mode you should use an inetd server  
  214.  
  215.   # that allows you to limit maximum number of processes per service  
  216.  
  217.   # (such as xinetd).  
  218.  
  219.   MaxInstances 30 #注最多30個(gè)ip同時(shí)登錄使用ftp;  
  220.  
  221.   # Maximum clients with message  
  222.  
  223.   #MaxClients 2 "Sorry, max %m users -- try again later"  
  224.  
  225.   MaxClientsPerHost 2 "Sorry, only 2 session for one host"  
  226.  
  227.   #注每個(gè)ip,只能兩個(gè)線程程,請(qǐng)自己調(diào)整;  
  228.  
  229.   # Normally, we want files to be overwriteable.  
  230.  
  231.     
  232.  
  233.   AllowOverwrite on  
  234.  
  235.     
  236.  
  237.   RootLogin off  
  238.  
  239.   RequireValidShell off  
  240.  
  241.   # alphanumeric characters for uploads (and not shell code...)  
  242.  
  243.   #PathAllowFilter "^[a-zA-Z0-9_.-]()'+$"  
  244.  
  245.   #PathAllowFilter "^[a-zA-Z0-9 _.-]()'+$"  
  246.  
  247.   # We don't want .ftpaccess or .htaccess files to be uploaded  
  248.  
  249.   #PathDenyFilter "(\.ftp)|(\.ht)[a-z]+$"  
  250.  
  251.   #pathDenyFilter "\.ftp[a-z]+$"  
  252.  
  253.   # Do not allow to pass printf-Formats (security! see documentation!):  
  254.  
  255.   #AllowFilter "^[a-zA-Z0-9@~ /,_.-]*$"  
  256.  
  257.   #DenyFilter "%"  

 

【編輯推薦】

  1. ProFTPD的MySQL數(shù)據(jù)庫(kù)
  2. ProFTPD 有問(wèn)必答
  3. Linux ProFTPd服務(wù)器配置(全)
  4. ProFTPD的配置
  5. 如何安裝ProFTPD
  6. ProFTPD 下的五大問(wèn)題
責(zé)任編輯:zhaolei 來(lái)源: 網(wǎng)絡(luò)轉(zhuǎn)載
相關(guān)推薦

2011-02-24 13:42:34

2011-02-22 17:24:32

2011-02-24 14:34:57

2011-03-02 17:59:13

Proftpd.con設(shè)定

2011-03-08 10:38:13

proftpd.con

2011-02-25 09:16:48

Proftpd

2011-03-08 10:54:25

proftpd.con

2011-03-08 10:28:40

Proftpd

2011-03-08 10:45:36

proftpd.con

2011-02-25 16:39:34

proftpd配置文件

2011-03-03 13:16:32

Proftpd配置文件

2011-02-25 13:34:33

Proftpd結(jié)構(gòu)

2011-02-22 10:08:46

ProFTPD配置

2011-03-03 13:00:21

2011-02-23 11:15:21

DebianProFTPd

2011-02-24 13:15:59

2011-02-25 12:30:01

ProFtpd配置

2011-03-08 17:04:10

ProFTPDUbuntu

2011-02-22 16:24:30

2011-03-07 17:15:52

ProFTPD配置
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)