This page describes in detail how to externally manage the FTP server settings using other scripts and applications.
Ability FTP Server is designed for external control of all available settings. This is possible through the use of INI files which are simple text files editable by any script, application or text editor. The FTP server periodically checks for any changes and then automatically loads in the new settings. The frequency of this checking is controlled by the Admin settings.
Each INI file follows the same structure and is made from a list of value pairs (e.g. attribute=value) of which there are 3 types; strings, numbers and booleans (where 0 is false and 1 is true).
Example 1: A section of the ftp.ini:
allowexecparams=1Some INI files also help organise information into sets, which are composed of an opening brace ('{') symbol and a name, the value pairs and a closing brace ('}') symbol.
allowpasschange=0
allowsitetosite=0
antihammering=0
blocktimeoutstopping=0
deletetorecyclebin=1
idletimeout=300
maxdownloadspeedperuser=307200
maxuploadspeedperuser=512000
maxusers=100
maxusersperip=0
pasvip=192.168.1.200
pasvrangelower=11300
pasvrangeupper=11305
Example 2: A section of the client.ini:
windowheight=570
windowleft=240
windowstate=0
windowtop=212
windowwidth=800
{ activitytimespan
customtype=22
enddatetime=20100107120000000
number=1
startdatetime=20100107090000000
type=16
}
{ logstimespan
customtype=22
enddatetime=20100107115131929
number=1
startdatetime=20100107114410533
type=1
}
Some INI files which contain undefined amounts of data can use unnamed value pairs or parameters. It is also quite common for sets to be nested within other sets.
Example 3: A section of the users.ini
usemaxaccountsize=1
usemaxdownloadspeed=0
usemaxuploadspeed=0
usemaxusers=0
user=test
userootpath=1
usestartdir=0
{ ips
-=+ip=192.168.2.9
-=+ip=192.168.2.17
-=+ip=192.168.2.91
-=-ipmask=0.0.0.0/0.0.0.0
}
{ vfolders
{ -
counts=1
creditsignored=0
maxsize=0
name=/stuff1
path=e:\testing\test ftp\stuff\
rights=18
usemaxsize=0
visible=1
}
{ -
counts=1
creditsignored=0
maxsize=0
name=/stuff2
path=e:\testing\test ftp\stuff2\
rights=18
usemaxsize=0
visible=1
}
}
Any spaces at the beginning of a line are always ignored. To help structure a complex file, every set adds a space before its contained data (as in Example 3).
If you do not wish to parse the INI file but simply change a field, this can be done by simply appending a new value pair onto the end of the file. When Ability FTP Server finds more than 1 value pair with the same name, the last one in the file will always be used. To add a new user or group, you can simply append a new set onto the end of the appropriate file.
See Also: Admin.