Q:如何设计一个雷电FTPD伺服器 ?
A:雷电FTPD的伺服器设定档是储存於 *.ftpd 档案之中 , 而且你只要使用本程式提供的RaidenFTPD.EXE就可以设计一个新的伺服器并加以存档 (选单->设定->FTP-伺服器) , 当你储存了妳的设定之後 , 妳仍然可以使用外部的文字编辑程式来编辑 *.ftpd 档案 , 以下为 *.ftpd 档案的格式说明 , 请注意蓝色的部分是注解 , 请勿将他们加在真正的 *.ftpd 之中 .
[FTPD]
SERVER_NAME=RAiDEN (伺服器名称)
SERVER_IP=90.0.0.3 (伺服器IP位置 , 动态IP用户请放空)
LISTEN_PORT=169 (伺服器port 1-65535)
ALLOW_ANON=1 (允许匿名连线? 1=准许 0=拒绝)
USE_ANON_MAX=1 (限制最多同时连线匿名使用者数目? 1=限制 0=无限制)
ANON_MAX=16 (同时最多匿名使用者数目 ? 1-n)
USE_USER_MAX=1 (限制最多同时连线一般使用者数目? 1=限制 0=无限制)
USER_MAX=9999 (同时最多一般使用者数目)
USE_MAXUSER_PER_IP=1 (限制来自同一ip的最大连线数? 1=限制 0=无限制)
MAXUSER_PER_IP=32 (来自同一ip的最大连线数)
IPCHK=1 (ip验证检查 0=无检查 1=登入前检查 2=登入後检查)
IPCHK_DATA=0 (资料连线也要IP验证检查, 1=是 0=否 , 最好不要)
PASV_IP_ROLLING=0 (自动从多组伺服器IP中轮流使用不同IP , 来给DATA连线使用 , 0=不 1=是 , 不了解的话最好关闭)
AUTO_CHOOSE_IP=1 (自动帮你决定伺服器ip 0=否 1=是 , 如果设成1 , SERVER_IP将可能被忽略) , 有虚拟IP者千万不要设为1
VFSFILE=C:\Program Files\RaidenFTPD\RaidenFTPD.vfs (虚拟档案系统设定档的完整路径)
USRFILE=C:\Program Files\RaidenFTPD\RaidenFTPD.user (使用者设定档的完整路径)
IPFILE=C:\Program Files\RaidenFTPD\RaidenFTPD.allow (IP/Domain验证设定档的完整路径)
USE_DATAPORT_RANGE=0 (自行指定PASV命令使用的port范围 , 0=不要(自动决定) 1=自行指定 , 只有防火墙用户需要动到这个选项)
PORT_FROM=1400 (如果 USE_DATAPORT_RANGE 是 1 , 这个必须被设定)
PORT_TO=1500 (如果 USE_DATAPORT_RANGE 是 1 , 这个必须被设定)
TIMEOUT=600 (如果使用着闲置不动超过秒数 , 就把他断线)
SHOWHIDDEN=1 (如果 SHOWHIDDEN 是 1 , FTP使用者可以看到硬碟中的隐藏党及目录 , 0 则不可)
OUTLIMIT = n/m (n为某时段内允许的总流出 megabytes 数 , 而 m 为时段的长度 , 单位是分钟 , 以下为一范例 OUTLIMIT = 500/600 代表了每 600 分钟限制流出 500mb 的流量 , 若是超过 , 伺服器会停止提供下载 , 直到经过 600 分钟之後)
INLIMIT = n/m (同上 , 不过是针对上传设定)
MSG=1 (如果设定为 1伺服器将会针对相关事件显示 ./message/*.msg 里面的文字档案 , 如果妳不想要这个功能请设定为 0 )
LOG=1 (如果设定为 1伺服器将会启动纪录系统 , 如果妳不想要这个功能请设定为 0 )
LOGNAME=fixed (可为 fixed , daily , monthly , yearly 之任何一种)
DIRMSG=1 (如果设定为 1伺服器将会再使用者进入某一目录时显示指定的文字档案内容, 如果妳不想要这个功能请设定为 0 )
DIRMSGFILE=message.txt (上述功能所指定的文字档名 , 不包括目录)
DUPECHK=1 (重复档案检查 0=disabled , 1=online dupecheck , 2=online+offline dupecheck)
USE_MEM_DB=0 (0 or 1 , 1则启动高速记忆体内资料库 , 注意使用memdb时磁碟上的userfile并不随时保持同步)
DUPECHKDB=C:\Program Files\RaidenFTPD\files.lst (由 DupeMaker 所产生的offline档案列表资料库的完整路径)
DUPECHKSHOWFULL=1 (当使用者下 site srch 命令时 , 1=显示完整路径 , 0=显示相对路径 )
OVERWRITE_COMPLETE=1 (1=使用者无法覆写已经标记为良好的档案)
DNS_LOOKUP=1 (1=再使用者连线时作dns检查 , 如果设为 0 , Domain name验证将不会运作)
SFV_CHK=1 (1=开启自动SFV/MD5验证)
ZIP_CHK=1 (0=关闭 1=开启ZIP验证 2=开启,但自动删除坏掉的档案)
SHOW_ITEM_NO_R=1 (1=一般模式 ,0=将使用者无权读取的档案目录隐藏起来)
ANTI_NOOP=0 (1=使用者使用NOOP命令将不会更新其最後活动时间)
onNewDir=(event trigger that occurs when user creates a new directory)
onDelDir=(event trigger that occurs when user deletes a directory)
onMoveDir=(event trigger that occurs when user moves a directory by site move command)
onUserLogin=(event trigger that occurs when user logs in)
onUserLoginFailed=(event trigger that occurs when user fails to login)
onUserLogout=(event trigger that occurs when user logs out)
onFileUploaded=(event trigger that occurs when user uploads a file)
onSfvUploaded=(event trigger that occurs when user uploads a *.sfv or *.md5 files)
onSfvFailed=(event trigger that occurs when the file user uploads does not pass crc/md5 check)
onSfvSuccess=(event trigger that occurs when the file user uploads pass the crc/md5 check)
onSfvComplete=(event trigger that occurs when all files listed in a *.sfv/*.md5 file are uploaded and checked successfully)
onFileDownloaded=(event trigger that occurs when the user downloaded a file)
onFileDeleted=(event trigger that occurs when the user deletes a file successfully)
onFilePreDelete=(event trigger that occurs before the user deletes a file)
onFilePreUpload=(event trigger that occurs when the user is just starting to upload a file)
onMp3Uploaded=(event trigger that occurs when the user uploads a mp3 file)
onZipUploaded=(event trigger that occurs when the user uploads a zip file)
onNukeDir=(event trigger that occurs when the user sends the command site nuke)
onSiteCmd=(event trigger that occurs when the user sends any site command , this is executed before the excution of site command)
BOUNCERIP= (如果妳有使用支援IDNT命令的FTPD protocol bouncer您必须输入它的IP位址)
EXCEPT_SITE_CMD_R= (把你想要关闭的site命令放在这里 , e.g. =who,utop,dtop , 针对root level users)
EXCEPT_SITE_CMD_S= (把你想要关闭的site命令放在这里 , e.g. =who,utop,dtop , 针对super level users)
EXCEPT_SITE_CMD_N= (把你想要关闭的site命令放在这里 , e.g. =who,utop,dtop , 针对normal level users)
EXCEPT_SITE_CMD_G= (把你想要关闭的site命令放在这里 , e.g. =who,utop,dtop , 针对guest level users)
ADVANCED=1 (以下所有的功能除非你把这个设为1不然都不会出现)
[EGGDROP]
enable=0 (如果为1 , 伺服器在启动时会尝试连线到EGGDROP)
user= (user account on the EGGDROP)
pass= (user pass on the EGGDROP)
ip= (IP of the EGGDROP)
port= (listen port of the EGGDROP)
onNewDir=(event trigger that occurs when user creates a new directory)
onDelDir=(event trigger that occurs when user deletes a directory)
onMoveDir=(event trigger that occurs when user moves a directory by site move command)
onUserLogin=(event trigger that occurs when user logs in)
onUserLogout=(event trigger that occurs when user logs out)
onFileUploaded=(event trigger that occurs when user uploads a file)
onSfvUploaded=(event trigger that occurs when user uploads a *.sfv or *.md5 files)
onSfvFailed=(event trigger that occurs when the file user uploads does not pass crc/md5 check)
onSfvSuccess=(event trigger that occurs when the file user uploads pass the crc/md5 check)
onSfvComplete=(event trigger that occurs when all files listed in a *.sfv/*.md5 file are uploaded and checked successfully)
onFileDownloaded=(event trigger that occurs when the user downloaded a file)
onFileDeleted=(event trigger that occurs when the user deletes a file successfully)
onFilePreUpload=(event trigger that occurs when the user is just starting to upload a file)
onMp3Uploaded=(event trigger that occurs when the user uploads a mp3 file)
onZipUploaded=(event trigger that occurs when the user uploads a zip file)
onNukeDir=(event trigger that occurs when the user sends the command site nuke)
onSiteCmd=(event trigger that occurs when the user sends any site command , this is executed before the excution of site command)
note : the event triggers can trigger 2 types of program now , one is local executable file . for example Scan for virues when user uploads a file if you are using norton antivirues 2001 try the command line utility from norton "navdx" first get the short path name of norton antivirues's path ex c:\nav and in *.ftpd file edit this line onFileUploaded=file://c:\nav\navdx.exe %q%Q and it will call NAV to scan your file everytime a file is uploaded however you need to get the SHORTPATH name for your navdx . Submit to a remote web server CGI program when an user logs in if you are running some kind of database server and having a CGI program interface , you may want to keep the login records in the database server , in RaidenFTPD this can be very simple , if your CGI program location is http://127.0.0.1/cgi/addlogin.cgi , and if it require 2 parameters username and time , you simply need to edit this line in the RaidenFTPD *.ftpd file onUserLogin =http://127.0.0.1/cgi/addlogin.cgi?username=%S&time=%t and it will call this CGI when user logs in your server , and sending his username and current time to the CGI program if you are interested in how many variables can you use , please see this page help-variables.html

Copyright © RaidenFTPD TEAM , ALL RIGHT RESERVED

REVISION 2.2 , 2002/01/02