如何把 WU-FTPD 換成 ProFTPD?
Copyright 2001 OLS3,本講義僅供教育人員參考,任何引用,請先取得作者的同意.
Email: ols3@www.tnc.edu.tw
網站: http://www.ols3cgi.com 或 http://www.perl.ms 臥龍小三CGI天堂
注意! 本文件編寫時, proftpd 的版本是 1.2.0rc2, 不過, 目前您至少要用 1.2.2 以上的版本才好! 建議用 1.2.4 ! (10/26/2001)
一. Say something ....
雖然,目前,大多數站台的 FTP 服務,以採用 WU-FTPD 伺服器程式架設者居多,而且WU-FTPD 在效能上,一直有不錯的表現,程式版本更新的速度也不慢,不過,它卻不是一個夠安全的系統,(我手頭上至少有十數隻程式是用來攻擊 WU-FTPD 的),過去以來,它一直有著一段很不名譽的安全漏史。
因此之故,許多網管人員總是想把 WU-FTPD 換掉.......
如果您想找一個不錯的 FTP 伺服程式來取代 WU-FTPD,試試 ProFTPD 吧!
ProFTPD 的發展,一開始,便是定位在:成為一個安全且容易設定的 FTP 伺服器程式。
雖然目前使用 ProFTPD 的站台數量 ,不比 WU-FTPD 多,但它的風格及表現,卻深得許多網管人員的喜愛。
以下是 ProFTPD 的特點:
二. 開始安裝吧!
# This is a basic ProFTPD configuration file (rename it to # 'proftpd.conf' for actual use. It establishes a single server # and a single anonymous login. It assumes that you have a user/group # "nobody" and "ftp" for normal operation and anon. # ServerName : 設定您的站台名稱 ServerName "OLS3.com"
# ServerType : 設定 ProFTPD 的執行方式,可以是 standalone 或 inetd ServerType standalone
# DefaultServer 用來設定 unknown 的連接是否由預設的主機來處理 DefaultServer on # Port 21 is the standard FTP port. # Port 21 是 FTP 標準的通道 Port 21 # Umask 022 is a good standard umask to prevent new dirs and files # from being group and world writable.
# 檔案安全濾網值設為 022 Umask 022 # To prevent DoS attacks, set the maximum number of child processes # to 30. If you need to allow more than 30 concurrent connections # at once, simply increase this value. Note that this ONLY works # in standalone mode, in inetd mode you should use an inetd server # that allows you to limit maximum number of processes per service # (such as xinetd)
# 可避免 DoS 攻擊的設定(只限standalone的執行方式) MaxInstances 30 # Set the user and group that the server normally runs at.
# 執行時的身份/組別權限 User nobody Group nobody # Normally, we want files to be overwriteable. <Directory /*> AllowOverwrite on </Directory> # A basic anonymous configuration, no upload directories.
# 以下是匿名 FTP 的設定 <Anonymous ~ftp> User ftp Group ftp AnonRequirePassword off RequireValidShell off # We want clients to be able to login with "anonymous" as well as "ftp" UserAlias anonymous ftp # Limit the maximum number of anonymous logins MaxClients 10 # We want 'welcome.msg' displayed at login, and '.message' displayed # in each newly chdired directory. DisplayLogin welcome.msg DisplayFirstChdir .message # Limit WRITE everywhere in the anonymous chroot <Limit WRITE> DenyAll </Limit> </Anonymous>
# This is a basic ProFTPD configuration file (rename it to # 'proftpd.conf' for actual use. It establishes a single server # and a single anonymous login. It assumes that you have a user/group # "nobody" and "ftp" for normal operation and anon. # ServerName : 設定您的站台名稱 ServerName "OLS3.com"
# ServerType : 設定 ProFTPD 的執行方式,可以是 standalone 或 inetd
# 此處是 inetd ServerType inetd
# DefaultServer 用來設定 unknown 的連接是否由預設的主機來處理 DefaultServer on # Port 21 is the standard FTP port. # Port 21 是 FTP 標準的通道 Port 21 # Umask 022 is a good standard umask to prevent new dirs and files # from being group and world writable.
# 檔案安全濾網值設為 022 Umask 022 # To prevent DoS attacks, set the maximum number of child processes # to 30. If you need to allow more than 30 concurrent connections # at once, simply increase this value. Note that this ONLY works # in standalone mode, in inetd mode you should use an inetd server # that allows you to limit maximum number of processes per service # (such as xinetd)
# 可避免 Dos 攻擊的設定(只限standalone的執行方式) MaxInstances 30 # Set the user and group that the server normally runs at.
# 執行時的身份/組別權限 User nobody Group nobody # Normally, we want files to be overwriteable. <Directory /*> AllowOverwrite on </Directory> # A basic anonymous configuration, no upload directories.
# 以下是匿名 FTP 的設定 <Anonymous ~ftp> User ftp Group ftp AnonRequirePassword off RequireValidShell off # We want clients to be able to login with "anonymous" as well as "ftp" UserAlias anonymous ftp # Limit the maximum number of anonymous logins MaxClients 10 # We want 'welcome.msg' displayed at login, and '.message' displayed # in each newly chdired directory. DisplayLogin welcome.msg DisplayFirstChdir .message # Limit WRITE everywhere in the anonymous chroot <Limit WRITE> DenyAll </Limit> </Anonymous>
希望這份講義對台南縣中小學能有所助益....
Written by OLS3 All right reserved. 01/03/2000
am 3:19
常見問題與解答:(copy from 台南縣教網中心網管討論區) FAQ1: ============================================================== hsmhsm :「為什麼設了/bin/false,連ftp都不能登入了??」 為什麼設了/bin/false,連ftp都不能登入了?? 以前用6.2時是/bin/nologin不能登入,但是/bin/false可以ftp登入 現在是用7.3,則兩者都不行 是不是有什麼地方該再設定呢?? [2003-04-09 10:27:13 , 163.26.144.192] -------------------------------------------------------------- OLS3 回覆 hsmhsm 如下: 若您是用 proftpd 請參考:http://linux.tnc.edu.tw/techdoc/proftpd.htm 中的設定檔,其中有一句: RequireValidShell off 把它放入您的 proftpd.conf 中一般區塊(非 Anonymous 區塊)中即可 然後重新啟動 xinetd / or inetd 若 proftpd 為 standalone 則需重新啟動 proftpd [2003-04-09 10:36:48 , 203.68.102.61] -------------------------------------------------------------- hsmhsm 回覆 OLS3 如下: ok了!!謝謝您!! *^_^* 建議您有空的話能將這段加入那份教學文件中 這樣我們才不會每次都重覆問同樣的問題來煩大家 :p ==============================================================
$Id: proftpd.htm,v 1.5 2003/04/09 07:12:59 ols3 Exp $