proftpd

ProFTPD:一個Unix平台上或是類Unix平台上(如Linux, FreeBSD等)的FTP伺服器程式。

proftpd全稱:Professional FTP daemon是針對Wu-FTP的弱項而開發的,除了改進的安全性,還具備許多Wu-FTP沒有的特點,能以Stand-alone、xinetd模式運行等。ProFTP已經成為繼Wu-FTP之後最為流行的FTP伺服器軟體,越來越多的站點選用它構築安全高效的FTP站點,ProFTP配置方便,並有MySQL和Quota模組可供選擇,利用它們的完美結合可以實現非系統賬號的管理和用戶磁碟的限制。ProFTPD 的特點:

1. 單配置檔案,其設定指示和apache的有類似之處,非常容易配置。
2. 基於單個目錄的.ftpaccess設定檔案,類似與apache的.htaccess檔案。
3. 易於設定的多虛擬伺服器和匿名ftp服務。
4. 可以設定為從xinetd啟動,或者是獨立ftp伺服器兩種運行方式。
5. 匿名ftp的根目錄不需要任何特殊的目錄結構,或系統程式或其他系統檔案。
6. ncfptd不執行任何外部程式,從而減少了安全隱患。
7. 可以根據檔案屬主情況或unix風格的訪問控制來隱藏檔案或目錄。
8. 以非root身份運行,從而減少了安全隱患。
9. 強大的log功能,支持utmp/wtmp及wu-ftpd格式的記錄標準,並支持擴展功能的記錄。
10. 支持Shadow密碼,包括支持密碼過期機制。
11. 遵從GPL著作權,開放原始碼。
12. 可設定多個虛擬FTP server,而匿名FTP服務更是十分容易。
13. 最新版本1.2.10 。http://www.ProFTPD.org 。

 proftpd簡介

當我的同事每次傳送檔案到 Solaris 8 的 FTP Server 時,那些修改日期在 2002 年

之前的檔案總是不能在視窗中看到,這些檔案在 Solaris 系統中用 ls -l 看到的是

帶有年份的,而那些 2002 年的檔案則沒有 2002 的年份。因此,問題就出在這裡,我

們每次需要用 touch 命令更新檔案日期,十分的不方便。所以,我認定是 FTP Server

的問題。隨即決定選用熟悉的 Wu-ftpd ,但是,令人吃驚的是,使用這個版本的

FTP Server 後,居然不能顯示目錄,連整個目錄都不能列出來了。想到以前曾經有文章

介紹 ProFTPD ,因此,決定嘗試這個軟體。感覺起來十分的好用,特地撰寫此文,願

意和大家共享。

ProFTPD 也是開放源碼的軟體,以 GPL 許可發布。ProFTPD 可以說是 wu-ftpd 的替代,

同時在安全,可伸縮性等方面有很大的提高。特別是對於熟悉 Apache 配置的人而言,

它的配置和 Apache 十分相似,因此,用起來肯定能得心應手。

主要特色:

一個單一的和 Apache 的 httpd.conf 類似的配置檔案

每個目錄下的 .ftpaccess 檔案(和 Apache 的. htaccess 類似)

很容易配置的,多個虛擬 FTP 伺服器以及匿名 FTP 服務

可以單獨運行也可以從 inetd/xinetd 啟動

匿名 FTP 的根目錄不需要特別的目錄結構

系統的二進制檔案和其他系統檔案沒有 SITE EXEC 命令

在單獨運行方式下,以非特權用戶運行,降低攻擊風險

日誌以及 utmp/wtmp 支持

Shadow 口令支持

截止到本文成稿時, ProFTPD 的最新版本為 v1.3.1 ,為了保證系統安全,建議你總

是把軟體更新到最新的版本。

proftpd安裝配置

wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.1.tar.gz

tar zxvf proftpd-1.3.1.tar.gz
cd proftpd-1.3.1
./configure --prefix=/usr/local/proftpd/
make
make install
cd /usr/local/proftpd/etc/
vi proftpd.conf

輸入:
# 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"user FTP"
ServerType standalone
DefaultServer on

# Port 21 is the standard FTP port.
Port 221

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
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).
MaxInstances 30

# Set the user and group under which the server will run.
User nobody
Group nobody

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.

# Normally, we want files to be overwriteable.
AllowOverwrite on
AllowRetrieveRestart on
AllowStoreRestart on

# Bar use of SITE CHMOD by default
DenyAll

# A basic anonymous configuration, no upload directories. If you do not
# want anonymous users, simply delete this entire section.
#
# User ftp
# Group ftp

# 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
# DisplayChdir .message

# Limit WRITE everywhere in the anonymous chroot
#
# DenyAll
#
#

後續設定

創建用戶
useradd aaa

passwd aaa

vipw
修改用戶webtrends的目錄和不充許登錄
webtrends:x:503:505::/abc/logs:/sbin/nologin

啟動:
/usr/local/proftpd/sbin/proftpd &

加入rc.local
/usr/local/proftpd/sbin/proftpd &

netstat -lnt
看有沒有開221連線埠,啟動是否成功。

在dos下:
ftp xxx.xxx.xxx.xxx
輸入用戶名和密碼就可以進入ftp>了。
ftp> ls

相關詞條

相關搜尋

熱門詞條

聯絡我們