成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

ProFTPD的配置文件proftpd.conf

運維 系統運維
ProFTPD是一個Unix平臺、或者Unix類(如Linux, FreeBSD等) 下的FTP服務器程序,是自由軟件基金會版權聲明 發布一項的免費軟件,可以說任何只要遵守 自由軟件基金會版權聲明,就可以自己修改源始代碼。本文主要是ProFTPD的配置文件proftpd.conf 的講解。

  ProFTPD的配置文件proftpd.conf

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

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

  然后再新建一個 proftpd.conf 文件,內容如下;您可以對這個文件進行相應的調整;其中#號部份就是注掉的,不會生效;注意一下MySQL連接數據庫部份;另外如果您不是把ProFTPD安裝在了/opt/proftpd目錄下,一些東西也是需要調整的;自己看著辦吧;

  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服務器的名字,自己寫定  
  10.  
  11.   ServerType standalone  
  12.  
  13.   ServerAdmin xxxxx@xxxxxxxxxxx.com #這是管理員信箱,自己來寫;  
  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連接服務器部份,自己根據情況來改一改;  
  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的設置,不必改動也行;查看log就到上面相應的文件看吧;  
  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個ip同時登錄使用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.   #注每個ip,只能兩個線程程,請自己調整;  
  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數據庫
  2. ProFTPD 有問必答
  3. Linux ProFTPd服務器配置(全)
  4. ProFTPD的配置
  5. 如何安裝ProFTPD
  6. ProFTPD 下的五大問題
責任編輯:zhaolei 來源: 網絡轉載
相關推薦

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設定

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結構

2011-02-22 10:08:46

ProFTPD配置

2011-03-03 13:00:21

2011-02-24 13:15:59

2011-02-23 11:15:21

DebianProFTPd

2011-02-24 14:47:48

ProFTPD

2011-02-23 10:43:17

2011-02-25 12:30:01

ProFtpd配置

2011-03-08 17:04:10

ProFTPDUbuntu
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 伊人精品一区二区三区 | 国产小视频在线看 | 精品福利一区二区三区 | 亚洲人成网亚洲欧洲无码 | 国产剧情久久 | www.久久99| 欧美午夜一区二区三区免费大片 | 亚洲va欧美va人人爽午夜 | 狠狠视频 | 日韩 国产 在线 | 精品91久久 | 免费超碰| 性生活毛片| 日韩欧美专区 | 精品欧美一区二区三区久久久 | 欧美三级免费观看 | 亚洲视频区 | 久久黄色精品视频 | 日韩精品 电影一区 亚洲 | 欧美国产视频 | 亚洲激情综合 | 啪一啪| 久久成人免费视频 | 一级黄色大片 | 国产成人高清视频 | 欧美激情欧美激情在线五月 | 麻豆久久久 | 日韩在线观看视频一区 | 亚洲精品女优 | 久久成人在线视频 | 天天躁日日躁aaaa视频 | 日本特黄特色aaa大片免费 | 成人精品一区 | 国产视频线观看永久免费 | 国产精品成人一区二区三区吃奶 | 日韩精品在线一区 | 成人在线免费电影 | 久久激情视频 | 一本久久a久久精品亚洲 | 久久国产婷婷国产香蕉 | 岛国二区 |