suroot//输入root的密码。
wgetftp://ftp.proftpd.org/distrib/source/proftpd-1.2.9.tar.gz
tarzxvfproftpd-1.2.9.tar.gz//解压
cdproftpd-1.2.9
./configure--prefix=/var/proftpd--sysconfdir=/etc//设置安装目录/var/proftpd,配置文件目录/etc
make
makeinstall
groupaddskate
useraddskate-gskate-d/var/ftp-s/sbin/nologin//设置/var/ftp目录为ftp的目录
passwdskate//设置skate用户的密码
mkdir/var/ftp/upload
chownskate.skate/var/ftp/upload//设置upload目录skate用户可写
vi/etc/proftpd.conf//打开proftpd.conf
####具体配置如下######
ServerName"Testftpserver..."
ServerTypestandalone
DefaultServeron
#端口
Port21
Umask022
#最大线程数
MaxInstances30
Userskate
Groupskate
#DNS反查
UseReverseDNSoff
IdentLookupsoff
#最大尝试连接次数
MaxLoginAttempts3
#每用户线程
MaxClientsPerHost2
#最大用户数
MaxClients20
DirFakeUserOnskate
DirFakeGroupOnskate
DeferWelcomeOn
#日志文件位置
SystemLog/var/log/proftpd.log
ServerIdentoff
#限制skate组的skate用户登录时不能切换到其他目录(只能呆在他的home目录)
DefaultRoot~skate,skate
#设置只允许192.168.0的用户登录
#;
#Orderallow,deny
#Allowfrom192.168.0.
#Denyfromall
#;
#设置只允许skate用户登录,否则系统用户也可以登录ftp
#;
#Orderallow,deny
#DenyUser!skate
#;
#开起全盘的写权限;
AllowOverwriteon
AllowStoreRestarton
#允许FXP
#AllowForeignAddresson;
AllowAll
;
;
#设置skate用户在upload的限制
#DELE删除权限
#RNFRRNTO重命名权限
#RMDXRMD移动目录权限; ;;
DenyUserskate
;
#####结束######
vi/etc/rc.d/init.d/proftpd
#####脚本内容开始########
#!/bin/sh
#
#StartupscriptforProFTPD
#
#chkconfig:3458515
#description:ProFTPDisanenhancedFTPserverwith\
#afocustowardsimplicity,security,andeaseofconfiguration.\
#ItfeaturesaveryApache-likeconfigurationsyntax,\
#andahighlycustomizableserverinfrastructure,\
#includingsupportformultiple'virtual'FTPservers,\
#anonymousFTP,andpermission-baseddirectoryvisibility.
#processname:proftpd
#config:/etc/proftpd.conf
#
#By:OsmanElliyasa;
#$Id:proftpd.init.d,v1.72002/12/0721:50:27jwmExp$
#Sourcefunctionlibrary.
./etc/rc.d/init.d/functions
if[-f/etc/sysconfig/proftpd];then
./etc/sysconfig/proftpd
fi
#下面这行设置环境变量,注意设置好你的proftpd的安装目录
PATH="$PATH:/usr/local/sbin:/var/proftpd/bin:/var/proftpd/sbin"
#Seehowwewerecalled.
case"$1"in
start)
echo-n"Startingproftpd:"
daemonproftpd$OPTIONS
echo
touch/var/lock/subsys/proftpd
;;
stop)
echo-n"Shuttingdownproftpd:"
killprocproftpd
echo
rm-f/var/lock/subsys/proftpd
;;
status)
statusproftpd
;;
restart)
$0stop
$0start
;;
reread)
echo-n"Re-readingproftpdconfig:"
killprocproftpd-HUP
echo
;;
suspend)
hashftpshut>;/dev/null2>;&1
if[$?=0];then
if[$#-gt1];then
shift
echo-n"Suspendingwith'$*'"
ftpshut$*
else
echo-n"SuspendingNOW"
ftpshutnow"Maintananceinprogress"
fi
else
echo-n"Nowaytosuspend"
fi
echo
;;
resume)
if[-f/etc/shutmsg];then
echo-n"Allowingsessionsagain"
rm-f/etc/shutmsg
else
echo-n"Wasnotsuspended"
fi
echo
;;
*)
echo-n"Usage:$0{start|stop|restart|status|reread|resume"
hashftpshut
if[$?=1];then
echo'}'
else
echo'|suspend}'
echo'suspendacceptsadditionalargumentswhicharepassedtoftpshut(8)'
fi
exit1
esac
if[$#-gt1];then
shift
$0$*
fi
exit0
#######脚本结束#########
chmod+x/etc/rc.d/init.d/proftpd
chkconfig--addproftpd
serviceproftpdstart
以后可以用serviceproftpdrestart来重起proftpd。
6一点体会
看proftpd的文档翻译过的一句话:Finally,aspecialcommandisallowedwhichcanbeusedtocontrolloginaccess:LOGINConnectionorloginto
theserver.Applyinga
effect,andisignored,whenusedinacontextotherthanserverconfig,
ismeaningless).
翻译下:最后,有一个用来限制登陆的特殊命令,就是LOGIN。在
或者
proftpd感觉还是比vsftp功能配置上好用一点,主要掌握好
proftpd文档地址http://www.proftpd.org/docs/。