荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: alone (角半|好人|戒网), 信区: Newsoftware
标  题: ioFTPD配置指南(见笑方家了)zz
发信站: 荔园晨风BBS站 (Wed Nov 26 13:10:50 2003), 站内信件

发信人: sCry (萝卜丝), 信区: Software
标  题: ioFTPD配置指南(见笑方家了)
发信站: BTBBS (Wed Nov 26 11:30:29 2003), 站内信件


ioFTPD配置指南

一、ioFTPD介绍
ioftpd是应用于windows平台(Win2000, WinNT, WinXp及2003)的glftpd(一个linux下功能强
大的ftpd),虽然现在还是beta版(ioftpd-beta-5.3.x),但功能已经非常强大。无论是稳定
性、速度、资源占用率还是效率,都可与其他ftp服务器软件抗衡。作者追求在极限负荷下
的最大性
能,宣称用ioFTPD架构的服务器,如果在线人数少于100人,是在浪费ioFTPD以及他的时间
,ioFTPD可支持最大在线人数1万人以上。言下之意,ioFTPD服务器的性能是卓越的。

[code]ioFTPD吸取了其他优秀ftp daemon的优点,并整合在一起,其特性包括:
* 性能卓越
  - 在C语言下,用高度优化算法编译
  - 可升级的多线程内核
* 资源占用少
  - 灵活的线程管理方式
  - 采用先进的WinNT特殊调用
  - 内部管理来防止内存碎片
  - 准确的带宽管理
* 安全性能良好
  - SSL/TLS兼容
  - 灵活的权限管理
  - 用缓存检查Ident (rfc 931)
  - 用内部缓存检查Hostname reverse
  - 类似于Unix的文件权限
* 扩展方便
  - 用共用内存可与外部程序方便交流
  - 支持外部模块
  - 多个不同事件类型
  - 内置TCL编译器
* 整合的 HTTP daemon
  - 平台与管理分离
  - Start/Stop/Create 虚拟服务
  - http下流文件服务
  - 管理用户、组、计划及文件系统
  - 开发自己的脚本,方便管理
  - 用户监控
* Telnet daemon[/code]

二、ioFTPD的文件结构

[code]/cache    <-- 包含缓存文件,请不要改动此目录下的文件。目录下的文件数量由配
置文件设置。
/etc      <-- 包括passwd,group,default.vfs,ioftpd.env文件:
                passwd (为用户名,用户的uid和用户id列表)
                group (组列表及Gid,组ID)
                default.vfs和admin.vfs (虚拟文件系统(VFS)范例)
                ioftpd.env (环境变量列表)
/groups   <-- 此目录下为组数据列表. 文件名即为组ID(GIDs)
/help     <-- 帮助文件.
/lib      <-- TCL 库.
/logs     <-- 事件记录文件如,Error.log 和 Sysop.log等.
/scripts  <-- ioFTPD配套的第三方脚本可放在此目录下.
/site     <-- 缺省的服务器的根目录
/source   <-- 变量源代码(.h文件),给第三方脚本开发者用
/system   <-- ioFTPD.exe, ioFTPD.ini, tcl84.dll
/text     <-- 用户登陆时显示的信息,自己可以修改
/users    <-- 用户资料,文件名就是用户ID(UIDs).[/code]

象其他ftpd一样,ioftpd的用户均为组内用户,可按组操作。在您的服务器系统建好后,请
将/groups, /users, 及/etc目录备份,以备升级用


[code]/cache    <-- 包含缓存文件,请不要改动此目录下的文件。目录下的文件数量由配
置文件设置。
/etc      <-- 包括passwd,group,default.vfs,ioftpd.env文件:
                passwd (为用户名,用户的uid和用户id列表)
                group (组列表及Gid,组ID)
                default.vfs和admin.vfs (虚拟文件系统(VFS)范例)
                ioftpd.env (环境变量列表)
/groups   <-- 此目录下为组数据列表. 文件名即为组ID(GIDs)
/help     <-- 帮助文件.
/lib      <-- TCL 库.
/logs     <-- 事件记录文件如,Error.log 和 Sysop.log等.
/scripts  <-- ioFTPD配套的第三方脚本可放在此目录下.
/site     <-- 缺省的服务器的根目录
/source   <-- 变量源代码(.h文件),给第三方脚本开发者用
/system   <-- ioFTPD.exe, ioFTPD.ini, tcl84.dll
/text     <-- 用户登陆时显示的信息,自己可以修改
/users    <-- 用户资料,文件名就是用户ID(UIDs).[/code]

象其他ftpd一样,ioftpd的用户均为组内用户,可按组操作。在您的服务器系统建好后,请
将/groups, /users, 及/etc目录备份,以备升级用



三、基本的ioFTPD配置

ioFTPD的配置全部在ioFTPD.ini里完成,修改的地方不多,大部分可缺省。最简单的配置只
需将服务器的IP地址与端口改变就可运行了。
几个符号:

*:通配所有 ;和#:注释此行,表示不执行这一行 !:表示拒绝。


1、 首先要配置虚拟目录(SFV),该文件在/etc目录下面。你可对不同组、用户命名不同的.
sfv文件,并用site命令指定给不同的用户。

[code]"c:\ioFTPD\site"          /                    #根目录,自己随便指定
"d:\games"                      /games               #引号内为实目录,/后为服务
器显示的虚拟目录
"e:\mp3"                        /mp3
"c:\123"                        /mnt                 #将C:\123和d:\345的内容虚拟
成一个目录
"d:\345"                        /mnt[/code]


2、配置ioftpd.ini文件
该文件在/system目录下,与执行文件在一起。

[code]
[ioFTPD]                              #设置服务器的全局变量
Ftp_Login_Attempts       = 3          #最大重试数,若超过则被ban "Temporary_Ban_
Duration"秒
Hide_Tray                = False      #隐藏图标,未注册版本无此功能
Cache_Max                = 100        # /cache目录的最大文件数据
DirectoryCache_Size      = 1000       # 缓存的服务器文件目录最大数目
TCL_Pool_Size            = 10         # TCL命令池的最大数目
Double_Click             = https://127.0.0.1:10000/    #这个不注释(行前加;或#)的
话,双击会连此地址
Process_Priority         = Normal     # (Idle/Normal/High/Realtime) 处理程序的优
先权
Worker_Thread_Count      = 10         # 工作者线程数
Io_Thread_Count          = 3          # io线程数(设为4比较好,只有注册版本才有此
功能)
Encryption_Thread_Count  = 5          # 加密线程数目
LogIn_TimeOut            = 15         # 登陆时的时长限制
Idle_TimeOut             = 120        # 空闲时间限制
File_Concurrent_Requests = 5          # 每个device最大同时读写操作数(注册版本才
能此功能)
File_PreAllocation       = 0          # 上传时预定位的字节大小


[Locations]                                       #系统文件存放位置
User_Id_Table   = ..\etc\UserIdTable
Group_Id_Table   = ..\etc\GroupIdTable
Hosts_Rules     = ..\etc\Hosts.Rules

User_Files      = ..\users
Group_Files     = ..\groups
Log_Files       = ..\logs
Cache_Files     = ..\cache

Ftp_Messages    = ..\text\ftp
Telnet_Messages = ..\text\telnet
Html_Files      = ..\text\http

Default_Vfs     = ..\etc\default.vfs
Environment     = ..\etc\ioftpd.env



##################### DEVICES ########################
##
#
# [Device Name]
# Host   = <Host/IP>         # External host. Address shown to clients. (0.0.0.0
 = any local ip)
# Ports  = <Begin-End>       # Ports to use for data transfers. May contain comm
a seperated list of port ranges.
# Random = <True/False>      # Use ports in random order
# Bind   = <Host/IP>         # Internal host. If specified, connections are boun
d to this address instead of HOST.
#
# Global_Inbound_Bandwidth  = <kB/s>  # Limit overall inbound speeds
# Global_Outbound_Bandwidth = <kB/s>  # Limit overall outbound speeds
# Client_Inbound_Bandwidth  = <kB/s>  # Limit client inbound speeds
# Client_Outbound_Bandwidth = <kB/s>  # Limit client outbound speeds
#


[Any]                                                # 设备名,要与Device_Name下
的相同。不然失败。可用缺省名。
Host                            = 0.0.0.0            # IP地址,用0.0.0.0表示所有
适配的IP地址
Ports                           = 1024-2048          # 读取文件的端口范围。用缺
省值比较好
Random                          = True               # 读取文件时是否随机,应该
选True比较好
;Global_Inbound_Bandwidth       = 1000               # 上传总带宽控制,去掉;就表
示应用此功能
;Global_Outbound_Bandwidth      = 2000               # 下载总带宽控制
;Client_Inbound_Bandwidth       = 100                # 每用户上传带宽控制,注册
版本功能
;Client_Outbound_Bandwidth      = 50                 # 每用户下载带宽控制,注册
版本功能
;Bind                           =


################## END OF DEVICES ####################



##################### SERVICES #######################

[FTP_Service]
Type                    = FTP
Device_Name             = Any                        # 此名要与前面的设备名相同!
!
Port                    = 9999                       # ftp服务器的端口号
Description             = My FTP Service             # 想写些什么呢?
User_Limit              = 10                         # 最大同时在线用户数
Allowed_Users           = *                          # 表示允许所有用户登陆,如
您不想让sCry登陆,可加上!sCry.
;Messages                = ..\text\ftp               # 系统反馈给您的一些有用信


### Encryption ###
#
Require_Encrypted_Auth  = !*                         # 是否请求加密认证,!*表示
不认证,若为sCry,则只能sCry认证
Require_Encrypted_Data  = !*                         # 是否请求数据传输认证,!*
表示不认证,若为sCry,则只能sCry认证
Certificate_Name        = 192.168.1.10               # 认证服务器,请先加;,如果
用SSL认证,下面再讲。
Explicit_Encryption     = True
Encryption_Protocol     = SSL3
Min_Cipher_Strength     = 1
Max_Cipher_Strength     = 40
#Max_Cipher_Strength     = 384

### IDNT command handler ###
#
Get_External_Ident      = True

### Traffic Balancing ###
#
;Data_Devices            =
;Random_Devices          = True


[Telnet_Service]                                      # Telnet与http服务,如果不
用的话,可以将这两个session删除
Type                    = Telnet
Device_Name             = Any
Port                    = 10001
Description             = My Telnet Service
User_Limit              = 10
Allowed_Users           = T !*
;Messages                = ..\text\telnet


[HTTP_Service]
Type                    = HTTP
Device_Name             = Any
Port                    = 10000
Description             = My HTTP Service
User_Limit              = 50
Allowed_Users           = H !*
;Messages                = ..\text\http
Certificate_Name        = 192.168.1.10
Explicit_Encryption     = False
Encryption_Protocol     = SSL3
Min_Cipher_Strength     = 128
Max_Cipher_Strength     = 384


################## END OF SERVICES ###################


[Network]
Active_Services            = FTP_Service Telnet_Service HTTP_Service     #这个只
要ftp_service就可

Nagle                      = True False      # Enable/Disable TCP Nagle算法(我不
懂这是什么算法)
Ident_Timeout              = 5          # Set ident timeout (seconds)
Hostname_Cache_Duration    = 1800       # Seconds cached hostname is valid
Ident_Cache_Duration       = 120        # Seconds cached ident is valid
Connections_To_Ban         = 1000000    # 超过这么多连接数就被ban "Temporary_Ban
_Duration"秒
Ban_Counter_Reset_Interval = 30         # Ban计数重置间隔,应该是每隔30秒检查一

Temporary_Ban_Duration     = 1200       # 被Ban的机器20分钟内不能登陆
Internal_Transfer_Buffer   = 65536      # Internal transfer buffer size
Scheduler_Update_Speed     = NORMAL     # Socket scheduler update speed (HIGH/NO
RMAL/LOW/DISABLED)


[Sections]
## Maximum of 10 different credit sections ##
#
# <alias> = <credit section #> <path>
# <alias> = <credit section #> <stats section #> <path>
#

Home    = 0 1 /home/*
# 最多可设置10个section(0-9). 此处0为计算credit的section, 1为计入统计的section,
 /home/*为虚拟目录名注意后面的*号不能省。这个设置可对不同的section配置credit,如
/DivX/ /0Day/ /APPZ/等
Default = 0 *


[VFS]
###
# Default attributes for files & directories
#
# Required Parameters:  <filemode> <owner uid>:<owner gid>
#

Default_Directory_Attributes    = 755 0:0
  # 4:read,2:write,1:execute. 第一个7表示目录所有者的权限,也就是4+2+1=7, 该目录
对其所有者为dwrx.第2个数字5是目录所有者所在组的权限,5表示不可写。第3个数字5是表
示其他人对该目录的权限。
Default_File_Attributes         = 644 0:0


###
# Command specific rules
#
Modify_Stats_On_Delete  = False


###
# Detailed permissions for directories
#
# priviledge    = <virtual path> <rights>
设置:权限      = 虚拟目录 权限

以下设置文件用户的目录权限。1表示ftp站点管理员,只能在/users文件内设置,不能用si
te命令改变。M即master,目录管理员等,也只能在

/users文件里设置。V: VFS管理员,还有N: nuker, 3:没任何权限。A:匿名用户,任何密
码都能登陆。-USER, =Group.
Upload          = * *
Resume          = * *
Download        = * *    #如果你要设置/APE目录 Group1组只可浏览不可下载,可写成

                                Download        = /APE/* !=Group1 *  #这一行意为
APE目录group1不能下载,而其他组的用户都能下载
                                Download        = * *
MakeDir         = * *
RemoveOwnDir    = * *
RemoveDir       = * 1VM  #这个表示为只有ftp站点管理员,或VFS管理员,或master可移
动目录,以下类似
Rename          = * 1VM
RenameOwn       = * *
Overwrite       = * 1VM
Delete          = * 1VM
DeleteOwn       = * *
NoStats         = * =lSpeed !*
ShowActivity    = /private/* -ioFTPD !*
ShowActivity    = * !A *[/code]

3、运行ioFTPD:

运行/system/ioftpd.exe,启动ioftpd服务器程序。如果没什么问题的话,现在应该可以看
到你的服务器内容了。

下载页面:http://www.ioftpd.com/download/
参考: terencehe @CCF  [url=http://bbs.et8.net/bbs/showthread.php?s=&threadid=32
2747&highlight=ioftpd%B5%C4%B0%B2%D7%B0%BA%CD%C5%E4%D6%C3]ioftpd的安装和配置[/ur
l]

四、配置不同功能的script

ioFTPD就象是大厨手中的食物原料,必须加上姜、桂皮、辣椒等各种辅料才能炮制出完美的
菜肴来。script(脚本程序)就是这些佳肴的辅料,

可能 实现你想要的种不同的功能。

script有两大类:zipscipt和Sitebot / IRC ,前者用于文件检查、统计等,后者主要用于
irc annouces. 我没有研究过ircbot,只能介绍一

下zipscipt. ioFTPD网站推荐的配置方案A为:ioFTPD + ioBanana + ioA; 方案B为:ioFTP
D+ioZS 或 projectZS 或 SioFTPD + dZSbot + ioA
 (一) script简介

1、ioBanana 作者Mouton, 现作者为Harm.

网址: http://ioBanana.abuserz.com,可免费下载有限制的版本。

ioBanana是一个All-in-One的ioFTPD script,  包括各种Site命令,!irc_commands, zipsc
ript 及 trial/quota 功能。

   SITE 命令有: rules, ginfo, gstats, pretime, new, cid, resetstats, roulette, d
ice, open, close, approve, listapproved, version, rotatelog, rescan, totals, age
, undupe, nfo, uptime,还包括一些修改ioFTPD和ioA原始命令的site命令如: nuke, unn
uke, pre,
wipe, user (uinfo mod.) IRC 命令: !speed, !who, !bw, !uploaders, !leechers, !idl
ers, !statsup, !statsdn, !bnc, !approve, !listapproved, !undupe, !rules, !sectio
ns, !search, !requests, !trials, !passed, !quota, !quotas, !sitenew, !pretime, !
gstats,
!free, !affils, ! uptime, !silent, !restart

Zipscript: ZIP (file_id.diz) 和 SFV 检查支持, 可生成.bad & .missing, Race时IRC a
nnounces (new racer, 1st file received, halfway, complete, etc.), 自定义文件输出
及目录标签(dirtag), 自动进行续传文件的crc32检查, 强制nfo/sfv或sample目录先上传,
 慢速racer
踢站/惩罚, 不完整文件及race符号链接.

其他特征:  每日统计,每日记录更新, 文件或目录的重传检查(Dupechecker) , 上传时nf
o文件中IMDB和IMDB URL检查, IP/Ident bans,

#download/upload 人数限制, 若release太老,则禁止上传, 传输记录(仅上传), IRC自动
宣告前10最多上传者,还包括ioBMonitor, 用于实时

监控用户活动(不推荐用,因为有更好用的ioGUI)。

2、ioA  作者:WarC
网址:http://warc.mine.nu
前段作者将源代码弄丢了。现在的版本是ioA 0.81.
几个推荐方案中都有ioA, 足见其功能。SITE WIPE, SITE PRE, SITE REQUEST, SITE NUKE,
 newdate。

3、ioZS 作者:
网址:http://www.iozs.com./
特征:
- 预编译为可执行文件
- 用.ini文件配置
- 检查各种类型的 releases: .ZIPs, .RARs, .MP3
- .ZIP 特征如.nfo标签及.zip文件内无用文件(如nfo)的清除
- 自动提取zip文件中的.nfo和file_id.diz文件
- SFV 清理 (去掉无用注释)
- MP3 IDtag 读取 & 建立.M3U 文件
- 根据日期(Year)、类型(Genre)及歌手(Artist)来对MP3 排序
- 用户及组 race 统计
- 上一级目录未完成标签建立
- 可选多种用户上传统计目录标签


4、ioGUI
一个好用的windows界面ioFTPD配置、管理及监控程序。

另外还有其他各种功能的script,可去http://www.ioftpd.com/board/forumdisplay.php?s
=&forumid=11查找自己需要的功能并进行配置。


 (二) script配置
我们用推荐的方案A,只需加入ioA和ioB(anana)就可以,如果您想要窗口界面,请再加一个
ioGUI即可。所有的script可分目录放在/scripts目录下,这样看起来比较整齐。配置没有
想象的难,只要参照各脚本的安装说明一步步进行,很容易就完成了……

1、ioA配置
①将包解开放在/scripts/ioa目录下。
②首先配置ioa.cfg文件,用notepad打开. 主要是设置一些文件路径、虚拟文件目录这些东
西。
[code]#
# For ioA 0.8.1+
#
################################################################
# Debugmode or not
# Highly recommended if having problems if contacting me(WarC)

debug=1                   //是否要看debug结果,1为要,0为不要

#Disable ioA logfile. Default yes
DisableLoG=1              //是否要记录ioA的运行结果

################################################################
#Where is user/group/users located
#                         //你的ioftpd的目录,建议用全部替换,后面还有好多……
ioFTPD_User_Path=d:\ioFTPD\users
ioFTPD_User_File=d:\ioFTPD\etc\UserIdTable
ioFTPD_Group_File=d:\ioFTPD\etc\GroupIdTable

################################################################
# Path to logfiles. If syslog and Errlog is to be used then put
# this to same path as ioFTPD stores logs. Otherwise anywhere.
#

Path_For_Log_Files=d:\ioFTPD\logs

################################################################
# Use Buffer off or not. This is default as off
# NOTE!!! If using SSL do NOT turn this on it will
# corrupt your userfiles
#
Use_Buffer_Off=0

################################################################
# PRE part
#
# Format group: "<group>|<pretype>|</path/to/predir>|<userid>|<groupid>|<ufo>"
#
# <group>          Name of group allowed to pre
# <pretype>        What area can a group pre in. Can be multiple by putting spac
e inbetween
# <path to predir> Virtual path to where pre is stored
# <userid>         If "touch" is on sets this userid as owner on files and dirs.
 NOTE USERID
# <groupid>        If "touch" is on sets this groupid as owner on files and dirs
. NOTE GROUPID
# <ufo>            This can be any text. can be used for displaying something sp
ecific on PRE.
#                  Added since it was a request. If no use just put anything.
#
# Following will allow pre from any dir underneath
# Pre_Group_Data=myGroup|iSO Mp3|/_pre/mygroup/*|0|0|hubba
#
# Following will allow pre from EXACLY that dir
# Pre_Group_Data=myGroup|iSO Mp3|/_pre/mygroup|0|0|hubba
#
#
#
# Format area: "<releasetype>|<description>|<destination>|<VFS path>|<sectionnum
ber>|<symlink>"
#
# <pretype>       Name of the area
# <description>   Some funky text that describes
# <destination>   Physical path where pre will be placed. NOOOO "/", it should b
e "\" as every other path in windows
# <vfs path>      Virtual path of above directory
# <sectionnumber> When giving credits on pre correct section should get the cred
s
# <symlink>       Physical path where the symlink should be. Only works for date
d.
#                 If no link is wanted put NULL. That tells ioA to not create a
symlink on newdate
#
# Possible datethings used on paths:
# %Y = Year in long form(2003)
# %y = Year in short form(03)
# %M = Month
# %W = Week
# %D = Day
#

Pre_Group_Data=group1|iSO mp3|/_pre/group1/*|0|0|hubba
Pre_Group_Data=group2|mp3|/_pre/group2/*|0|0|hubba
//            =组|pre-release类型|Pre-数据的路径,不要忘了*号|用户ID|组ID|你想要
的一些信息

Area=iSO|Some ISO Shit|d:\ioftpd\site\iso|/ISO|0|NULL
Area=mp3|Some MP3 shit|d:\ioftpd\site\mp3\%M%D|/MP3/%M%D|0|d:\ioFTPD\site\today-
mp3
//  =release类型|描述|目标路径|虚拟目录|section号码|目录链接
// 在目标路径里如果写 d:\ioftpd\site\mp3\%M%D ,则会在事件激活时(ioftpd.ini里sch
edule里设置)自动在MP3目录下生成/月日/这样的目录,如1125.写成%M.%D.%Y则生成11.25.
2003这样的目录。

#Option to give credits to the dude that pre or uploaders or none.
//是否给上传者或pre相应的credit

Give_Credits_to_Pre_Dude=1
Give_Credits_to_Uploaders=0
Touch_Times_on_PRE=1
Touch_Owner_on_PRE=1
Use_Execute_on_Pre=0
Execute_on_Pre_Path=d:\ioFTPD\scripts\imdb.exe

################################################################
# Log formats. Use as needed.
# NOTE these are the ones used by dZsbot.tcl by b0unty. If more is needed
# look in manual where all variables are stated.
#
Log_New_Date="%vfs" "%area" "%desc" "%phys"
Log_PRE="%vfs/%release" "%user" "%group" "%files" "%mb" "%type" "%desc"
Log_Give="%user" "%group" "%mb" "%target"
Log_Take="%user" "%group" "%mb" "%target"
Log_Wipe="%vfs/%release" "%user" "%group" "%dirs" "%files" "%mb"
Log_Invite="%user" "%group" "%ircnick"
Log_Request="%user" "%group" "%request"
Log_Reqfilled="%user" "%group" "%request"
Log_Reqdel="%user" "%group" "%request"
Log_Nuke="%vfs" "%user@%group" "%nukee@%nukeegroup" "%multi %size" "%reason"
Log_UnNuke="%vfs" "%user@%group" "%nukee@%nukeegroup" "%multi %size" "%reason"

//ioa 生成记录文件的格式。

################################################################
# Files not counted on a nuke, unnuke, wipe, pre.
# .* special with files starting with .
# example:
# File_Filter=.* .log .message .nfo .sfv
#
File_Filter=.* .nfo .m3u .sfv

//这些文件不计算在nuke, unnuke, wipe, pre内。也就是这些文件不nuke, unnuke, wipe,
 pre.
##############################################################
# Rescanall header
# example: RescanAll_Header=[SERVER]-[%oof%n OK]-[SERVER]
# Possible variabels:
# %m  = missing
# %n  = Total
# %o  = OK
# %s  = size
# %%  = percentage
#

RescanAll_Complete_Header=[SERVER]-[%sM %oF - COMPLETE]-[SERVER]
RescanAll_InComplete_Header=[SERVER]-[%o of %nF - INCOMPLETE]-[SERVER]
//[server]写成你的server名字
# Create a tag for rescanall.
# 0 = None, 1 = Directory, 2 = File
RescanAll_Create_Tag=1
//生成一个目录,2为生成文件。

RescanAll_Unique_Word=[SERVER]
RescanAll_Unique_Word_Inc=incomplete

# 0 = No, 1 = Yes
RescanAll_Create_Missing=1
//在rescanall后创建.missing文件,0为不创建

##############################################################
# Site search paths and vfs
#
# Syntax for this file is 3 different lines:
# Search_Path=             = Where to search
# Search_Exclude=          = Where not to search
# Search_Exclude_Show=     = Do not display dirs containing this
#
# Search_Path=<physical path>|<VFS path>|<level to be searched>
# Search_Exclude=<physical path>
# Search_Exclude_Show=<word that is not allowed in dirname>
#
# example:
#   Search_Path=d:\ioftpd\site\iso|/iso|0
#   This will search only in iso. No subdirs
#
#   Search_Path=d:\ioftpd\site\MP3|/MP3|1
#   This will search MP3 dir and one dir down. Usually a dated dir
#
# NOTE!! do NOT add a searchpath and then exlude it as well
#
//设置搜索文件目录,可以用site search命令搜索全站文件。后面的数字3表示目录下搜索
3层子目录
Search_Path=d:\ioftpd\site|/|3
Search_Path=e:\archive|/archive|3
Search_Exclude_Path=d:\ioftpd\site\_pre  //不被搜索的目录
Search_Exclude_Show=COMPLETE
Search_Exclude_Show=INCOMPLETE
Search_Minimum_Chars=3

# Experimental but gives how old a dir is.
Search_Show_Dir_Age=1
//结果是否显示上传的时间

# .* special with files starting with .
#Note this is ONLY used in search. Not in pre, wipe, nuke
Search_File_Filter=.*

# Is it possible to search on filenames as well?
Search_Include_Files=1
# This is special. Some loves it some hates it.
# 0 = no * is needed when searching(like glftpd).
# 1 = like ioA original and best :)
# Main difference is that its possible to specify more precise what to search fo
r
Search_ioA_Mode=1
//建议这里设为0, 不要通配符就能搜索文件了。

##############################################
# NEWDATE PART
# newdate uses the ares specified above in presection
# and creates dates accordning to parameters there.
# NOTE its not needed to have pregroup setup. Only area.

##############################################
# Message part
# Path to dir in which msg-files will be created.
# This is when using MSG. NOT the header/footers
Messages_Path=d:\ioFTPD\scripts\ioA\msg
//显示的信息部分,注意目录要写对,不然找不到文件呀……


##############################################
# Requestsystem
#
# Where to store requests
RequestFile=d:\ioFTPD\site\requests\.ioFTPD.message
//这部分是request系统,可以使用site request命令。
//存放request信息的文件,后面的不要改,只注意目录。

# Splitter in requestfile.
RequestField= ->
//用“->”分开用户名与request之间的部分。

# Requestline is the syntax how it looks in requestfile
# It requires to specify width of text with new cookiestuff
#
# Line MUST be in order: ## user request
#
# How cookies work can be read in manual search for cookie
# How cookies work can be read in manual search for cookie
# How cookies work can be read in manual search for cookie
#

# *NOTE* from 0.7.9 version you can use %request instead. it will not cut the te
xt then but
# do NOT place anything after the cookie then.

RequestLine= [%##] [%-10user] -> %-35request
//-10表示用户名留10个字符的空,右对齐。-35表示request部分留35个字符,右对齐。可
设为60左右。

# 最多可request 10个文件.

RequestMax=10


# 每个用户最多可request几个文件

Request_Max_User=3

# Create a tag for request and what syntax. %r is required
# 0 = None, 1 = Directory, 2 = File
Request_Add_Tag=1
Request_Header=[REQ]-%request
//创建目录或文件,或不创建, tag的形式为[REQ]-%request

# Should a dir be created in requestdir on filled
# 0 = None, 1 = Directory, 2 = File
Request_Add_Tag_Filled=1
Request_Filled_Header=[FiLLED]-%request
//request fill后是否创建文件、或目录

#Send message to user that requested on filled?
Request_Send_Message_On_Filled=1
//fill后是否发送消息给requester.


##############################################
# Nuke/UnNuke
#
Nuke_Splitter=
Nuke_Header=[Nuked]-%r
Nuke_Group_Flag=G                  //需G权限(组管理)的用户才可nuke
Nuke_Empty_Dir_Amount=25
Nuke_Message_File=.ioFTPD.message
Nuke_Create_MessageFile=1
UnNuke_Create_MessageFile=1

# Create a tag for nuke and what syntax.
# 0 = None, 1 = Directory, 2 = File
Nuke_Tag_Create=2
Nuke_Tag=NUKED %multi x by %user for %reason
//NUKE部分,可使用site nuke
//是否创建目录或文件标签

Nuke_Using_SnypeTEST_Trial_Script=1
SnypeTEST_Trial_Script_Path=d:\ioFTPD\scripts\ioTrial.exe

##############################################
# Size. Paths exluded to search into
#
Size_Exclude_Path=d:\ioFTPD\site\_pre

##############################################
# Where to store datafile for weekly allotment
#
Weekly_Data_File=d:\ioFTPD\scripts\ioA\ioa.weekly.dat

#############################################
# VFS place wipe can NOT be exectuted in.
# Example below makes it impossible to wipe from root
# Note that this checks FROM where it is possible to wipe.
# Not WHAT to wipe. This is by design(ohh I love it).
# If NOT wanting to have such check put a - there or remove line
#
No_Wipe=/

##############################################
# Transfer module
# Section that is hidden from display. Example is pre
#
No_Transfer_Section=PRE

##############################################
# Should resetuser also set credits to 0?
#
ResetUser_Also_Include_Credits=1

##############################################
# EXPERIMENTAL
# Use localtime instead of standard UTC time.
# Not recommended but some wanted it
Use_Locale_Time_Instead_of_UTC=0

##############################################
# ioA logging of commands
# This is if you want to log what users do.
# Can then be searched with site cmdlog in same
# way as syslog and errlog.
# NOTE This does not turn off logging to ioFTPD.log

//是否将以下动作记录入文件中。

ioA_Take=1
ioA_Give=1
ioA_Rescanall=1
ioA_Rescan=1
ioA_Invite=1
ioA_Message=1
ioA_Nuke=1
ioA_UnNuke=1
ioA_OneLiner=1
ioA_Pre=1
ioA_Request=1
ioA_Reqfilled=1
ioA_Reqdel=1
ioA_Search=1
ioA_Size=1
ioA_Wipe=1
ioA_Syslog=1
ioA_Errlog=1
ioA_ioAVer=1
ioA_NewDate=1
ioA_Sfv=1
ioA_Nukes=1
ioA_UnNukes=1
ioA_Cmdlog=1
ioA_Weekly=1
ioA_WeeklySet=1
ioA_Transfer=1
ioA_ResetStats=1
ioA_ResetUser=1[/code]

③按安装手册,将以下部分添加到ioftpd.ini相应的部分中,以便让iofptd调用ioA.
[code]
以下部分加入到[scripts]
nuke = EXEC ..\ioA\ioA.exe nuke
unnuke = EXEC ..\ioA\ioA.exe unnuke
nukes = EXEC ..\ioA\ioA.exe nukes
unnukes = EXEC ..\ioA\ioA.exe unnukes
request = EXEC ..\ioA\ioA.exe request
reqfilled = EXEC ..\ioA\ioA.exe reqfilled
reqdel = EXEC ..\ioA\ioA.exe reqdel
pre = EXEC ..\ioA\ioA.exe pre
invite = EXEC ..\ioA\ioA.exe invite
newdate = EXEC ..\ioA\ioA.exe newdate
ioaver = EXEC ..\ioA\ioA.exe ioaver
msg = EXEC ..\ioA\ioA.exe msg
wipe = EXEC ..\ioA\ioA.exe wipe
give = EXEC ..\ioA\ioA.exe give
take = EXEC ..\ioA\ioA.exe take
search = EXEC ..\ioA\ioA.exe search
rescan = EXEC ..\ioA\ioA.exe rescan
rescanall = EXEC ..\ioA\ioA.exe rescanall
onel = EXEC ..\ioA\ioA.exe onel
sfv = EXEC ..\ioA\ioA.exe sfv
size = EXEC ..\ioA\ioA.exe size
syslog = EXEC ..\ioA\ioA.exe syslog
errlog = EXEC ..\ioA\ioA.exe errlog
cmdlog = EXEC ..\ioA\ioA.exe cmdlog
weekly = EXEC ..\ioA\ioA.exe weekly
transfer = EXEC ..\ioA\ioA.exe transfer
resetstats = EXEC ..\ioA\ioA.exe resetstats
resetuser = EXEC ..\ioA\ioA.exe resetuser

以下部分加入[events]:
OnFtpLogIn = EXEC ..\ioA\ioA.exe logon

4. 以下权限加入 ioFTPD.ini[Ftp-SITE-Permissions]区

invite          = *
ioaver          = 1M
sfv             = 1M
msg             = *
newdate         = 1M
nuke            = 1M
nukes           = *
unnuke          = 1M
unnukes         = *
request         = *
reqfilled       = *
pre             = 1G
wipe            = 1MV
take            = 1MV
give            = 1MV
search          = *
rescan          = 1MV
rescanall       = 1MV
onel            = *
size            = 1
syslog          = 1
errlog          = 1
cmdlog          = 1
weekly          = 1MV
transfer        = *
resetstats      = 1M
resetuser       = 1M[/code]

2、ioB(anana)的配置(以ioB1.8d为例)
①将包解开放在/scripts/目录下
②用notepad打开iobanana.ini,进行编辑

[code]
###########
# general #         //全局变量
###########
#
# Only enable debug when it's needed!
# sitebot parameter is the ftp username of your sitebot
# site_timezone and dst (Daylight Saving Time) are used only for pretimes adjust
ments

io_path=D:\ioFTPD                    //路径,请用ctrl+H全部替换成你的ioftpd的安
装目录
io_exec=D:\ioFTPD\system\ioFTPD.exe
debug=0                              //是否回显debug信息,如果想看哪里出问题,最
好设成1,弄好后再改回来。
sitebot=sitebot                      //用于irc的,如果有,你写你的名称
site_timezone=-5                     //时区,中国的话为+8吧?
dst=1                                //类似于夏时制的时间设置
textfiles=D:\ioFTPD\text\ioBanana    //显示的文本信息,实际上是\iobanana-text,
# ^ means start with
# $ means ends with
#
# Eg: ^127. means starts with 127.; will match 127.*.*.*
#     127   means contains 127;     will match 127.*.*.* and *.127.*.* and *.*.1
27.* and *.*.*.127
#     .1$   means ends with .1;     will match *.*.*.1
#     ^127.0.0.1$
#           means IS 127.0.0.1;     will match 127.0.0.1 only
# !!! Same applies to ident matching !!!

ip=^80.230.140.66$
ident=^RPG$
ip_ident=^RPG$@^80.230.
#ip=^127.0.0.1$

########
# imdb #
########
#
# showNFO: Display the info fetched from imdb on upload (ftp)
# logNFO: Log the imdb info in ioftpd.log for the bot to announce
# saveNFO: Save the imdb info in a file
# filename: Filename to save imdb info into (same dir as uploaded .nfo)
# sitename: Will appear in the imdb message, at the bottom

//在上传电影文件时,会自动从nfo里面提取imdb的网址,并连接。
showNFO=1                       //是否显示从imdb获取的影片信息
logNFO=1                        //是否在log文件里记录NFO
saveNFO=1                       //是否在上传目录下保存nfo
filename=imdb.nfo               //保存的文件名
sitename=SiteName               //会显示在imdb 信息下部,


##########
# latest #                      //记录和显示最新上传的文件数目,作为链接放在指定
目录下
##########
#
# latests is the number of links to keep
# hidedirs ARE case-sensitive
# skipdirs are NOT case-sensitive
# showparent setting will display the parent dir in latest dir tag: "[Latest]-pa
rent_dir-latest_dir..."
# saveNFO: Save the imdb info in a file
# filename: Filename to save imdb info into (same dir as uploaded .nfo)
# sitename: Will appear in the imdb message, at the bottom

//在上传电影文件时,会自动从nfo里面提取imdb的网址,并连接。
showNFO=1                       //是否显示从imdb获取的影片信息
logNFO=1                        //是否在log文件里记录NFO
saveNFO=1                       //是否在上传目录下保存nfo
filename=imdb.nfo               //保存的文件名
sitename=SiteName               //会显示在imdb 信息下部,


##########
# latest #                      //记录和显示最新上传的文件数目,作为链接放在指定
目录下
##########
#
# latests is the number of links to keep
# hidedirs ARE case-sensitive
# skipdirs are NOT case-sensitive
# showparent setting will display the parent dir in latest dir tag: "[Latest]-pa
rent_dir-latest_dir..."

latests=3                      //链接文件的最大数目
maxwidth=40                    //链接文件的最大长度,可设置65左右
linkdir=[Latest]-[%]           //目录名形式,%代表relase的名称
linkpath=D:\ioftpd\site\       //将latest的链接放在这个目录下
excluded_dirs_latest=/!ioftpd /pre /requests/___speedtests___        //这些目录
下上传的文件不被链接为lastest.
skipdirs=cd1 cd2 cd3 cd4 cd5 disc1 disc2 disc3 dvd1 dvd2 dvd3 sample samples vob
sub vobsubs subtitle subtitles subs subpack

codec covers                   //release下的这种形式的子目录不被链接为lastest
showparent=1                   //是否将上一级目录记录入目录中,写成[Latest]-pare
nt_dir-latest_dir...这种形式,一般不要的好…




latests_pre=3                  //这是pre部分的最新上传文件链接
maxwidth_pre=40
linkdir_pre=[LatestPre]-[%]
linkpath_pre=D:\ioftpd\site\
showparent_pre=1


###########
# pretime #
###########        //这一部分需要mysql数据库支持,如果没有的话,将下面的选项都设
为0。
#
# NOTE: mysql db needed... disable (put the 3 first flags to 0) if you don't hav
e one!
#
## Table needed:
##
#  CREATE TABLE pretimes (
#    name varchar(255) NOT NULL default '',
#    type varchar(9) NOT NULL default '',
#    timestamp int(11) NOT NULL default '0',
#    UNIQUE KEY name (name)
#  );
## (or similar)
#
# - check_pretime_on_mkd will log in ioftpd.log the rls pretime if avail. when s
omeone creates a dir
# - fill_pretime_on_mkd will save in the db the rls name and timestamp when some
one creates a dir
# ... use one or the other... not both!
# - fill_pretime_on_pre will save in the db each pre'd release
#
# table needs 'name', 'type' and 'timestamp' (UNIX timestamp as INT, NOT mysql t
imestamp format) fields
#
# be sure to set the correct timezone of your database so that the returned time
s are GMT
#

# Flags to enable or disable pretimes checks
check_pretime_on_mkd=1                            //如果没有mysql,将这3个设为0!
fill_pretime_on_mkd=0
fill_pretime_on_pre=1
## Disable those 3 if you don't have a mysql db... (0=disabled)

db_ip=localhost
db_port=3366
db_user=pretimes_user
db_password=patate
db_name=pretimes
table_name=pretimes
pretime_timezone=-5


############
# deny_dir #
############
#
# deny_dir_pre=<applicable dir>|<allow dir creation?>|<log attempts?>|<#mins aft
er pre>
# Examples:
#    deny_dir_pre=/svcd|0|1|5   =>   deny dir creation and log for bot announce
if 5 mins after pre in /svcd section
#    deny_dir_pre=/games|1|1|30 =>   allow dir creation and log for bot announce
 if 30 mins after pre in /games section
#
# !Note: make sure you don't have anything defined here if you don't have a pret
imes db

deny_dir_pre=/PS2|1|1|120                         //如果没有mysql,要将这些目录
留空
deny_dir_pre=/mp3/####|0|1|480


################
# transfer log #
################                                 //所有上传的文件将被记录在.log
文件里,自己配置目录
#
# logs only uploads

transferlog=D:\ioftpd\logs\transfer.log


###########
# sitenew #
###########                                      //用site new命令可以看到新上传
的内容
#
# release_width is the max width of the release shown... release bigger than tha
t will be truncated with ...
# strip_dirs is NOT case-sensitive
# any subdirs of excluded_dirs_sitenew won't show in site new
d
# u can exclude groups, users and flags; use white-space as delimiter for multip
le entries
# !!! don't comment lines; just leave the exclude_xxx param empty if not wanted
!!!

exclude_groups=SiTEOPS Nukers                    //这些组不限制,用空格隔开
exclude_users=Mouton sitebot                     //这些用户不限制,用空格隔开
exclude_flags=1M                                 //具有这些标识的用户不受限制。
1为管理员,M为Master
dl_max=1                                         //最大同时下载的用户,看你的sit
e容量了……
ul_max=3                                         //最大同时上传的用户,看你的sit
e容量了……


##########
# dirlog #
##########
#
# will contain a list of all the dirs currently on your site

dir_log=D:\ioftpd\logs\current_dirs.log           //是否将你site上的目录记录入此
文件


##########
# closed #
##########
#
# list of users that can still login even if site is closed (case sensitive)

masters=Mouton Jimbo                              //即使site关闭了,这些用户也可
以登陆


#################
# race symlinks #
#################
#
# race symlinks creates a symlink (in your ftp root for example) for ongoing rac
es
# race symlinks are created on sfv uploaded and deleted when the rls is complete
 or the release is deleted
# race_dirs are dirs in which races are done; race_dirs are case-sensitive!

create_race_symlink=1                              //是否创建racer的上传目录链接
race_symlink_dir=D:\ioftpd\site\                   //放置在哪个目录下,自己看着
办……
maxwidth_race=40                                   //目录链接的长度
race_linkdir=[Race]-[%]                            //目录链接的形式
race_dirs=/apps/ /svcd/ /games/ /mp3/              //这些上传目录下的上传内容将r
ace symlink,当然是换成你的虚拟文件系统了……


#############
# zipscript #                                      //这个就是进行上传文件检查的
……
#############
#
# parent_stats displays global stats for multiple CDs races in the parent dir (i
f a .nfo is present there)
parent_stats=0                 //是否在nfo文件的上级目录下显示多个CD上传的综合统
计,0为否

# Enable or disable racestats calculations after each file (unnecessary and time
# race_dirs are dirs in which races are done; race_dirs are case-sensitive!

create_race_symlink=1                              //是否创建racer的上传目录链接
race_symlink_dir=D:\ioftpd\site\                   //放置在哪个目录下,自己看着
办……
maxwidth_race=40                                   //目录链接的长度
race_linkdir=[Race]-[%]                            //目录链接的形式
race_dirs=/apps/ /svcd/ /games/ /mp3/              //这些上传目录下的上传内容将r
ace symlink,当然是换成你的虚拟文件系统了……


#############
# zipscript #                                      //这个就是进行上传文件检查的
……
#############
#
# parent_stats displays global stats for multiple CDs races in the parent dir (i
f a .nfo is present there)
parent_stats=0                 //是否在nfo文件的上级目录下显示多个CD上传的综合统
计,0为否

# Enable or disable racestats calculations after each file (unnecessary and time
 consuming!)
always_compute_racestats=1      //是否在每个文件上传后都计算上传统计,1为是,但
没必要,且占时间!

# min_halfway = minimum number of files in release to announce halfway
min_halfway=3                  //如果一个release的文件数达到这个最小值,则在上传
一半后会显示信息。

# Define which %rank? cookies you want to have available in your bot's .skin UST
ATS-B and GSTATS-B (%rank1, %rank2, etc.)
# One line per stat (max 5); check SITE RANK usage for sections syntax
# Only define the stats you will use or loose precious CPU cycles!!
racestats_rank1=wkup sections "!1 *"
racestats_rank2=monthup sections "!1 *"

# Enable or disable 0-byte files checking; only enable if u get many 0-byte file
s on your site!
cleanse_0bytes_files=0                   //是否要将site里的0字节全部自动删除?0
为否

# for mp3 sorting, leave empty to disable             //这是mp3文件在上传时按Gen
re, Year, Artist自动排序的……自行设置排序目


mp3_genre_path=D:\ioftpd\site\mp3\Sorted\Genre\
mp3_year_path=D:\ioftpd\site\mp3\Sorted\Year\
mp3_artist_path=D:\ioftpd\site\mp3\Sorted\Artist\
mp3_artist_sort_alpha=1
excluded_dirs_sortmp3=/!ioftpd /pre /requests/___speedtests___

# sort movies by genre, rating and/or year; leave empty to disable   //这是movi
e文件在上传时按Genre, Year, rating自动排序的…

…自行设置排序目录
movie_year_path=D:\ioftpd\site\movies\Sorted\Year\
movie_genre_path=D:\ioftpd\site\movies\Sorted\Genre\
movie_rating_path=D:\ioftpd\site\movies\Sorted\Rating\
# add_rating will prefix each symlink with "[rating]-" inside Year and Genre dir
s
movie_sort_add_rating=1                    //是否要自动加入rating值
excluded_dirs_sortmovie=/!ioftpd /pre /requests/___speedtests___

# Extract file_id.diz and/or nfo files from zips; enable (1) or disable (0)
extract_diz_zip=1                    //上传完成后自动从zip文件里自动释放diz文件
extract_nfo_zip=1                    //上传完成后自动从zip文件里自动释放nfo文件

# Log (for irc announce) url found in .nfo files inside uploaded .zip
log_url_zipped_nfo=1                 //是否记录zip文件里的nfo文件。

# List of all the allowed and banned nfo files that can be extracted from .zip f
iles
nfo_allow_list=D:\ioftpd\scripts\ZR-Accepted.cfg             //依据此文件内的文
件,决定是否将zip文件里的nfo文件自动释放出来
nfo_ban_list=D:\ioftpd\scripts\ZR-Banned.cfg                 //若zip文件包里有此
文件内的文件,则该nfo文件不会释放在目录下。

# Create incomplete symlinks in parent dir ?             //是否在上级目录下创建
未完成上传的链接
# For all 2_level_incomplete dirs, symlinks will be created in parent's parent f
older (probably your section dir) instead of

inside the release folder
parent_incomplete=1
parent_incomplete_dirs=/0days/ /mp3/                     //上传到这些目录下的文
件要创建未完成上传的链接
2_level_incomplete=cd1 cd2 cd3 cd4 cd5 disc1 disc2 disc3 dvd1 dvd2 dvd3 vobsub v
obsubs subtitle subtitles subs subpack codec

covers     //如果release目录下有这些文件,则一定要先上传sample目录
force_dirs_sample=/svcd/ /divx/        //site目录下的这些目录执行以上规则

# All files uploaded in those dirs, and all subdirs, will be automatically delet
ed on upload
autodelete=/requests/___speedtests___/dropbox  //这些目录下所有上传的文件在完成
后自动删除

# Excluded dirs (includes subdirs): those dirs won't be processed by the zipscri
pt (sfv, zip, mp3, etc.)
excluded_dirs_zs=/!ioftpd /pre /requests/___speedtests___        //这些目录下上
传的文件不执行sfv, zip, mp3等的检查。

# Execute a command when release is complete; available variables: %DIR% %DIRNAM
E% %SFV% %FIRSTFILE%
# Leave empty to disable
# Example 1: on_release_complete=md %DIR%\Extracted | start D:\ioFTPD\scripts\Hi
deRun.exe D:\ioFTPD\scripts\unrar.exe x -y %

FIRSTFILE% %DIR%\Extracted
obsubs subtitle subtitles subs subpack codec

covers     //如果release目录下有这些文件,则一定要先上传sample目录
force_dirs_sample=/svcd/ /divx/        //site目录下的这些目录执行以上规则

# All files uploaded in those dirs, and all subdirs, will be automatically delet
ed on upload
autodelete=/requests/___speedtests___/dropbox  //这些目录下所有上传的文件在完成
后自动删除

# Excluded dirs (includes subdirs): those dirs won't be processed by the zipscri
pt (sfv, zip, mp3, etc.)
excluded_dirs_zs=/!ioftpd /pre /requests/___speedtests___        //这些目录下上
传的文件不执行sfv, zip, mp3等的检查。

# Execute a command when release is complete; available variables: %DIR% %DIRNAM
E% %SFV% %FIRSTFILE%
# Leave empty to disable
# Example 1: on_release_complete=md %DIR%\Extracted | start D:\ioFTPD\scripts\Hi
deRun.exe D:\ioFTPD\scripts\unrar.exe x -y %

FIRSTFILE% %DIR%\Extracted
# Example 2: on_release_complete=md D:\ioFTPD\site\Extracted\%DIRNAME% | start D
:\ioFTPD\scripts\HideRun.exe

D:\ioFTPD\scripts\unrar.exe x %FIRSTFILE% D:\ioFTPD\site\Extracted\%DIRNAME%
# Note: The command execution will freeze the ftp session of the last file uploa
der until the command execution is done,

unless you use "start HideRun.exe" or something similar...
on_release_complete=


##############
# rotate log #                         //自动更新log文件
##############
#
# frequence=<daily|weekly|monthly>
# weekly rotations are done on sundays; monthly rotations are done the 1st of ea
ch month
# archive_dir is the dir where the old logs will be placed; will be created if d
oesn't exist
# no log will be rotated before they reach min_log_size (MB)

frequence=weekly                         //每周更新一次,可设为每日、周、月等
min_log_size=5                           //文件达到5M时会自动更新,重新开始
archive_dir=D:\ioftpd\logs\archive\      //该目录执行此规则
rotate_log=D:\ioftpd\logs\Error.log      //以下文件自动更新
rotate_log=D:\ioftpd\logs\ioFTPD.log
rotate_log=D:\ioftpd\logs\transfer.log


#############
# dupecheck #                            //上传文件的重复性检查
#############
#
# dupecheck_dirs enables dir duplicate check; doesn't allow dir creation if anot
her
#   folder with same name already exists on site (dir_log is used)
# dupecheck_files enables file duplicate check; doesn't allow file upload if ano
ther
#   file with same name was uploaded previously (transferlog is used)
# excluded_dirs_dupe won't be checked for duplicates
#
# all banned_dir won't be allowed (MKD won't be allowed); use regular expression
s; 1 line per banned dir
//如果site里已经上传了某个release,则再上传此release的目录或文件时,不被允许。不
能建立目录,不能写文件。如果是文件重复,会显
示何时传过该文件

dupecheck_dirs=0                        //是否检查目录,此处为否,建议设为1
dupecheck_files=1                       //是否dupechek文件
excluded_dirs_dupe=/!ioftpd /pre /requests/___speedtests___  //这些目录下的上传
文件不执行上述规则

banned_dir=.*[^\.][Cc]omplete.*          //符合这引起规则的文件目录不能上传
banned_dir=.*[Cc]omplete[^\.].*
banned_dir=.*[0-9\.]+%.*

show_xdupe=1

excluded_dirs_sitedupe=/!ioftpd /pre cd1 cd2 cd3 cd4 cd5 disc1 disc2 disc3 dvd1
dvd2 dvd3 sample samples vobsub vobsubs

subtitle subtitles subs subpack codec covers
//以上这些目录不执行dupecheck规则
min_sitedupe_chars=4             //在site dupe时文件的最少字符。

#############
# slowraces #                     //Race龟速用户约束规则
#############
#
# slow_races: 1 to enable, 0 to disable
#
# will kick users off site (all connections) if upload speed less than
#   'slow_races_min_speed' kBps (kick announced in site chan)
#
# will punish the last user to upload a file in a race if it was uploaded
#   at a speed less than 'slow_races_min_speed' kBps
# the user will loose 'slow_races_punish' MB (announced in site chan)
# slow_races_punish=0 to disable punish on race end
#
# applies only to releases with at least 'slow_races_min_files'
#   not in any dirs in 'excluded_dirs_slowraces'

slow_races=0                                   //是否执行此规则,此处为否
slow_races_min_speed=150                       //若执行,限制的最小上传速度
slow_races_kick_during_race=1                  //若执行,满足上述条件则被踢
slow_races_punish=500                          //若被执行,要罚500M的credit
slow_races_min_files=1
slow_races_exclude_flags=1M                    //有1或M权限的用户不计算在此规则

excluded_dirs_slowraces=/!ioftpd /pre /requests/___speedtests___   //这些目录不
计算在此规则内


###########
# log_nfo #
###########                                   //是否记录nfo文件,用于irc.
#
# Needs to be enabled to allow !getnfo [#] on IRC

log_nfo=1
nfo_log=D:\ioftpd\logs\nfos.log
excluded_dirs_nfolog=/!ioftpd /pre /requests/___speedtests___


############
# transfer #                                //在site之间转移Credit,用于irc

############
#
# To allow credits transfer over sites
#
# syntax: transfer_site=sitename|ip|port|username|password
# You can use an hostname for the IP field.
# Make sure that all those users can login from this IP.
#
# Enable debug (top of this file) if you have problems to see more info when the
 command is executed.

transfer_site=testSite1|test.no-ip.org|9999|sitebot|pwd123


##########
# spider #
##########                                           //用于irc,不知是做什么的…

#
# syntax: spider_site=ip|port|username|password

spider_site=127.0.0.1|9999|sitebot|pwd123
spider_paths=/mp3 /0days[/code]

③按安装手册将调用iobanana的命令加入到相应的ioftpd.ini的区域中。这里就不罗嗦了。
但要注意的是,在5.2.x版本后,要加入EXEC命令(

之前的版本不需要,ioA也是如此)。如写成:
rescan    = EXEC ..\scripts\ioBanana.exe rescan
totals    = EXEC ..\scripts\ioBanana.exe totals

而不能写成
rescan    = ..\scripts\ioBanana.exe rescan
totals    = ..\scripts\ioBanana.exe totals

五、service + SSL 配置

1、iosvervice:
script: ioFTPD-service
作者  : Fireport
论坛  : http://www.ioftpd.com/board/showthread.php?s=&threadid=1529&highlight=io
service
下载  : http://www.hotelwaldidyll.de/fireport/IOService-0.0.2.rar

如果想要ioftpd及Eggdrop(iobanana的irc announce脚本)作为windows的系统服务启动,可
以选用ioservice,最新版本0.0.2。呵呵……

安装很简单:
①将ioservice.exe和ioservice.ini文件放在..\system下,与ioftpd.exe放在一起。其实
也可以放在别的地方。
②配置ioservice.ini文件。
[code]
[SERVICE]                                          //只需改动这一段就可以了
servicename=IOFTPD-Service                         //随便写
servicedescription=Service for IOFTPD and Eggdrop  //随便写
username=                                          //留空则以system为名登陆
password=
installmsg=yes                                     //在安装时是否显示信息,选是
则显示成功信息(不是在ioftpd里显示,而是在执行

命令行时显示)
errmsg=yes

# Programm Configuration
# ======================
# Please setup your paths and parameter!

[PROGRAMMSTART1]
filename=C:\IOFTPD\SYSTEM\ioftpd.exe               //这里如果弄错了就不能运行了
parameter=[/code]

③在windows命令行下写: ioservice.exe /install,运行,则系统服务安装成功
④如何使用:

开始ioftpd服务:net start iosrv                    //将ioftpd作为系统服务启动,
每次重启时自动运行
关闭ioftpd服务:net stop iosrv

⑤若想取消ioftpd的系统服务:

1. 停止服务:net stop iosrv
2. 运行 ioservice.exe /uninstall

⑥如果不想用system登陆,而使用别的具有管理员权限的用户登陆,可以在windows管理工
具/服务下设置,如图:
更改用户名登陆:
[img]http://mouton.abuserz.com/io1.jpg[img][img]http://mouton.abuserz.com/io2.jp
g[img]


2、SSL认证服务设置
ioFTPD支持TLS/SSL3/SSL2/SSL1/SSL加密协议。但据测试,使用加密后,性能会略有下降。

ioftpd使用微软的认证系统。要生成RSA1024位的认证许可,需要执行:

c:\cert\makecert.exe -r -n "CN=<Your Hostname>" -b 01/01/2000
-e 01/01/2010 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr CurrentUser -a md5
-sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider"
-sy 12 c:\cert\ioftpd.cer

但实际上已经有人将此命令批处理了,下载地址:
http://www.ioftpd.com/board/attachment.php?s=&postid=4739

好,还是一步步来:

①运行下载的文件中的install.exe, 会解压至C:\cert目录下,不能放在别的位置;
②运行rsa_keygen.bat,输入你的验证主机名(certificate_name),也就是你的主机地址,
如:61.133.232.23,如果您的IP地址为动态地址,

则可输入你的电脑名。如果没有意外的话,会在c:\cert目录下生成ioftpd.cer安全证书文
件。
③双击ioftpd.cer,安装这个证书,一直下一步就行了。
④双击目录下certmgr.exe文件,你会看到有你的验证名的文件,点中会在“证书的预期目
的”下显示:“服务器验证”如果不是的话,得重新
来过……
⑤点中这里的高级,在证书目的下,只选择“服务器验证”,别的选项都去掉。当然你也可
以多选几个相关的,但有可能在登陆ftp服务器时会

超时出错。
⑥如何在ioftpd上应用安全验证。
 在ioftpd.ini文件中设置:
[code]
 Require_Encrypted_Auth  = !*                                 //表示所有用户不加
密,可写为-USER, =Group, !-User等
 Require_Encrypted_Data  = !*                                 //同上,自己确定限

 CertificateName         = <Certificate Name In Database>     //主机名,如61.133
.232.23,或机器名
 ExplicitEncryption      = <True/False>                       //是否直接加密?
 EncryptionProtocol      = <TLS/SSL3/SSL2/SSL1/SSL>           //加密协议,自己看
着办
 MinimumCipherStrength   = <0-N>                              //最小加密长度,28
, 56, 128
 MaximumCipherStrength   = <0-N>                              //最大加密长度,呵
呵,越长的话,对服务器性能的影响越大。
[/code]

⑦在可以使用加密协议的ftp客户端下,如flashfxp, ultrafxp等,设置用户名以SSL登陆。
登陆过程:
[code][12:39:16] Connected to ********** PORT=21
[12:39:17] 220
[12:39:17] AUTH SSL
[12:39:17] 234 AUTH SSL successful.
[12:39:17] Negotiating SSL/TLS session...
[12:39:18] SSL/TLS negotiation successful...
[12:39:18] SSL/TLS connection using cipher RC4-MD5 (128 bits)
[12:39:18] PBSZ 0
[12:39:18] 200 PBSZ 0 successful.
[12:39:18] USER ****[/code]


六、几个比较有用的script:

1、ioGui

ioGUI是一管理(可远程)ioFTPD服务器的窗口界面。可以获取所有的ioftpd用户信息、执行
命令,可在ioGUI上完成全部的ioFTP的配置工作,也

可进行用户管理、设置;目录权限设置,查看各种统计信息。

下载地址:http://www.ioftpd.com/board/showthread.php?s=&postid=11985#post11985,
另外需要几个vb6的ocx文件
http://home.no.net/addict99/files/ioGui.ocx.rar。
主页    :http://home.no.net/addict99/

配置相信大家都已经会了吧?

2、ioByteKiller

共4种规则确定删除方式:
1、在目录下老于多少天的release将被删除, 这对于有0day, warez目录的site很有用。
2、在某目录下保留多少个目录,如果超过这个数目,则删除最老的文件;比如你的DivX目
录只想固定保留几个目录,用这种方式。
3、在某目录下保留多少字节的文件。如果超过某个范围,则将最老的文件删除,直至规定
的最小空间;
4、移动目录,如果达到一定条件后,则将目录中最老的文件移动,而不是删除;

还可以几种条件联合。满足各种需要的空间控制。

  添加一个组:site grpadd ThePower
        超级管理组名你可以自己取,我这里取名为ThePower.
  添加你自己的帐号:site gadduser ThePower terence 123456 *@localhost
        这个命令的意思就是添加一个用户terence,密码是123456,只能在127.0.0.1的ip上
面登陆,如果你要添加其他ip,则使用site addip

terence *@192.168.204.201,就可以允许你在192.168.204.201的机器上面登陆.
  由于ioftpd不能通过命令行添加就有M标示的用户(就是超级管理员),这里我们必须手
动添加:
  打开c:\ioFTPD\etc\passwd文件,找到里面关于terence用户的描述行,发现: terence:1
06,即terence的用户号为106。到c:\ioftpd\users

目录,打开文件106,在FLAGS一行改为 FLAGS 3M1V,保存推出。到此,你的超级管理员添加
完成。建议你修改

c:\ioFTPD\group,c:\ioFTPD\passwd,c:\ioFTPD\users\里面的文件,删除其他组和用户,
只保留刚才添加的用户和组,建议删除

c:\ioftpd\site下面的目录,但.ioFTPD.message这个文件不要删除。
  Ok,超级管理员的添加已经完成。关闭ioftpd,重新启动(在托盘上面鼠标右键单击圆形图
标,出现菜单shutdown,点击即可关闭).
  在ftp client软件里面输入ftp://terence:123456@localhost:31248/  登陆,
  添加你的其他用户:
    Site grpadd Friends                                //建立一个组Friends
    Site Gadduser Friends alex 123456 *@192.168.0.1    //添加一个用户alex到组Fri
ends,密码为123456,可以登陆的机器为192.168.0.1
    Site change alex ratio 0                            //修改这个用户可以下载任
意多的文件,关于credits、ratio的意思,请查阅相

关资料



2、修改某用户可同时登陆的人数
用户每IP登陆的次数在host.rules里面设置,但用户总登陆人数的设置要用:
SITE CHANGE username LOGINS X FTP //表示该用户可同时登陆X次,若不如此配置,则会
出现:
530 Login failed: Maximum concurrent connections for account reached, try again
later.的错误。

3、单个用户的速度限制
如果想对某个用户进行单独的速度限制,可用命令:
SITE CHANGE %d[User:] SPEEDLIMIT %d[Upload speed limit: (in kbps):] %d[Download
  在ftp client软件里面输入ftp://terence:123456@localhost:31248/  登陆,
  添加你的其他用户:
    Site grpadd Friends                                //建立一个组Friends
    Site Gadduser Friends alex 123456 *@192.168.0.1    //添加一个用户alex到组Fri
ends,密码为123456,可以登陆的机器为192.168.0.1
    Site change alex ratio 0                            //修改这个用户可以下载任
意多的文件,关于credits、ratio的意思,请查阅相

关资料



2、修改某用户可同时登陆的人数
用户每IP登陆的次数在host.rules里面设置,但用户总登陆人数的设置要用:
SITE CHANGE username LOGINS X FTP //表示该用户可同时登陆X次,若不如此配置,则会
出现:
530 Login failed: Maximum concurrent connections for account reached, try again
later.的错误。

3、单个用户的速度限制
如果想对某个用户进行单独的速度限制,可用命令:
SITE CHANGE %d[User:] SPEEDLIMIT %d[Upload speed limit: (in kbps):] %d[Download
speed limit: (in kbps):]
也可以在..\users目录下,找到此用户的ID,编辑此文件,找到这一行:
limits 0 0 1 2 5 //前2个数字即为上传、下载速度限制。0表示按iofptd.ini里的全局设
定规则。 可自己改为需要的数字来限制该用户的速
度。

4、设置用户及组的Credit
如果您设有用户的ratio,则用户下载时需要Credit。除非你将用户的ratio设置为0(leech
)。

用户credit设置:可设置每周、总计的credit等,如想给500M的下载量:
SITE CHANGE %d[User:] CREDITS +512000 //共500M
SITE WEEKLY %d[User:] %d[Section #:],500 //每周500M
如果想对全组用户都统一标准,则写成:
SITE CHANGE =Groupname CREDITS +512000 //该组所有用户都给500M

好了,本配置指南就到此打住。如果有什么问题,请去该论坛查看,基本问题及常出现的错
误解答,先查看http://www.ioftpd.com/kb/。

--
//\/\/\/\/\/\/\/\\
|电影比爱情更真实|
|回忆比梦想更虚幻|
\\/\/\/\/\/\/\/\//

※ 来源:.BTBBS btbbs.org.[FROM: xzluo158.nju.edu.cn]
※ 修改:.sCry 于 Nov 26 11:32:56 修改本文.[FROM: xzluo158.nju.edu.cn]

--
天不言自高,地不言自厚,人不言自能,水不言自流。
知之为知之,不知为不知,是知也。
不患人之不己知,患不知人也。求为可知也。

※ 来源:·荔园晨风BBS站 bbs.szu.edu.cn·[FROM: 192.168.83.101]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店