Manual v1.11
http://gene6.idegrif.com/
gene6-contact@idegrif.com


Disclaimer of Warranty

THIS SOFTWARE AND THE ACCOMPANYING FILES ARE SOLD "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OR MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED.

YOU USE THIS SOFTWARE AT YOUR OWN RISK. THE AUTHOR WON'T BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR MISSING THIS SOFTWARE.

AUTHOR COULD NOT BE HELD RESPONSIBLE OF MISUSE OF THIS SOFTWARE TO DISTRIBUTE ILLEGAL OR COPYRIGHTED FILES.


1.1 Installation

Now you just have obtained a copy of G6 FTP Server, you can install it using our installer : just follow the instructions and everything should be ok.

After installation, the G6 FTP Server directory will contain these files :

G6FTPSRV.EXE	- The FTP-server executable
LICENSE.TXT	- The License file
VERSION.TXT	- The fixed bugs, enhancements, new features added to G6 FTP Server
MANUAL.CHM	- Help Manual of the FTP Server (this file)


1.2 Uninstallation

To uninstall G6 FTP Server, remove it via the 'Add/Remove Programs' item of the Control Panel or use the shortcut in your start menu.
After uninstallation, delete the configurations files (Accounts.ini, Groups.ini and Ftpsrv.ini).

The only remaining exe is the "_g6uninst.exe" (~20Ko) in your windows directory, you can delete it after uninstallation.
That's all.


2.1 Brieve description

G6 FTP Server was first created for our needs, we believe that if you want a particular program that feets your demands, the only way to do is to create your own program. But we know that not everybody can spend time programming, learning programming language. So, we decided to share our programs with others.
We created our FTP Server and found it interesting to use and reliable : we decided to provide it to you.
We know that the early versions was a sort of rough copy, but we consider that the "real first" version begins with the 1.50.
We wait for your feedbacks and bug reports !

Thank you.

Compatibility

G6 FTP Server has been tested and reveals compatible with :

- AbsoluteFTP
- BulletProofFTP 1.11
- Crystal FTP
- CuteFTP v2.8
- LeapFTP v2.60
- FTP.EXE
- FTP Voyager 6.1.1.0
- Internet Explorer 4.0
- Internet Explorer 5.0
- Netscape Navigator 4.5
- WS_FTP PRO 6.01T

If you find other compatible FTP Clients then let us know, we will add them to the list.


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 [image] and [image] 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


 3.0 Tutorial

In this little tutorial, i will show you how to setup a ftp server in about 1 minute.

I assume that you have read the user setup manual parts.

1) First we need to open user account windows and create new account, we will call it "Anonymous", no login/pass defined to let everybody connect without restriction.
We give new user account access to our ftp root located in c:\ftproot which is empty for the moment, and as we think about sharing a cdrom drive, we share "d:\" to later define a shortcut to this drive,

2) We define what the user will be able to see (relative path ? Hidden files ? ...)

3) Now we want user to be able to go on our cdrom drive "d:\" so we just create a window shortcut '.lnk) in "c:\ftproot\", and we check "Links/Dir to add to directories" , "Treat as virtual directories" & "Resolve windows shortcuts",

4) Start your favorite FTP Client and login on your server with any login/pass, you should see the following :

(note "d" for directory)

or if you check "treat as links" & unchecked "Relative Path" :

(note "l" for link)

5) Clicking on "CD-ROM" will bring you to :

or if you check "treat as links" & unchecked "Relative Path" :

That's all for this first tutorial, I hope i have resolved some problems.


 3.1 How to Setup your server

After installing G6 FTP Server, you may want to launch the Server (Start menu).
So you see the loading bar and then the main Interface.
At this state your server is useless, because you must first setup user accounts, file access, ...

Setup user accounts

Click on the toolbar [image] button to bring this form :

1 - Create a new user : right-click on the left list and select "Add" in the popupmenu
2 - Enter the new user account (note : this is not always the user login) and click "OK"
3 - If you want your user to use a login ("demo" in the example) then check the case "login". (if you do not check "login" case the user can login with any login. This can be useful for anonymous)
4 - Setup a password : check the password case or let this user enter with any password, even blank (again a sort of free account).
As I know that it is not very easy to understand, let's see the different combination :

Case 1 :
+Login checked and specified
+Password checked and specified
->User log with Login and Pass

Case 2 :
-Login not checked
-Password not checked
->Any user can have access to this FTP account, providing any username, password even blank

Case 3 :
+Login checked
-Password not checked
->User must specify the correct login but can provide any password even blank

Case 4 :
-Login checked
+Password checked
->Any login can be specified, only the password is meaningfull -> if a user with this password exists then the user will be logged as this user
->In fact this acts as if the password was the login for those loginless user

In case there is a free account and user try to log with bad password or bad username, they will automatically be logged in the free/anonymous account (one with no login&password enabled).

So I'm sure you will find the good combination that feets your needs
In our example, the user must supply : Login=demo and Password=forthemanual
If you want to setup an anonymous user then just create an account (named anonymous) with no login and no password (both unchecked)
(Note: Login and Password are case sensitive : "DeMo" and "demo" are not the same login.)

Directory Access

Now that user can login, you must provide access to your shared files.
- Right Click on the Directory List and select add in the popup menu
- Choose the right directory and choose access mode :
Files :
R : Read Access enabled : User can Download from the specified directory
W : Write Access enabled : User can Upload in the specified directory
D : Delete Access enabled : User can Delete Files in the specified directory
Directory :
M : Make Directory enabled : User can create directory in the specified directory
L : List Directory enabled : User can list the file in the specified directory
K : Delete Directory enabled : User can delete directory in the specified directory
S : Subdir enabled : User can go in Subdirectories of the specified directory
Note :
1) If you try to share the server directory, meaning allowing user to have access to your inifiles then the server will ask you to confirm the specified directory
2) If you specify an incorrect directory (not existing) then the directory will be strike through
3) Home directory is the first directory in the list, font is red for him
4) You can change directory by just renaming the existing if you just click on a directory
5) Directory orders is not important as G6 Server will always know what is the most near parent of the directory in the list :
If a user has access to :
- c:\temp\upload - RWDMLSK
- c:\temp\upload\read - R---L--

and c:\temp\upload has following structure :
c:\temp\upload\my favourite picture\
c:\temp\upload\amiga 500\
c:\temp\upload\read\
Then user will only be able to go in "c:\temp\read" with RL access, other directory will be accessible with RWDMLSK, no need to specify an order for the directory.
6) Try to play a little with directory and you will make marvellous FTP Server !

Misc properties

Need more advanced properties for your account ?

For a better configuration we provide you with some extra options :
- Hide hidden files/dirs : file whose attribute is Hidden won't be visible in the list
- Enable Account : should always be enabled unless you don't want this user to log in your server temporarly without deleting his accounts
- Allow Noop Command : Noop happens when user does nothing on the server but can stay connected if he sends a NOOP command, otherwise he will be disconnected for Time Out
- Enable Time Out : users who don't do anything for this period will be disconnected
- Max Users : allows only N same account user to log on the server, default is unchecked => no restrictions
- Show Relative Path : User see the Home dir as root of the file system. If "c:\userroot\" is the default home dir then user will see '\' as root.
- User can change his password : SITE PSWD
- User can chat with other users : using SITE CHAT
- User can see who is connected : SITE WHO
=> returns User Name - Date of connection - IP/HostName - Speed

Message Files

There are 3 types of message files:
- Login File Message : Sent after the welcome message sent by the event manager
- ChangeDir File Message : Sent each time a user changes current directory
- Links File : processed while sending directory list

Note : ChangeDir file can only be a filename, in that case server will check if the file exists in the current directory and process it. You can have differents ChangeDir File Message for all your directory.
(Example : "Ch_Dir.Text" with hidden attributes in all user directories)

The first two message files support many tags :
%MAXUSERS = The maximum number of users which can be connected on the server at the same time
%LOCALIP = The IP Adress of the server
%UIP = The IP Adress of the client
%CNOW = Number of User actually connected
%CALL = Total Number of Users connection on the server since started
%C24H = Number of connections last 24h
%UTIMEOUT = Current User TimeOut
%URATIOCREDIT = Current User Ratio Credit (If Ratio is enabled)
%UHOME = Current User Home Dir (If showrelativepath is disabled)
%UCURRENTDIR = Current User Dir
%URATIO = Current Ratio Upload/Ratio Download
%URATIOUP = Current Ratio Upload
%URATIODOWN = Current Ratio Download

%SERVERSECS  = \
%SERVERMINS  = Server Online Time
%SERVERHOURS = /
%SERVERDAYS  =/

 -= All Session =-

%SERVERKBUP = Kb uploaded on the server overall sessions
%SERVERKBDOWN = Kb downloaded from the server overall sessions
%SERVERKBALL = Kb Transfered on the server = %SERVERKBUP + %SERVERKBDOWN

 -= Server Session =-

%SESSIONKBUP = Kb uploaded on the server by clients
%SESSIONKBDOWN = Kb downloaded from the server by clients
%SESSIONKBALL = Kb Transfered on the server = %SESSIONKBUP + %SESSIONKBDOWN

%SESSIONKBTOTAL = Kb Transfered by server including upload, download, directory list, answer to commands ...

%SESSIONFILESUP = Number of Files uploaded to the server
%SESSIONFILESDOWN = Number of Files downloaded from the server
%SESSIONFILESALL = %SESSIONFILESUP + %SESSIONFILESDOWN

%SESSIONAVG = Average bytes transfered by the server

 -= Time/Date =-

%SERVERTIME = Server's Machine Time
%SERVERDATE = Server's Machine Date
%SERVERLOCALHOST = Server Local Hostname
%SERVERVERSION = Server Version

%DISK = If not Relative Path enabled then return Disk Drive
%DFREE = Space Free in current directory

 -= User =-

%FUP = Number of Files uploaded by current user
%FDOWN = Number of Files downloaded by current user
%FTOT = %FUP + %FDOWN

%BUP = Number of bytes uploaded by current user
%BDOWN = Number of bytes downloaded by current user
%BTOT = %BUP + %BDOWN

%TMIN = minutes since current user is connected
%TSEC = seconds since current user is connected (not equal to %TMIN * 60)

 -= Server =-

%PCPROC = Type and number of server Processor (Intel, AMD, Cyrix ... K6, Pentium II, ...)
%PCRAM = Amoun of physical Memory

%OSVER = Windows version (95, 98, NT, Service pack if available ...)

A typical login file could be :
==========================================
Hello, user from %UIP !
You are user #%CNOW of %MAXUSERS maximum users
It is %SERVERTIME, we are the %SERVERDATE.
==========================================
You are connected to %SERVERVERSION, this server has %PCPROC and %PCRAM Kb of Ram.
This server has already served %SESSIONKBUP Kb to client and received %SESSIONKBDOWN Kb at an average rate of %SESSIONAVG Kb/s.
You will be disconnected after %UTIMEOUT s of inactivity.

Have a nice day on our server  !
That's all for those files.

Links Settings

This feature allows you to redirects client to some directory placed on other drives.
You can specify how links are treated :
- As Links : When user clicks on a links current directory becomes the target link directory
- As Virtual Directory : user sees fake directory (non physical existence in home directory) that redirects on drives/directory on other location.

You can add links from a file (see links file) or define links using Windows ShortCut (.lnk file) : simply create a shortcut to the target directory, give user access to this directory.
Last option is to auto include link to home directory called "Home" which will always redirect to user's Home Directory.

Notes :
- Virtual directories are only mountable in home directory.
- Virtual directories' date will be the target directory date.
- Only .Lnk files in home directory will be processed other will be ignored.

For more information see configuring links

Ratio/Quota Settings

Well, you have certainly seen such features in other servers ;)
What is it ?

1 - Ratio
When you don't want lame user to download your file without uploading some of their then you can set ratio.
For example if you want user to get 1 byte of download for every byte they upload, the ratio is set to 1/1, 1 byte uploaded for 2 byte to download = 1/2. If they upload a 100 bytes file then with ratio set to 1/2 they will have 200 bytes for credit, 50 bytes if ratio is set to 2/1 .
For Upload : NewCredit = CurrentCredit + RatioDownload / RatioUpload * FileSize
For Download : NewCredit = CurrentCredit - FileSize

Count byte per session / count files per session
Some ratio may have to bee temporary such those of anonymous sharing the same account : when user log in they are given a default credit specified in the credit box. This credit is only valid for the time of connection and is not shared by all users connected under this account.

Count byte all sessions / Count files all sessions
Well those ratio persist after disconnection, so you will be given the credit you had the last time you disconnect from the server. If two users connect under the same account with this ratio method then credit are shared between the users (If Credit is 1000 bytes, ratio 1/1 and A download 500 bytes then A & B Credit will be 500 after A download.)

(Note : credits are updated during the operation so that if you stop a download your credit will only be decremented from what you have successfully downloaded, if you continue the download later credit will be corresponding. Another point is that credit are internally pre-calculated.
Example : A & B connected under the same account with 30 Mo, A starts downloading 16 Mo before B, B wants to download 15 Mo (A has not finished his download) then B can not download cause 16 Mo + 15 Mo > 30 Mo. If A stops his download then credit will only be decremented from the amount downloaded => B will be able to download if A has downloaded less than 1 Mo. This thing only happens for Counting byte all Sessions/Counting files all sessions (credit is decremented only at the end of the download for files methods))
2 - Quota
Another useful feature which allows you to set maximum space that user can used on your server. Like Ratio Quota are calculated during upload (for REST method and so ...). User can not upload if he exceeds his quota => he needs to delete some files.
Note for Quotas : If user quota is zero and he deletes a file then quota remains at zero.

IP & Banned Files

These options are here to limit annoyance on your server :

- IP Access : Specify IP that have access (or are banned) under this account : this means that you IP matching mask are allowed/not allowed to login under this account.
- Banned Files : client who try to upload filename matching masks are not allowed to upload. (they can rename filename though)

Note : IP Access follows the rules of Server global IP Access (wildcards, rules ...)

Choose a group for your user

If you want that user to have the same access property to the FTP Server as other same user without setting up each user account then create a group account for all these same "access users" :
Click on [image] to define group

In our example we have created a group called "Demo group".
All the user in this group have access to "C:\TEMP" with all access
The group password is not defined so if you want your user to have a password then you can specify :
- one in the group => all the user will have the same password
- a password in all the user account => user in that group will have a personal password
There's no credit and no ratio so they can do what they want in "C:\TEMP"
No links file is defined for this group.

In this way you can add some properties to the user and give general properties with the groups :

Note concerning groups rules:
- User directorries are composed of User directory (if specified) + Group directories => the first directory is always the home dir of the user. If you don't specify dir for user then he will have access to group directory and the home dir of the group will be his home dir.
- Others things : User's properties have always priority over groups settings.
(If user ratio is checked then group ratio won't be effective, same for quota => you can than set up personal user settings inside groups.)
- Misc and Ratio acts same as User Settings

-> User > Group
-> Group properties are the default for all group user (if the user property considered is not defined)


 3.2 Configure logging

With this window you can configure what can be monitored on your Server :

Screen

- Log Tried Connections
- Log users logged
- Log disconnection

- Log directories creations : MKD, XMKD ...
- Log Uploads : STOR, APPE
- Log Ended Uploads
- Log changes of directory : CWD, CDUP ...
- Log files deletion : DELE, RMD ...

- Show Answers from server
- Show Clients commands
- All/None

File

- Log Tried Connections
- Log users logged
- Log disconnection

- Log directories creations : MKD, XMKD ...
- Log Uploads : STOR, APPE
- Log Ended Uploads
- Log changes of directory : CWD, CDUP ...
- Log files deletion : DELE, RMD ...

- Show Answers from server
- Show Clients commands
- All/None

Setup

With this setup you can specify the way things are logged :
- Path to log file
- Type of Log File : Single/daily/weekly/monthly/yearly (log file will be for example "FTP-18-apr.-1999.log" for daily log file and "FTP.LOG" for log path)

- Max Lines on log screen

- IP Logging :
- Apply to Both/Apply to Screen Log/Apply to Log file : on what you choose to apply following rules.
- Log All IP : All IP Are logged.
- Log only these IP : Following ip list will only be logged.
- Do not log these IP : Following ip list won't be logged.
- IP List : enter the IP here.

Advanced

- Standard Log Syntax : use normal log syntax (can be faster)
- Custom syntax : this lets you define the way G6FTP will log events.

Tags for log syntax :

- %DATE, %TIME : Events date, time.
- %ID : User Unique Identifier
- %IP, %HOST : User IP, HostName (if resolve ip is enabled)
- %LOG : event to log

Color Settings

Well it allows you to define the color you want for onscreen log.


 3.3 Links file & virtual directories
What is a links file ?
Look below

You may have already seen the yellow icon with a red arrow if you are familiar with FTP and wondered how it was done.
In fact, it is one of the easiest thing to do but sometimes obscure for beginners.

What do we need ?

- Directory/Cdrom drive/harddrive to share
- Access to this directory for the concerned user
- Notepad.exe to edit the link file

That's all !

For example, imagine that you would allow access to your CD-Rom drive G:\ for a user named "Demo".
- The first thing to do is to give the user access to G:\
- Create a new file with notepad : we will call it "demo_links.txt"
- Add an alias to "G:\" in this file :
We will call the alias "My Secret Files"
In "demo_links.txt" simply add :
My Secret Files | G:\
(Note : | is reached via "Alt Gr+6")

So the user will see a shortcut to "G:\" named "My Secret Files", when he clicks on it he will be redirected to "G:\"
- Save the file in the directory of your choice (not a shared directory, user could access the links file) and then, in the user account set the "links file box" the path to the links file.

Finished ! Was it difficult ?

Well for those wanting more and more options, we can give some extra tips :

- When you want a user to have a shortcut to his "Home Directory" create a link with ~ as path. So for our user, he will have 2 links :
My Secret Files   | G:\
To Home Directory | ~
- To have your links listed first, i suggest you to put a "+" (or any high letter listed before "a") as first letter :
+My Secret Files   | G:\
+To Home Directory | ~
So that these links will be at the top of the directory list.

This can also be made for a group, in this case they will all have the same links, for that just set the "links file box" in the group account instead of the user account (don't forget to give group access to the shared directory).

Applications

So if you have understood with what it deals, you can create some virtual directories.

Imagine :
- You run a FTP Site with G6FTP and you specify that clients see relative path instead of full path.
- Your site is accessible through typing : ftp://user:pass@192.168.0.1/ for the root
- You want user to get access to : ftp://user:pass@192.168.0.1/My Lastest Photos/ but this dir does not exists on your server or is located on another drive (not in the user root path).

Solution : Create a link file as we made above.
For example :
My Latest Photos | G:\Path\MyLatestPhotos\
do not forget to share the drive for at least read access to user and now My Latest Photos can be seen by users typing ftp://user:pass@192.168.0.1/My Lastest Photos/Myphotos.jpg (for example) without having to change directory.

Any calls to this directory is redirected to the corresponding path.

Note Concerning links

- Links pointing to invalid directory (not existing) are not shown.
- Links pointing to themselves are not shown (if user is in the directory pointed by the link).
- Links are shown in all user's directories (it may change in the future).

Enhanced links : Virtual Directory

Based on links structure (you do not need to change your linkfile), virtual directory are mounted in home directory.

The difference between link and VD is that client is not redirected but virtual directory simulates the real directroy :
My Latest Photos | G:\Path\Photos\
If admin sets to treat links file as Virtual Directory then client will see a new directory in the dir list :
(D=Directory)
(F=File)

Home Dir = /

(D) Divers
(D) My Latest Photos
(F) index.txt
(F) notes.txt
When he clicks on "My Latest Photos" path becomes "/My Latest Photos" and the content is "G:\Path\MyLatestPhotos\" 's content instead of perhaps "/Path/Photos" if G:\ is shared for user.

You can mount as much VD as you want in home directory.

Note:
- I think this is a more esthetic way to link directory.
- You do still have to share the target path to enable virtual directory.


 3.4 Spying User (and server activities)

As i personaly like to see what happens on my ftp server, we have implemented some features to spy and check activities.

Clicking on a user in right list brings you to those infos : Server Activities

In this form you see users connected and some info about their activities :
- First you can see if he's logged as anonymous (face is masked, not masked for accounted users).
- What they are doing at the momen int which directory they are, what they are doing (uploading, downlaoding).
- time they connected.
- progress of current action (for download (%) & upload (Kb cause we do not know how much byte they will upload).
- how many bytes downloaded & upoaded by this user.
- current credit if available.

- transfer speed.
- Average Download Speed, Average Upload Speed : these values are updated after each successful transfer.

- See what selected user has uploaded/downloaded during this session.

Clicking on a user will bring you the Spy User form (bottom on the screenshot).

This little window shows you the command & server replies for the current selected user instead of the general screenlog.

RealTime Interaction ...

Who has never wanted to kick, ban, send message to users connected to the ftp server ?
Well those commands are for you kind of Dictator ;). Right Click on a user when in Server Activity window.

- Kick : Disconnect user & ask for banning.
- Stop Current Transfer : Ask for reason and break current download/upload
- Mass Kick : Disconnect All User & ask for banning.
- Deny IP Access : Ban selected User IP.
- Spy User : bring Spy User window.
- Send Message : see below.
- Freeze List : Pause the refresh timer.
- Refresh : manual refresh.
- Show Grid : Display Grid (Server Activity).

Have a nice dictature ... ;)

Send Message or how to guide your users

Clicking on Send Message/BroadCast will bring you the above window, enter your text, select Time, Date, reply notice if you want and click on send. User will receive in our case :
214 14/03/99 14:14:02 archives.exe is located in \temp\archives - You can reply using SITE MSG

In that way you can guide your user or simply talk to them !


 3.5 IP Access Restriction

For those of you who have some "enemy" or simply restriction to apply to your server then this section is for you.

Right Click on IP List (right column) and select "Add IP", the form above will appears.

With this form you can define "allow access" and "refuse acces" based on IP Adress/hostname.
In our example above we have defined 3 access rights :
+192.168.0.* : Allow anyone from 192.168.0.* to connect
+192.168.1.* : idem with 192.168.0.*
-192.168.0.[1-3] : refuse ip from 192.168.0.1 to 192.168.0.3 in order to restrict previous rules.
This has for effect to only allow local intranet people to log in.

Supported wildcards

Well to define access rules you can use the following wildcards :

- ?, *, [xxx-xxx]
- Example : 19?.16?.*.[100-120] : 192.163.125.101 can login, 190.168.5.1 can't 1 is not in [100-120]
- Example : *.wanadoo.fr if you do not like people coming from wanadoo.fr

How does it work exactly ?

In fact when you do not specify any IP adress in '+' then everyone can connect, but as soon as you specify a '+' IP adress then only '+' IP can login.
If you specify only '-' IP then everyone can connect except those '-' IP.

If you specify for example +192.168.0.* then only those sort of IP can connect.
If you specify -192.168.0.1, -192.168.0.4 then everyone can connect except those two IP.

Try to not specify ambiguous IP rules such as +192.168.0.*, -192.168.0.* => no one can connect !


 4.1 FTP Commands
G6 FTP Server supports most of the needed FTP commands

Some info about most used commands :
· ABOR 	when user abort its current command
· ALLO <param> param represents the number of bytes client would like to upload, ALLO checked for disk space availability
· APPE <param> param is filename to resume in upload
· CDUP / XCUP / PWD / XPWD / CWD <param> directory navigation
· HELP display supported command
· LIST / NLST list files
· MDTM yyyymmddhhmmss[+-xxx]  specify the new datetime for the specified filename
· MKD <param> / XMKD <param> create directory
· NOOP notify the server to not kick the user, simulate a command, does nothing
· PASV switch to passive mode
· PORT <param> specify adress,port to connect to
· PWD <param> return current user directory
· QUIT disconnect from the server
· REIN reinit current user without having to disconnect, user coul now relogin with USER and PASS
· REST <param> set the byte offset to start from for file upload
· RETR <param>/ STOR <param>/ DELE <param>/ APPE <<param> RETRieve file, STOre file, DELEte file, APPEnd file (resume upload)
· RMD <param> remove directory
· RNFR <param> / RNTO <param> ReName FRom, ReNameTO used to rename a file
· SITE CHAT <user> <message> send a message to another connected user
· SITE INDEX Mac compatibility, usefull to search specific files on server
· SITE PSWD   allow user to change his password
· SITE WHO return who is connected : User Name - Connection Date - IP/HostName - Transfer KBps
· SITE ZONE display server's time zone relative to UTC
· SIZE <param> return size of specified object
· STAT return server's info & current user
· STOR <param> param represents the file to upload to server
· STOU <param> store unique, same as store but generate unique filename - not yet implemented
· SYST return system type
· TYPE <param> set transfer mode ASCII or Binary
· USER <param> / PASS <param> user name and pass for logging on the server
Note some commands may be reported by help but have not function assigned to them. This is the case for UNIX oriented commands such as STRU, SMNT which deal with UNIX file system


 4.2 Command Lines

G6 Ftp Server allows some switch on command line :

-h : put the server to Tray on Startup
-s : autostart the server
-p:21 : specify ftp port (21 here)


 4.3 Multi IP Server

As some of you may have more than one network adapter, or use NT4 Server, then you perhaps want to run a server on each IP.
This setting allows you to do it : (click on [image])

As you see, on the demo computer there are two IP : 192.168.0.1, 192.168.0.2
Adding them to the multiIP list you can now configure users for being available on a specific IP.

This way this account will only be available for users who want to connect to the 192.168.0.1 IP Address ftp server.
It allows you to configure an anonymous user for each ftp server :
Anon_192.168.0.1 on IP 192.168.0.1 with login : anonymous
Anon_192.168.0.2 on IP 192.168.0.2 with login : anonymous
...

User can have the same login/password on the different "virtual" servers


 4.4 Free Files

Well those feature is important only for users who need ratio on their sites.
Sometimes when user logs, he asks for index file (a description of files on server).
If they do not have credit then they can't download this index file.

Well to fix this ambiguous situation, just setup free files :

Wildcards are allowed just like IP access.
In the example, the user can download any .TXT files in all directory and i am setting up access to d:\my_photos_???.jpg so every file which match the mask will be free for download => not counted in credit/ratio


4.5 Performance Tips
As I know that many of you want the best performance for each program they have, we will give you some tips to make your server run faster.

Console Tips

As you have perhaps notice, logging everything to screen can affect server performance : displaying lot of text lines really slown down the server (believe me).
What to log ?

- If your server has many clients > 20, then try to not log on screen superflue commands (specific command, frequent command, change directory ...)
- Logging to file does not take many CPU time so I think you can log everything unless it becomes enormous so that you should set a daily log.
- Do not audit (log user) who are not critical to the server. I mean that it is often no use logging anonymous user command. Or you may only want to log anonymous user to see what they do and trust accounted users. See configure logging.
- Do not log to screen server answers if not needed : try a SITE INDEX *.* on C:\ and you will see what i mean if you have 10000 files ...
- Disable "log to screen when minimized" if you run the server minimized
- Arrange the receive buffer so that it feets you needs:
(We recommend to keep it at 4096)
- Set the server priority to high if it is a dedicated FTP Server (Realtime is at your Risk, you'll be warned), Default is normal

Let us know if you have other performance tips or general tips we will include them


 4.6 Installing the server as system service

I assume you have installed FireDaemon v0.07b by Formida which can be downloaded here

Well I suggest you to read the entire Formida's doc for installing G6 FTP Server as System Service.
Personaly i have succeeded to install it as system typing
c:\>%MXBIN%\firedaemon.exe -p
FireDaemon v0.07b (c) 1999 Formida Software Corporation

This process will install a new FireDaemon service for you.
Please answer the following questions:

Service Name (no spaces): G6ftpserver
Application Working Directory (eg. d:\path): c:\program files\g6ftpserver
Application Executable (eg. d:\path\filename.exe): c:\program files\g6ftpserver\g6ftpsrv.exe
Application Options (eg. /opt1 /opt2): -h -s
Service successfully installed!
Press Enter to continue.
Then i have typed :
c:\net start g6ftpserver
Le service FireDaemon Service: g6ftpserver démarre
Le service FireDaemon Service: g6ftpserver a démarré
That's all.

Now i wanted to have it starting at boottime, so i clicked on service in configuration panel :

(Well here it is in French but i think you can understand)

Extracts from Formida's FAQ:

"How can I make my service visible (for debugging)?"

Go to the Services applet in the Control Panel. Find the appropriate Fire Daemon service. Click on the Startup button. This dialog box has two sections: "Startup Type" and "Log On As". In the Log On As section choose the "System Account" option and check "Allow Service to Interact with Desktop". You will then need to stop and restart the service.

"I want my service to start as a domain user. How do I do this?"

Go to the Services applet in the Control Panel. Find the appropriate Fire Daemon service. Click on the Startup button. This dialog box has two sections: "Startup Type" and "Log On As". In the "Log On As" section choose "This Account" and type in the domain account you wish to use (eg. FORMIDA_A-P\JamesB) plus the domain password. If they are correct the user will be given the Log On As A Service privilege. You will then need to stop and restart the service.


4.7 Technical
G6 FTP Server has been tested and remains reliable under :

Tests

Pentium II 300 Mhz 64 Mo
Standard PCI Network Card
Microsoft Windows 98

Bi-Pentium PRO 233Mhz 128 Mo
3COM ISA Network Card
Micrososoft Windows NT4.0 Server + IE4.0 + Service Pack 4

AMD K6 225 Mhz 64 Mo
Standard PCI Network Card
Microsoft Windows 98

Cyrix 166+ 32 Mo
Standard ISA Network Card
Micrososoft Windows NT4.0 Server + IE4.0 + Service Pack 4

Laptop Unika
Pentium 200 MMX 32Mo
D-Link PCMCIA Network Card
Microsoft Windows 95 OSR2

486 DX2/66 with 16 MB of Ram and running WinNT 4.0 & WingateNT 2.1d
(noname NE2000 Card and USR Sportster message plus (33.6&56k) / USR Sportster Flash (33.6&56k) / 3com Message modem (56k)

Celeron 450A with 192 MB of RAM under Win98/2000 beta 3
(NE2000 Card)

FTP Engine

G6 FTP Server uses multithread timer operations to provide more power and get benefit from multi-processor machine

G6 FTP Server is at this time of writting composed of more than 24,000 lines of code.

Since 1.50, it now supports NT4(tested with SP4 only), Win98, Win95, (runs under windows 2000 beta 3)


 5.1 Registration
French

Nous savons bien que pour l'instant G6 FTP Server est en anglais, mais nous proposerons bientôt une interface en français afin de permettre aux français d'utiliser pleinement notre serveur.

Si vous êtes satisfait de G6 FTP Server et que vous continuez à l'utiliser, vous devez vous enregistrer.
Remplissez le bon de commande ci-dessous et envoyez le à l'adresse qui suit :

L'enregistrement peut se faire de plusieurs façons :
1)    Par cheque (montant en Francs Français et banque Française)
    (payable à : Matthieu ROGER)
2)    Liquide (Francs Français)
3)    Enregistrement sécurisé en ligne (13 monnaies dont Euros, $, £, Pesetas ...)
    Paiement sécurisé

Pour vous enregistrer envoyer votre commande accompagnée du réglement à:

        Gene6 - G6 FTP Server
        149 bis rue du génèral Leclerc
        60250 MOUY
        FRANCE

Pour les réglements de type 1&2, remplissez le formulaire et renvoyer le
à l'adresse ci-dessus
----------------------------------------------------------------------------
                        Date:

Nom______________________________________Société____________________________
                                         (Si société)
Addresse____________________________________________________________________

Addresse____________________________________________________________________

Ville______________________________________________Code postal______________

Pays________________________________________________________________________

Numéro de téléphone___________________ E-Mail_______________________________

Ou avez vous obtenu G6 FTP Server ?_________________________________________

Quantité: ____  Prix: ____                                    Total:________
                (129.90 FF par licence)

                                                              Total:________

(NOTE - Pour des licenses sur site et groupées veuillez nous contacter, des
réductions sont applicables)

Mode de Paiement :

 __ Chéque  __ Liquide

Voulez-vous être informé des mises à jor par Email ?__(O/N)

Suggestions / commentaires :________________________________________________

____________________________________________________________________________

____________________________________________________________________________

Merci pour votre enregistrement. Votre licence vous sera envoyé par email.

En cas de problème d'enregistrement contacter : gene6-sales@idegrif.com
----------------------------------------------------------------------------

Others (than French people)

If you find this FTP Server usefull and continue to use it then you must register.
Complete the following form and send it to the adress below :

Registration may be by one of the following methods:
1)    Check (Checks MUST be French Francs drawn in a French Bank)
    (payable to : Matthieu ROGER)
2)    Cash (again French Francs only)

3)    Online secure registration (French Francs, Euros, $, £, ... 13 values)
    (best way to register for non french people) :
    Secure Registration

To register send payment/order to:	Gene6 - G6 FTP Server
                                    149 bis rue du génèral Leclerc
                                    60250 MOUY
                                    FRANCE

For payment method 1,2 please fill the form and send it to the address above
----------------------------------------------------------------------------
                        Date:

Name_____________________________________Company____________________________
                                         (if company registration)
Address_____________________________________________________________________

Address_____________________________________________________________________

City_____________________ State/Prov.______________Zip/Post Code____________

Country_____________________________________________________________________

Phone Number__________________________ E-Mail_______________________________

Where Did you get G6 FTP Server ?  _________________________________________

Quantity: ____  Cost Each: ____                               Total:________
                (129.90 FF single license cost)

                                                              Total:________

(NOTE - For site licenses and discounts, you should contact us by email,
discount are available)

Payment Method:

 __ Check  __ Cash

Would you like to receive update notification by email ?__(Y/N)

Suggestions / comments :____________________________________________________

____________________________________________________________________________

____________________________________________________________________________

Thank you for registering G6 FTP Server.

For problem with registration contact :	gene6-sales@idegrif.com
----------------------------------------------------------------------------


 5.2 Bug Report

Well as nobody's perfect, we wait for your bug reports, comments, enhancements, suggestions ...
As i have already received bug reports for other programs, i have to say that you should first :

- Check News on site, sometimes bugs are not immediately fixed and a workaround is provided to temporarily fix the bug.
- See Version.txt included with Software to see if it has been fixed in latest version.
- Consult the FAQ (not already written).

If you did not find the bug then report it to us but always supply the following details to help us solving it :

- Processor
- RAM
- Operating System, Patch, Update (Service Pack, OSR2 ...)
- Laptop/Desktop computer.
- Internet Connection Type (Dial-Up, Lan ...)
- If local network exists then please report local IP, proxy (wingate ...).

- What you do to bug the server
- Error Message if any
- ScreenShot if available

And we should be able to fix it (we hope ;) )

Special thanks :

- Mr. M for beta testing.
- LordXar for running G6 FTP Server 2.0 (Beta 3) 24h/24h on a cable modem FTP Site & always suggesting improvements :-) (seems like he's never out of idea)

All the people who reported bugs, submitted improvements


Contents

0.0 Legal

1. Installation

1.1 Installation
1.2 Uninstallation

2. General

2.1 Brieve description
2.2 Interface
- Application
- Main Setup
- Events Manager

3. How To ?

3.1 Setup Accounts
- Add Users
- Access properties
- Message Files
- Misc properties
- Ratio/Quota
- Add Groups
3.2 Configure logging
3.3 Links file
3.4 Spy user
3.5 IP Access

4. Advanced

4.1 Server Stats
4.2 Events Messages
4.3 Multi-Homed IP
4.4 FTP Commands
4.5 Command line
4.6 Performance tips
4.8 Technical

5. Contact

5.1 Registration
- French
- Others
5.2 Report Bugs
5.3 About Gene6