ProFTPD的安装配置

ProFTPd是什么

Proftpd是一个Unix平台上或是类Unix平台上(如Linux, FreeBSD等)的FTP服务器程序,它是在自由软件基金会的版权声明(GPL)下开发、发布的免费软件,也就是说任何人只要遵守GPL版权声明,都可以随意修改源始码。

ProFTPD设计目标是实现一个安全且易于设定的FTP Server。目前Unix或类Unix平台上 FTP Server十分有限,最常使用的恐怕就是wu-ftpd了。虽然wu-ftpd有着极佳的效能同时也是一套很好的软件,然而它却欠缺了许多Win32平 台上FTP Server的一些特色,同时wu-ftpd过去也有不少的安全漏洞陆续被发现。ProFTPD的原创者本身就曾经花非常多的时间寻找wu-ftpd 的漏洞加以改进并且增加许多功能。然而十分不幸的是,他很快地发现显然wu-ftpd需要全部重新的改写才能补足欠缺的设定能力以及缺乏的一些功能。 ProFTPD不是从其它FTP Server的既有原始码修改而产生的,相反的,它是完全独立而完整、重新改写的

主要特色:
一个单一的和 Apache 的 httpd.conf 类似的配置文件
每个目录下的 .ftpaccess 文件(和 Apache 的. htaccess 类似)
很容易配置的,多个虚拟 FTP 服务器以及匿名 FTP 服务
可以单独运行也可以从 inetd/xinetd 启动
匿名 FTP 的根目录不需要特别的目录结构
系统的二进制文件和其他系统文件没有 SITE EXEC 命令
在单独运行方式下,以非特权用户运行,降低攻击风险
日志以及 utmp/wtmp 支持
Shadow 口令支持

编译安装ProFTPd

下载,编译,安装

wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.2.tar.gz
tar -zxvf proftpd-1.3.2.tar.gz
cd proftpd-1.3.2/
./configure –with-modules=mod_quotatab:mod_quotatab_file:mod_unique_id –prefix=
make && make install

ProFTPd的一些工具设置

cp -p contrib/ftpasswd /sbin/ftpasswd
cp -p contrib/ftpquota /sbin/ftpquota
chmod 755 /sbin/ftpasswd /sbin/ftpquota
cp  -p contrib/dist/rpm/proftpd.init.d /etc/init.d/proftpd
chmod 755 /etc/init.d/proftpd

用户,日志配置

touch /etc/proftpd.passwd
mkdir /var/log/proftpd/
chown ftp.ftp /var/log/proftpd/

/etc/proftpd.conf配置文件

ServerName  ”ProFTPd”
ServerType  standalone
Port   21
UseIPv6   off
PassivePorts  35000 35999
UseReverseDNS  off
TimesGMT  off
TimeoutLogin  120
TimeoutIdle  600
TimeoutNoTransfer 900
TimeoutStalled           3600
ScoreboardFile  /var/run/proftpd.pid
TransferLog  /var/log/proftpd/xferlog.legacy
LogFormat  default “%h %l %u %t \”%r\” %s %b”
LogFormat  auth    “%v [%P] %h %t \”%r\” %s”
LogFormat  write   “%h %l %u %t \”%r\” %s %b”
LogFormat  userlog “%u %b”
ExtendedLog  /var/log/proftpd/centos.ppwu.com.bytes WRITE,READ userlog
AuthUserFile  /etc/proftpd.passwd
DefaultServer  on
DeferWelcome  on
ServerIdent  off
MaxConnectionRate 4
MaxClients  100
MaxClientsPerHost 5
MaxClientsPerUser 10
MaxInstances  100
RequireValidShell no
DefaultRoot  ~
AllowStoreRestart on
AllowRetrieveRestart on
ListOptions  -a
Umask   022
DisplayLogin  /etc/proftpd.welcome
DisplayChdir  readme
AllowOverwrite  yes
IdentLookups  off
ExtendedLog  /var/log/proftpd/access.log WRITE,READ write
ExtendedLog  /var/log/proftpd/auth.log AUTH auth

工具ftpasswd示列

添加用户

ftpasswd –passwd –file=/etc/proftpd.passwd –name=newphp –uid=501 –gid=501 –gecos=newphp –home=/home/newphp –shell=/sbin/nologin

删除用户

ftpasswd –passwd –file=/etc/proftpd.passwd –name=tiankun –uid=501 –gid=501 –gecos=newphp –home=/home/newphp –shell=/sbin/nologin –delete-user

修改密码

ftpasswd –passwd –file=/etc/proftpd.passwd –name=tiankun –change-password

最后,service proftpd restart来重启proftpd

This entry was posted in 系统 and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>