四、配置不同功能的script
ioFTPD就像是大廚手中的食物原料,必須加上姜、桂皮、辣椒等各種輔料才能炮製出完美的菜餚來。script(指令碼程序)就是這些佳餚的輔料,可以實現你想要的種不同的功能。
script有兩大類:zipscipt和Sitebot / IRC ,前者用於文件檢查、統計等,後者主要用於irc annouces. 我沒有研究過ircbot,只能介紹一下zipscipt. ioFTPD網站推薦的配置方案A為:ioFTPD + ioBanana + ioA; 方案B為:ioFTPD+ioZS 或 projectZS 或 SioFTPD + dZSbot + ioA
(一) script簡介
1、ioBanana 作者Mouton, 現作者為Harm.
網址:
http://ioBanana.abuserz.com,可免費下載有限制的版本。
ioBanana是一個All-in-One的ioFTPD script, 包括各種Site指令,!irc_commands, zipscript 及 trial/quota 功能。
程式碼:--------------------------------------------------------------------------------SITE 指令有: rules, ginfo, gstats, pretime, new, cid, resetstats, roulette, dice, open, close, approve, listapproved, version, rotatelog, rescan, totals, age, undupe, nfo, uptime,還包括一些修改ioFTPD和ioA原始指令的site指令如: nuke, unnuke, pre, wipe, user (uinfo mod.)
IRC 指令: !speed, !who, !bw, !uploaders, !leechers, !idlers, !statsup, !statsdn, !bnc, !approve, !listapproved, !undupe, !rules, !sections, !search, !requests, !trials, !passed, !quota, !quotas, !sitenew, !pretime, !gstats, !free, !affils, !uptime, !silent, !restart
Zipscript: ZIP (file_id.diz) 和 SFV 檢查支持, 可產生.bad & .missing, Race時IRC announces (new racer, 1st file received, halfway, complete, etc.), 自訂文件輸出及目錄標籤(dirtag), 自動進行續傳文件的crc32檢查, 強制nfo/sfv或sample目錄先上傳, 慢速racer 踢站/懲罰, 不完整文件及race符號連結.
其他特徵: 每日統計,每日記錄更新, 文件或目錄的重傳檢查(Dupechecker) , 上傳時nfo文件中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配置
1將包解開放在/scripts/ioa目錄下。
2首先配置ioa.cfg文件,用notepad開啟. 主要是設定一些文件路徑、虛擬文件目錄這些東西。
程式碼:--------------------------------------------------------------------------------#
# 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 space 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 specific 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>|<sectionnumber>|<symlink>"
#
# <pretype> Name of the area
# <description> Some funky text that describes
# <destination> Physical path where pre will be placed. NOOOO "/", it should be "\" as
every other path in windows
# <vfs path> Virtual path of above directory
# <sectionnumber> When giving credits on pre correct section should get the creds
# <symlink> Physical path where the symlink should be. Only works for dated.
# 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裡schedule裡設定)自動在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 for
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 text 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--------------------------------------------------------------------------------
3按安裝手冊,將以下部分增加到ioftpd.ini相應的部分中,以便讓iofptd使用ioA.
程式碼:--------------------------------------------------------------------------------
以下部分加入到[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--------------------------------------------------------------------------------
2、ioB(anana)的配置(以ioB1.8d為例)
1將包解開放在/scripts/目錄下
2用notepad開啟iobanana.ini,進行編輯
程式碼:--------------------------------------------------------------------------------
###########
# 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 adjustments
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,別弄錯了……
#########
# alert # //登入多少用戶後,開始記錄警告
#########
#
# max users before warning is logged
max_users=30
#########
## ban ## //Ban IP位址,也可以在..\etc\host.rules裡面設定。
#########
#
# 1 rule per line
# you can put as many line as you want
# if ANY line is matched, the command won't be executed
#
# Syntax:
# ^ 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 *.*.127.* 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]-parent_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 vobsub vobsubs
subtitle subtitles subs subpack codec covers //release下的這種形式的子目錄不被連結為lastest
showparent=1 //是否將上一級目錄記錄入目錄中,寫成[Latest]-parent_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 have 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 someone
creates a dir
# - fill_pretime_on_mkd will save in the db the rls name and timestamp when someone 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 timestamp
format) fields
#
# be sure to set the correct timezone of your database so that the returned times 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 after 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 pretimes 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 that will be
truncated with ...
# strip_dirs is NOT case-sensitive
# any subdirs of excluded_dirs_sitenew won't show in site new
ioftpd_log=D:\ioftpd\logs\ioFTPD.log //這是ioftpd的log文件,應該
在..\logs\ioftpd.log下面
release_width=40 //這是顯示的寬度,寫成65左右吧
strip_dirs=cd1 cd2 cd3 cd4 cd5 disc1 disc2 disc3 dvd1 dvd2 dvd3 sample samples vobsub
vobsubs subtitle subtitles subs subpack codec covers //這裡是說,子目錄的東西不
顯示在site new裡,但現在這裡好像有些問題……我配置的還是要顯示出來,比較煩!
excluded_dirs_sitenew=/!ioftpd /pre /requests/___speedtests___ //這些目錄下上傳的東西不在site new裡顯示出來。比如你不想讓人看見的私有目錄的內容
###########
# limiter # //同時上傳、下載最大資料限制。-1為無限制
###########
#
# defines max concurrent downloads and uploads users can do; use -1 for unlimited
# u can exclude groups, users and flags; use white-space as delimiter for multiple 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 //最大同時下載的用戶,看你的site容量了……
ul_max=3 //最大同時上傳的用戶,看你的site容量了……
##########
# 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 races
# 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/ //這些上傳目錄下的上傳內容將race symlink,當然是換成你的虛擬文件系統了……
#############
# zipscript # //這個就是進行上傳文件檢查的……
#############
#
# parent_stats displays global stats for multiple CDs races in the parent dir (if 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 USTATS-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 files on your
site!
cleanse_0bytes_files=0 //是否要將site裡的0字元全部自動刪除?0為否
# for mp3 sorting, leave empty to disable //這是mp3文件在上傳時按Genre, 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 //這是movie文件在上傳
時按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 dirs
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 files
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 folder
(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 vobsubs
subtitle subtitles subs subpack codec //這些子目錄下的文件未完成的話,會在上一級目錄下,而不是在release目錄下新增未完成上傳的連結。
# Force a nfo or a sfv to be sent before anything else in specific dirs; nfo in parent dir
is ok
force_nfo_first=1 //強迫nfo文件最先上傳,否則上傳失敗,建議設為0
force_sfv_first=1 //強迫sfv文件最先上傳,否則上傳失敗,建議設為0
force_dirs=/apps/ /svcd/ /games/ /mp3/ /divx/ //這些目錄下的上傳執行以上規則
# Files uploaded in any dir specified in excluded_dirs_force won't be checked (not case-sensitive)
excluded_dirs_force=covers //這些目錄下的上傳文件不執行以上規則
# force_sample_first = 1 means you won't be able to create any dir listed in
force_sample_check if there is no sample subdir
# Be sure you only enable that in your movies dirs!
force_sample_first=1 //上傳電影時,強迫sample目錄最先上傳
force_sample_check=cd1 cd2 cd3 cd4 cd5 disc1 disc2 disc3 dvd1 dvd2 dvd3 vobsub vobsubs
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 deleted on upload
autodelete=/requests/___speedtests___/dropbox //這些目錄下所有上傳的文件在完成後自動刪除
# Excluded dirs (includes subdirs): those dirs won't be processed by the zipscript (sfv,
zip, mp3, etc.)
excluded_dirs_zs=/!ioftpd /pre /requests/___speedtests___ //這些目錄下上傳的文件不執行sfv, zip, mp3等的檢查。
# Execute a command when release is complete; available variables: %DIR% %DIRNAME% %SFV% %
FIRSTFILE%
# Leave empty to disable
# Example 1: on_release_complete=md %DIR%\Extracted | start D:\ioFTPD\scripts\HideRun.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 uploader 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 each month
# archive_dir is the dir where the old logs will be placed; will be created if doesn'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 another
# folder with same name already exists on site (dir_log is used)
# dupecheck_files enables file duplicate check; doesn't allow file upload if another
# 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 expressions; 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--------------------------------------------------------------------------------
3按安裝手冊將使用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/showthre...ight=ioservice
下載 :
http://www.hotelwaldidyll.de/firepor...vice-0.0.2.rar
如果想要ioftpd及Eggdrop(iobanana的irc announce指令碼)作為windows的系統服務啟動,可以選用ioservice,最新版本0.0.2。呵呵……
安裝很簡單:
1將ioservice.exe和ioservice.ini文件放在..\system下,與ioftpd.exe放在一起。其實也可以放在別的地方。
2配置ioservice.ini文件。
程式碼:--------------------------------------------------------------------------------
[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=--------------------------------------------------------------------------------
3在windows指令行下寫: ioservice.exe /install,執行,則系統服務安裝成功
4如何使用:
開始ioftpd服務:net start iosrv //將ioftpd作為系統服務啟動,每次重啟時自動執行
關閉ioftpd服務:net stop iosrv
5若想取消ioftpd的系統服務:
1. 停止服務:net stop iosrv
2. 執行 ioservice.exe /uninstall
6如果不想用system登入,而使用別的具有管理員權限的用戶登入,可以在windows系統管理工具/服務下設定,如圖:
更改用戶名登入:
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/attachme...s=&postid=4739
[好,還是一步步來:
1執行下載的文件中的install.exe, 會解壓至C:\cert目錄下,不能放在別的位置;
2執行rsa_keygen.bat,輸入你的驗證主機名(certificate_name),也就是你的主機位址,如:61.133.232.23,如果您的IP位址為動態位址,則可輸入你的電腦名。如果沒有意外的話,會在c:\cert目錄下產生ioftpd.cer安全證書文件。
3雙按ioftpd.cer,安裝這個證書,一直下一步就行了。
4雙按目錄下certmgr.exe文件,你會看到有你的驗證名的文件,點中會在「證書的預期目的」下顯示:「伺服器驗證」如果不是的話,得重新來過……
5點中這裡的進階,在證書目的下,只選項「伺服器驗證」,別的選項都去掉。當然你也可以多選幾個相關的,但有可能在登入ftp伺服器時會超時出錯。
6如何在ioftpd上套用安全驗證。
在ioftpd.ini文件中設定:
程式碼:--------------------------------------------------------------------------------
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> //最大加密長度,呵呵,越長的話,對伺服器效能的影響越大。
--------------------------------------------------------------------------------
7在可以使用加密傳輸協定的ftp客戶端下,如flashfxp, ultrafxp等,設定用戶名以SSL登入。登入程序:
程式碼:--------------------------------------------------------------------------------[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 ****--------------------------------------------------------------------------------
##############################################
六、幾個比較有用的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目錄只想類BIOS保留幾個目錄,用這種方式。
3、在某目錄下保留多少字元的文件。如果超過某個範圍,則將最老的文件刪除,直至規定的最小空間;
4、移動目錄,如果達到一定條件後,則將目錄中最老的文件移動,而不是刪除;
還可以幾種條件聯合。滿足各種需要的空間控制。
可完成上述功能的script還有WarChive, 網址 [url]http://warc.mine.nu,作者久/url]]是ioA的作者WarC.
另外,其他可用的script下載:http://membres.lycos.fr/ioftpd/。如果自己需要什麼特殊的功能,請先去論壇
http://www.ioftpd.com/board/,說不定就有自己想要的。