2.2 Interface

Let's start with the interface which is not very hard to understand.





Toolbar buttons

- Switch on/off your FTP Server
- Wordwrap for screen log
- Clear screen log
- Close the FTP : no more connection are accepted
- Enable logging to file
- Enable logging to screen
- Exit from the FTP (also shutdown the FTP)
- Server Statistics for user/transfer/connection
- Information on connected user(s), transfer rate/idle time/upload/download
- FTP Server console becomes always on top if enabled
- Display/hide users connected list on console's right border
- Display/hide users banned/forbidden on the server on console's right border
- Setup FTP Server
- Events messages/audio
- Setup log : what to log on screen/file
- User accounts management
- Group management
- Free files: files free to download, do not count in ratio/credit. Accept wildcards.
- Multi homed IP management (mainly for windows NT)
- Display about box

Menu/Popupmenu buttons

- Refresh
- Display lines in grid
- Spy user, show informations on user
- Pause list
- Kick the selected user, disconnect him
- Copy to clipboard

As you have notice, you can almost only use the toolbar to use and setup G6 FTP Server.

On screen log

This is the big area on the screenshot, where everything happening on the server can be monitored :
- Client commands : green
- Server answer : blue
- Server Comments : black
You can configure what is logged on the server console screen/file in Logging

User connected list & ip refused on the server

The two colums on the right let you see who is connected to your server and who is "banned / not welcomed" on your server or who is only allow to log in.
Both are hideable using and buttons.
We will go further on the other options later.

Main Menu

Here you can find most of the toolbar buttons.

Tray Icon

When you start server, a tasktray icon appears near the system clock. It allows you to :
- Start/stop the server
- Show/hide the windows (reduce to tray icon)
- Exit (shutting down) the server

I think this is enough for a short review.
Let's see the server setup

Main Setup




Well first you need to setup the ftp port (21 in general), maximum number of users simultaneously (0 for unlimited).
Other settings :

General


- Server Name (registered user only) : allows you to specify the name of your server when user logins

- Allow multiple instance : you can start server many times if checked but be sure to take care of configurations files.
- Put Into Tray On Startup : start minimized, no window is shown.
- Activate Ftp server on Startup : launch the ftp as soon as it is loaded.
- Launch with windows : when you run Windows 95/98, allows you to start the server even if no user is connected, (NT needs system services configuration not yet done).

Options


- Protect FTP Server Directory : when checked, server won't show or give access to anything relative to your ftp directory.
- Delete partially uploaded files : in case you do not want user to be able to resume upload, or you do not want partialy uploaded archive on your server then file will be deleted if ABORT (client do not always abort transfer by ABOR command so this feature is not 100% successfull), Upload failed ...
- Use all lower case for files/Dir : any files list generated by server is composed of lowercase. This is useful for Netscape users as Netscape sorts file with case sensitivity (A > B > .. > a > b > ..).
- Disable log to screen when minimized : if you minimize your application, server will stop logging to screen (less CPU usage).
- Show relative Path : same as for user except that in that case, all user will have relative path.
- Show received messages : user can send you message using "SITE MSG ", when it is checked message list appears flashing to show you received messages.
- Refuse connections with same IP : user can only log once per IP Adress, preventing "hammering" of your server.
- Block Banned IP (instead of notifying client) : this has for effect to not notify client that his ip is banned, client blocks when connectiong.
- Resolve IP to Hostname (slow, use for banned mask only) : this option (if checked) resolves IP to hostname, for example 195.136.125.123 could be resolved to xxx.club-internet.fr.
You should consider to enable it only if you ban hostname because as it is a slow fonction it can cause a severe cpu load on your computer, moreover some IP do not have hostname associated, so the server will timeout after a certain time if it does not find a hostname.

Advanced


- Receive buffer : you can specify amount of data sent at the same time. Default is 4096.
- Server Allows ... : if you do not want user to upload or download (strange isn't it ;)) then select the good mode.
- Server Priority ... : allow you to select server priority. (Real Time is not recommended).

- Anti Hammering : well this feature is for preventing people/client from hammering the server, this means that people who keeps trying to log on the server without success will be blocked next connection for a specified amount of time. In our example if people connects more than 10 times in 45 seconds then he will not be able to connect for 5 minutes because his IP is blocked (server does not answer), after that time he will be able to retry to connect.

Directory Cache


This feature (if enabled) makes the server keep the directory list in memory for the specified amount of time. This prevents disk access for listing directories but needs memory.
With the list you can see how the server caches directories list and the hit achieved to the cache.

Default settings : 20 directories, 5 minutes.

Stat Generator


Have you ever wanted to keep a Top list on your server without having to process the log file by hands ?
Well this feature is for you : it scans the file "transfer.log" written after all client disconnection and produces a "result.top" file (which is a ini file) containing the "top uploaders/downloaders" on your site.

For advanced users, here is the "Log_Transfer.log" structure :
21/04/99 11:55:26#Anonymous#00:02:50#41964#8993#50957#3#2#297,994#3#2
Date Connection # User Account Name#Time connected#Bytes Downloaded#Bytes Uploaded#(Bytes Uploaded + Bytes Downloaded)#Files Downloaded#Files Uploaded#(Bytes Uploaded + Bytes Downloaded) / Time Online = Session Speed#Time spent downloading in seconds#Time spent uploading in seconds
(for more info contact us)

Processed "Result.top" has this structure :
[General]
Last Updated=20/04/99 16:47:07
Day Bytes Uploaded=6352591
Day Bytes Downloaded=5665139
Week Bytes Uploaded=6352591
Week Bytes Downloaded=5665139
Month Bytes Uploaded=6352591
Month Bytes Downloaded=5665139
All Time Bytes Uploaded=6352591
All Time Bytes Downloaded=5665139

[This Day-Uploader-N░1]
NAME=Anon
BUP=5570779
BDOWN=4883327
DLKBPS=529,875
ULKBPS=320,013

[This Week-Uploader-N░1]
...
[This Month-Uploader-N░1]
...
[All Time-Uploader-N░1]
...

[This Day-Downloader-N░1]
NAME=Anon
BUP=5570779
BDOWN=4883327
DLKBPS=529,875
ULKBPS=320,013

[This Week-Downloader-N░1]
...
[This Month-Downloader-N░1]
...
[All Time-Downloader-N░1]
...
After that, the server will process files named : "TOP-DAY.MDL","TOP-WEEK.MDL","TOP-MONTH.MDL","TOP-ALL.MDL" (these files must be placed in server directory), processed files will be named "TOP-DAY.TOP, ..."

In these files you have to specify tags to replace by Name, Bytes uploaded ...

Tags Available :
//General
%DATE : Current Date
%TIME : Current Time
YYYY = DAY/WEEK/MONTH/ALL %YYYYTOTALBUL : total bytes uploaded during YYYY %YYYYTOTALKBUL : total Kbytes uploaded during YYYY %YYYYTOTALMBUL : total Mbytes uploaded during YYYY %YYYYTOTALBDL : total bytes downloaded during YYYY %YYYYTOTALKBDL : total Kbytes downloaded during YYYY %YYYYTOTALMBDL : total Mbytes downloaded during YYYY // Top Upload %TOPULNAMEXX : user account name ranked XX in upload (1 for first, 2 for second ... 25 for last) %TOPULMBULXX : MB uploaded by user ranked XX in upload %TOPULMBDLXX : MB downloaded by user ranked XX in upload %TOPULKBPSULXX : average upload transfer rate in KB/s achieved by user ranked XX in upload %TOPULKBPSDLXX : average download transfer rate in KB/s achieved by user ranked XX in upload // Top Download %TOPDLNAMEXX : user account name ranked XX in download (1 for first, 2 for second ... 25 for last) %TOPDLMBULXX : MB uploaded by user ranked XX in download %TOPDLMBDLXX : MB downloaded by user ranked XX in download %TOPDLKBPSULXX : average upload transfer rate in KB/s achieved by user ranked XX in download %TOPDLKBPSDLXX : average download transfer rate in KB/s achieved by user ranked XX in download
So a "TOP-DAY.MDL" file could be :
Date: |%DATE|              Daytop Stats!  
Time: |%TIME|

----<:TOP 5 UPLOADERS:>-----------------------------------------
1. |%TOPULNAME1|  |  |%TOPULMBUL1| MB  |  |%TOPULKBPSUL1| KB/s
2. |%TOPULNAME2|  |  |%TOPULMBUL2| MB  |  |%TOPULKBPSUL2| KB/s
3. |%TOPULNAME3|  |  |%TOPULMBUL3| MB  |  |%TOPULKBPSUL3| KB/s
4. |%TOPULNAME4|  |  |%TOPULMBUL4| MB  |  |%TOPULKBPSUL4| KB/s
5. |%TOPULNAME5|  |  |%TOPULMBUL5| MB  |  |%TOPULKBPSUL5| KB/s

----<:TOP 5 DOWNLOADERS:>---------------------------------
1. |%TOPDLNAME1|  |  |%TOPDLMBDL1| MB  |  |%TOPDLKBPSDL1| KB/s
2. |%TOPDLNAME2|  |  |%TOPDLMBDL2| MB  |  |%TOPDLKBPSDL2| KB/s
3. |%TOPDLNAME3|  |  |%TOPDLMBDL3| MB  |  |%TOPDLKBPSDL3| KB/s
4. |%TOPDLNAME4|  |  |%TOPDLMBDL4| MB  |  |%TOPDLKBPSDL4| KB/s
5. |%TOPDLNAME5|  |  |%TOPDLMBDL5| MB  |  |%TOPDLKBPSDL5| KB/s

Total Mbytes Uploaded this day   : %DAYTOTALMBUL Mbytes
Total Mbytes Downloaded this day : %DAYTOTALMBDL Mbytes
With "Log_Transfer.log" you can even write your own stat analyzer.
With "Result.top" you can know who is ranked XX with no difficulties too.

Another Useful log is "Log_Xferfiles.log" which keeps a log of all files transfered by all user (if they have logged successfully).

Structure is :
[<User Account Name> - Time of connection - Time of disconnection]
ULXX=<file XX uploaded># <Transfer Stat = "(00:00:00 - 0,000 KBps)">
DLXX=<file XX downloaded># <Transfer Stat = "(00:00:00 - 0,000 KBps)">
File transfered are written to log with file path (c:\server\uploaded\file.exe)

So that you could easily find who uploaded what


Stat Interface

If you want your stat to be refreshed at a given time, then just select the interval between two refreshes.
Another setting is the account included in stat. By default all account are checked but if you want to not "monitor" some account (Anonymous) then you uncheck and stat on those account won't be computed.


Events Manager



Well this feature can reveal more useful than it seems.
Most simple use is to set sounds to user action but execute action go further ...
Command Events

- OnDirCreated : Message, Sound, Execute
- OnFileDeleted : Sound, Execute
- OnFileDownloaded : Sound, Execute
- OnFileRenamed : Sound, Execute
- OnFileUploaded : Sound, Execute
- OnSameIPConnect : Message, Sound, Execute
- OnServerClosed : Message, Sound, Execute
- OnServerStarted : Sound, Execute
- OnServerStopped : Sound, Execute
- OnTooManyUsers : Message, Sound, Execute
- OnUserIsBanned : Message, Sound, Execute
- OnUserQuit : Message, Sound, Execute
- OnWelcomeUser : Message, Sound, Execute
(more are coming)

Some have default properties set : OnSameIPConnect, OnServerClosed, OnTooManyUsers, OnUserIsBanned, OnUserQuit, OnWelcomeUser. They are overridden if you specify Reply Message.

For execute you can specify how to launch the application : hidden (no interface), normal, maximized, minimized.

Known Tags

%FILE : complete path to file (including filename)
%FILENAME : only filename (archives.zip, archives.rar ...) %FILEEXT : Extension of the file in uppercase (.EXE, .RAR ...)
%FILEPATH : path without filenale (c:\temp\ ...)
%FILESIZE : File Size in bytes
%CLIENTNAME : User Account
%CLIENTIP : User IP

Example :
- OnFileUploaded :
Then sometimes you want to add files to uploaded archives (site info, add for your site ...) then depending on the file type, zip, rar, or else you could set a bat file like :
IF "%1"=".RAR" GOTO RARFILE
IF "%1"=".ZIP" GOTO ZIPFILE
GOTO QUIT
:RARFILE
c:\rar\rar.exe a %2 c:\myad\ad.txt
GOTO QUIT
:ZIPFILE
c:\zip\pkzip.exe -a %2 c:\myad\ad.txt
GOTO QUIT

:QUIT
(Note : humm seems i am not certain of my script ;) but the idea is here )
In ExecutePath just enter :

c:\myad\mybat.bat %FILEEXT %FILE