Copyright: Copyright © 1995-2003 Cat-Soft, All Rights Reserved
Citation: Serv-U Help - Copyright © 1995-2003 Cat-Soft, All Rights Reserved


Serv-U FTP Server Overview
Serv-U FTP Server

See Also

http://www.Serv-U.com/

Serv-U Online Help build 19

11 May 2004

Serv-U is an FTP Server program for Windows 95/98/2000/ME/XP and Windows NT 4.0. With Serv-U, your PC will be turned into an FTP server. This means that others on the computer network that you are connected to (the Internet for most people) can access your PC to copy, move, make, and delete files and directories, using the FTP protocol (FTP = File Transfer Protocol). This protocol dictates standard ways of communication between computers, so that many different types of computers, using different operating systems and file formats, can exchange files. In simplest terms, user accounts are created and permissions granted to areas on the hard drive so that FTP Clients, like FTP Voyager, can download and upload files.

There are FTP servers (and clients) for many different systems. Serv-U is meant for PCs running MS-Windows that have a WinSock version 1.1 compatible TCP/IP stack installed. This includes Windows 95, Windows 98, Windows ME, Windows XP, Windows NT 4, Windows 2000, and Windows 2003.

Serv-U is composed of two separate parts, the Engine and the user interface. The Serv-U Engine or Daemon is the heart of Serv-U. It does all the work of serving FTP commands from FTP clients. It is the software that performs all file transfers. The Serv-U Administrator program is the way you interact with the Serv-U Engine. It is used to configure Serv-U and to define users, specify access etc.

Depending on the Serv-U Edition you are using Serv-U can handle both regular (clear-text) FTP and secure-FTP. The latter uses SSL/TLS to provide strong encryption (128 bits or better), protecting usernames, passwords, and file transfers. The Administrator program also uses SSL/TLS to encrypt all traffic between it and the Engine.

Serv-U is trialware. After installation you will have a fully functional "Corporate Edition" server for 30 days. If after the trial time you have not registered Serv-U it will turn in to the free "Personal Edition". Registration entitles you to 1 year of support via e-mail and 1 year of free updates.

Serv-U is written by Rob Beckers and copyright © 1995-2004 Cat Soft. All Serv-U sales, marketing, distribution and support are handled by RhinoSoft.com. Cat Soft is an affiliate of RhinoSoft.com.

RhinoSoft.com

P.O. Box 53

Helenville, WI  53137

U.S.A.

Sales:	+1 (262) 560-9627

Phone:	+1 (262) 560-9627

FAX:	+1 (262) 560-9628

http://www.Serv-U.com/

http://www.Serv-U.com/sales

http://www.Serv-U.com/support


Disclaimer

See Also

This is a part we do not particularly enjoy, but to make our lawyers happy it needs to be included. So here it is, the legal language.

The FTP server program Serv-U and its documentation are copyright © 1995-2004 Cat Soft. It is distributed as trialware, giving you the right to try it for a period of 30 days. If you intend to use Serv-U after the initial try-out period in any form other than the Personal Edition, you are obliged to pay the registration fee.

The next paragraph is a beautiful piece of prose. In just two sentences it says it all. The disclaimer:

This software is provided by the regents and contributors ‘as is’ and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed.  In no event shall the regents or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.


Serv-U Editions

See Also

Serv-U is available in 5 different editions with different capabilities and price tags. Your specific FTP server needs determine which edition will work best for you. There is a free Personal Edition for basic solutions, a Standard Edition that meets most people’s personal server needs, a Secure Edition that adds encryption, a Professional Edition for small to medium organizations, and a Corporate Edition for medium to large organizations and high traffic FTP sites.

Serv-U Personal Edition

Serv-U Personal Edition was created with the individual in mind. We understand the need to share a few files with a couple friends, your family, or yourself when you are traveling. Serv-U Personal Edition lets you do this for FREE. Serv-U Personal Edition has the following limitations:

•	One domain with a maximum of two concurrent connections

•	No more than 5 user accounts

•	No directory mapping or links

•	No UL/DL ratios, quotas, or remote administration

•	No SSL/TLS secure-FTP support

•	No ODBC database storage of accounts

You may use Serv-U Personal Edition for as long as you wish. However, consider purchasing a Registration ID for the Standard, Professional, or Corporate Edition so that you can enjoy all of the features and expandability Serv-U offers. After the trial period Serv-U will automatically turn in to the Personal Edition.

Serv-U Standard Edition

Serv-U Standard Edition is designed to be the file sharing solution for most individuals. The Standard Edition extends the limitations and capabilities of the Personal Edition to:

•	One domain with a maximum of 25 concurrent connections

•	A maximum of 100 user accounts

•	Support for directory mapping and links

•	Support of UL/DL ratios and quotas

•	No remote administration

•	No ODBC database storage of accounts

Serv-U Secure Edition

Serv-U Standard Edition is designed to be the file sharing solution for most individuals. The Standard Edition extends the limitations and capabilities of the Personal Edition to:

•	Support for SSL/TLS secure-FTP

•	One domain with a maximum of 25 concurrent connections

•	A maximum of 100 user accounts

•	Support for directory mapping and links

•	Support of UL/DL ratios and quotas

•	No remote administration

•	No ODBC database storage of accounts

Serv-U Professional Edition

Serv-U Professional Edition addresses the small to medium business needs for an FTP server. Serv-U Professional Edition has the following capabilities:

•	Three domains with a maximum of 100 concurrent connections

•	A maximum of 250 user accounts

•	Support for directory mapping and links

•	Support of UL/DL ratios and quotas

•	Support for SSL/TLS secure-FTP

•	No remote administration

•	No ODBC database storage of accounts

Serv-U Corporate Edition

Serv-U Corporate Edition addresses the need for a business-class FTP server with no limitations and the ability to grow with your business. With this in mind, Serv-U Corporate Edition has the following capabilities:

•	Unlimited domains with an unlimited number of concurrent connections

•	Unlimited number of user accounts

•	Support for directory mapping and links

•	Support of UL/DL ratios and quotas

•	Support for SSL/TLS secure-FTP

•	Support for remote administration of multiple servers from a single location

•	Support for ODBC database storage of user and group accounts

Serv-U Corporate Edition is available as trialware for a 30-day evaluation. During this time, you may explore and use all features in Serv-U with an unlimited number of concurrent connections. If you would like to continue using Serv-U Corporate Edition after your evaluation, a Registration ID must be purchased.


Registering Serv-U

See Also

Registration of Serv-U is essential to providing you, our customer, with quality inexpensive software. If you use Serv-U please register.

To register your copy of Serv-U and receive your registration ID, select "Help | Serv-U on the Web | Purchase Electronically" or mail your payment, name, address, and e-mail address to:

RhinoSoft.com

P.O. Box 53

Helenville, WI  53137

U.S.A

Current pricing can be found at:

http://www.Serv-U.com/pricing.htm

You may also FAX your order to +1 (262) 560-9628. Use the form found at:

http://www.Serv-U.com/purchase.htm

If you have lost your registration ID, please visit:

http://www.Serv-U.com/lostid.htm

RhinoSoft.com can be reached at:

+1 (262) 560-9627 -and- http://www.Serv-U.com/sales

Please remember to include your name and e-mail address so we can send your registration ID. We will e-mail your ID within instantly with an on-line purchase.

More information about Serv-U can be found at:

http://www.Serv-U.com/


Contacting RhinoSoft.com

See Also

If you have lost your registration ID, please visit:

http://www.Serv-U.com/lostid.htm

You may contact RhinoSoft.com by snail-mail at:

RhinoSoft.com

P.O. Box 53

Helenville, WI  53137

U.S.A

Sales:	+1 (262) 560-9627

Phone:	+1 (262) 560-9627

FAX:	+1 (262) 560-9628

For sales inquiries:

http://www.Serv-U.com/sales

You may also visit our general web site:

http://www.Serv-U.com/

Click here for information about technical support.


Technical Support

See Also

Have a question and need more help? RhinoSoft.com offers a variety of support options. For current product support policies, please refer to the Serv-U help desk at http://www.Serv-U.com/support.htm

When contacting the support department, please take a look at the ‘About Serv-U’ screen, selected from the ‘Help’ menu, as shown above. This shows the build numbers of the Administrator program, and (when connected to a server) the Daemon program.

Users who purchased their copy of Serv-U from an Official RhinoSoft.com reseller will be referred back to the reseller for support. All support options are found at:

 http://www.Serv-U.com/prodsupport

If you have lost your registration ID, please visit:

http://www.Serv-U.com/lostid.htm

Free Email Support

Free technical support is available via email to all users. RhinoSoft.com asks that all users submit requests to the form at http://www.Serv-U.com/support for technical support requests.

Support is also offered through the Serv-U Discussion List.

Telephone Support for All Users

Technical Support is available via telephone at a cost; minimum charges may apply. The Technical Support phone number is +1 (262) 560-9627. Please have credit card information ready. Free support is available via Email.

Sales Issues

Sales questions (of a non-technical nature) relative to Serv-U software should be directed http://www.Serv-U.com/sales. Sales representatives can also be reached by calling RhinoSoft.com at +1 (262) 560-9627.

Technical Support options are subject to change without notice at the discretion of RhinoSoft.com


Serv-U Discussion List

See Also

There is a discussion list by email for Serv-U where you can ask questions and discuss Serv-U related topics. At the moment of this writing the list is a thriving community of over 550 subscribers. Many of these are very knowledgeable Internet professionals. An excellent place for your questions!  To subscribe to the Serv-U mailing list, send an email message to:

ListServer@cat-soft.com

With only a single line in the message body, which should read:

subscribe serv-u

This will return a message from the list manager within a minute or so, explaining in detail how to post messages to the list and related matters. This message will also contain instructions how to switch your subscription over to the digest version. A digest list member only receives one message a day, containing all the previous day’s postings.

If you want to look through or search previous postings to the mailing list please take a look at the Serv-U list archive at:

http://www.cat-soft.com/serv-u-list/


Serv-U Beta Versions

See Also

If you like life on the (b)leading edge and want to test-drive the latest & greatest the beta versions announcement list is for you! Whenever a new beta version is available for testing a message is posted to this list so you will be kept informed. Only announcements are sent, meaning you will receive very few messages from this list and it will not clutter your mailbox. Beta testing greatly helps in keeping bugs out of the release versions of Serv-U and making it as stable a program as it is. Your help with that is greatly appreciated!  To subscribe to the Serv-U beta versions announcement list, send an E-mail message to:

ListServer@cat-soft.com

with only a single line in the message body, which should read:

subscribe beta

This will return a message from the list manager within a minute or so, indicating you are subscribed.


Reporting Bugs

See Also

Please report bugs to the author, Rob Beckers, at Rob@cat-soft.com.

Tips for reporting bugs

•	Most important: Can you get the same bug to appear by repeating certain actions?  Please try hard; without a recipe for repeating a bug, it's going to be very hard to track it down.

•	Which version/build of Serv-U are you using? You can find this information in part in the "Help | About" menu. Also look at the "Server" panel: When connected to your server this will show the server build number in the lower-right corner.

•	What "Edition" is your server? Is it registered? If so, what is the registration information in the "Server | License" panel?

•	What is the operating system  (Windows version)?

•	In case of server Engine or Administrator crashes, look in the Serv-U directory for a file named ServUCrashReport.txt or ServUCrashReport.elf and include this with your bug report. Depending on your operating system and settings this may not get generated. In that case any other information that can be helpful, such as a Dr. Watson report, is welcome too. To make Dr. Watson (a utility that comes with Windows) generate error logs please run this from a DOS box: "DrWtsn32 –i", the error log will by default be in file Drwtsn32.log, do a search in Windows to locate it.

•	Please indicate also if this bug is merely cosmetic or of vital importance for using Serv-U. Somewhere in between is possible as well, of course. We consider security-related bugs very important!

•	Finally, very important, please give us a chance to fix the problem before advertising all over the Internet about it. Any program changes need testing, so please be patient and give us a little time. Thank you!


Engine Overview

See Also

Serv-U is a "server" program, also called a "daemon". The term daemon comes from ancient Greek mythology. There, the Daemons were half-gods, acting as messengers between the people on earth and the gods. This FTP server acts, likewise, as a messenger for file transfer between FTP clients and your computer. Once started it sits in the background waiting for a client to contact it and after communications are established, acting out the client's commands.

The FTP daemon of Serv-U is contained in the ServUDaemon.exe program. When started the daemon does not have any user interaction, it runs hidden in the background. Normally you do not interact directly with it, rather, the Administrator program or tray icon is used to start and stop the daemon.

System Service

The Serv-U daemon can run as a native system service on all Windows platforms. A system service in MS Windows starts when the computer is started and continues to run when interactive users log in and out of the desktop. On NT the server is automatically installed as a system service, on Windows 9x/ME you have to check the "Start automatically" checkbox in the "Server" panel to turn Serv-U in to a system service.

In case you are running Serv-U as a system service in NT/Windows 2000/Windows 2003/XP you can not specify a command line, so setting an alternate path for the ServUDaemon.ini file will not work. A work-around is to edit the service entry in the registry and edit the command line parameters directly in there. The registry key is:

HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/Serv-U/Imagepath

Just edit the required options directly behind the ServUDaemon.exe entry.

Command Line Parameters

The ServUDaemon.exe program supports a number of command line parameters that may be useful when the server needs to be controlled from schedulers and such. Without parameters running the program will start the daemon. The exception to this is if the server is installed as a system service on NT, in that case starting/stopping can be done through the "Services" applet of Control Panel. The command line parameters are:

/s	= stop server

/i	= install server as a system service (NT/W2K/XP only)

[ini-file]	= alternate path/name for the ServUDaemon.ini file

Files

The Serv-U Engine relies on a number of files to get the work done. Some are always present, others are only created when needed. These files may be present:

ServUDaemon.exe	= the Serv-U Engine

ServUDaemon.ini	= configuration file with setup for the Engine, domains etc.

ServUStartupLog.txt	= Engine information, is overwritten with each server start

ServUCrashReport.txt	= crash information in case the server crashes

Serv-UID.old	= a copy of the registration key information

ServUCert.crt	= self-signed server certificate for secure-FTP

ServUCert.key	= server private key for secure-FTP

BugSlayerUtil.dll	= library that generates crash info in case of server crashes

ServUPerfCount.dll	= library with performance counters routines

Libeay32.dll	= library with encryption support routines

SSLeay32.dll	= library with SSL/TLS support routines

Registry

Serv-U normally does not use the registry but you have the option of storing domains and their associated groups and users in the registry. If the registry is used, all Serv-U related information is stored in a single registry sub-tree:

HKEY_LOCAL_MACHINE\Software\Cat Soft\Serv-U


Windows 95/98/Me

See Also

These versions of MS Windows have a limit of 64 Kbytes for any .ini file. Serv-U stores all its setup information, including all domains, groups, and users by default in the ServUDaemon.ini file. If the number of domains, users etc. is such that this limit poses a problem you should store domains and their associated groups and users in the computer’s registry rather than the .ini file. Domain storage can be changed in the "Server | Domains | Domain" panel.

Common to all these versions of MS Windows are their rather crippled network abilities, especially on versions after Windows 95. They are very limited in the number of concurrent sockets they can handle (though Windows will normally claim to be able to handle 32000+ concurrent sockets, this has no relation to the actual number of concurrent sockets it will handle). In FTP each connection takes up a socket for sending commands back and forth, plus an additional socket during each data transfer. In practice this means these versions of Windows will reach their limit with just about 2 dozen concurrent FTP users before running out of sockets (which will cause error messages being sent to FTP users when they use any command that needs an additional socket). Keep in mind that sockets are a system-wide shared resource, so if there are other programs on the same PC that use the network the limit for Serv-U will be reached even sooner.

Serv-U can be installed as a service in Windows. This means the Engine will be started automatically each time Windows is started, and it will continue to run even when users log out of Windows and back in again. To install Serv-U as a system service simply check the "Start automatically" checkbox in the "Server" panel. If you need to disable Serv-U as a service under Windows 95/98/ME simply uncheck the "Start automatically" checkbox.

Windows 95/98/ME services are very different from Windows NT and Windows 2000/2003. In these versions of Windows a registry entry is set to start Serv-U when Windows starts up. This registry entry is:

\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices\Serv-U

To start or stop the Serv-U Engine you can use the adminstrator program or the Tray Icon.


Windows 2000 and Windows NT 4.0
Windows 2000/2003, Windows XP and Windows NT 4.0

See Also

Serv-U is by default installed as a service in Windows NT 4, Windows XP and Windows 2000/2003. Windows NT/XP/2000/2003 services are very different from those in Windows 9x/ME. In Windows NT/XP/2000/2003 the "Services" control panel applet is used to configure how Serv-U acts as a service.

When installed in Windows NT/XP/2000/2003 no additional configuration is required to run as a service. The Serv-U installation program does the work for you. If you need to disable Serv-U as a service under Windows NT/XP/2000/2003 you can do so by simply unchecking the "Start automatically" checkbox in the "Server" panel or by using the "Services" Control Panel applet.

To start or stop the Serv-U Engine you can use the adminstrator program or the Tray Icon. If the Engine is installed as a system service you can also start, stop, or pause the service through the "Services" Control Panel applet.

In the "Services" applet there are some additional settings you may want to take advantage of.  There is the option to automatically restart the server in case of a crash, in the "Recovery" tab. While we try to make Serv-U a stable and reliable server this may come in handy on occasion. Also it is possible to run Serv-U under a specific NT user account, other than the default LocalSystem account, see the "Log On" tab. In particular, this is needed in case you want to make network resources (UNC paths) available through Serv-U, the LocalSystem account does not have any access to network resources.


Administrator Overview

See Also

The Serv-U Administrator program is the way you interact with the Serv-U Engine. It is used to configure Serv-U: To create domains, define users and tell the server can be accessed. The easiest way to start the Serv-U Administrator program is to double click on the Tray Icon. The Tray Icon is normally located on the lower right corner of your computer’s display, next to the clock. If the Tray Icon is not enabled, the Serv-U Administrator needs to be started from the "Start" button, then "Programs | Serv-U FTP Server | Serv-U Administrator".

Concepts

Before starting to use Serv-U it is important to understand some of the concepts of the program. A single instance of the Serv-U Engine can be used to run multiple ‘virtual’ FTP servers. Each virtual FTP server is called a "domain" in the Administrator program. Thus, for the server to be useful there has to be at least one domain. Each domain has users, groups and settings unique to that domain (such as messages and user limits) associated with it. For a domain to be useful there has to be at least one user account for FTP clients to log in to. Normally the Setup Wizard will take care of setting up an initial domain and user account the first time you start the Administrator program. Think of all the domains and users as forming a hierarchy, for a typical typical Serv-U setup with a few domains and users this can be displayed as follows:

•	Serv-U Server

•	Domain 1

•	User account 1

•	User account 2

•	User account 3

•	Domain 2

•	User account 1

•	User account 2

•	Domain 3

•	User account 1

•	User account 2

This structure is closely followed in the way the Administrator program graphically displays domains, users and groups and in the way you interact with Serv-U.

Command Line Parameters

The Administrator program is contained in the ServUAdmin.exe file. This program supports several command line parameters:

/s	= stop any active instance(s) of the Administrator program

/n	= start Administrator program without showing the splash screen

/f	= bring he Administrator program to the foreground or start if needed

Files

The Administrator program relies on a number of files to get the work done. Some are always present, others are only created when needed. These files may be present:

ServUAdmin.exe	= Administrator program

ServUAdmin.ini	= file with Administrator program settings

ServUCrashReport.txt	= crash information in case the server crashes

ServUMessages.txt	= client-server messages repository

Libeay32.dll	= library with encryption support routines

SSLeay32.dll	= library with SSL/TLS support routines

More Information

Click on any of the following related topics to learn more about the Serv-U Administrator:

Tray Icon

A "U" icon sitting in the system tray next to the clock, allows you to control Serv-U and the Serv-U Administrator.

Main Window

Allows you to select what to configure it and allows you to configure and monitor Serv-U.

Toolbar

Gives you quick access to commonly used options and features in the Serv-U Administrator.

Menus

Allows you to configure options in Serv-U.

Configuration Tabs

Allows you to configure specific options for items in Serv-U.


Tray Icon

See Also

The Serv-U Tray Icon allows you to quickly identify what is happening in Serv-U. In addition the Tray Icon allows you to start and stop the Serv-U Engine, to start the Serv-U Administrator, or to turn off the Tray Icon altogether. The Tray Icon only shows information about your local server, i.e. the Serv-U FTP server installed on the same PC as the Tray Icon.

The Serv-U Tray icon resides in the System Tray, usually on the lower right side of your Windows display, next to the clock (if enabled). The following are some example screen shots of the Serv-U Tray Icon in action.

To enable the Tray Icon use the "View | Tray Icon" menu option in the Administrator program. Once enabled through this menu option the Tray Icon will automatically show each time the PC is started. To disable the Tray Icon use the "View | Tray Icon" menu option or the "Exit" choice of the Tray Icon menu.

Idle

The Serv-U Engine is running but idle. There are no users connected and there are no transfers in progress.

User is Logged In

One or more users are logged into Serv-U, however no file transfers or directory listings are active.

User is Logged In with Transfers

One or more users are logged into Serv-U and there is either a file transfer active or a directory listing or both.

Offline

The Serv-U Engine is offline. When offline, Serv-U is not accepting any connections from FTP clients. This may be the result of manually disabling Serv-U, or there may be an error. Possible errors can be that Serv-U is unable to open the port the server listens on for incoming clients, or there may be a problem with the registration information. In case of an error check the server’s session log for more information. If you can not log in through the Administrator program you can also examine the session log directly by opening the ServUStartUpLog.txt file in the Serv-U directory using Notepad.


Main Window

See Also

The Main Window is divided into two panels. The first panel, the leftmost panel, is a tree of items that can be configured. The second panel, the rightmost panel, varies depending upon the selection in the tree.

At the top of the Main Window is a menu bar. The available menus change depending on the selected item in the left panel’s tree. Immediately below it is the toolbar. The toolbar provides shortcuts to some of the menu items and also changes according to the selected item in the tree. At the bottom of the Main Window is the status bar. The status bar tells you at-a-glance how busy the selected server is.

Tree Panel (leftmost panel)

This panel contains a tree of all the items that Serv-U can configure. This includes configuration changes for each server that the Serv-U Administrator knows about. To make changes to items that are displayed in the tree, select the item you want to configure, and then make the desired changes in the Configuration Panel to the right.

Configuration Panel (rightmost panel)

The contents of this panel vary depending on what is selected in the Tree Panel. When an item is selected in the Tree Panel this panel changes to represent what can be changed.


Toolbar

See Also

The Serv-U Administrator toolbar allows you to perform many of the common Serv-U Administrator commands quickly by pressing a button. Serv-U’s toolbar appears on the top of the main window. The Serv-U Administrator changes the toolbar options depending on what is selected in the Tree Panel.

The following are the buttons that appear on the toolbar.

  Connect

This option connects to the selected server.

  Disconnect

When Serv-U Administrator is already connected to the server, this button is available. This option disconnects from the selected server.

  New Server

This option creates a new server in the Serv-U Administrator. When selected, Serv-U Administrator asks a series of questions about the server being connected to.

  Remove Item

This option removes the selected item from Serv-U Administrator. This option is used for users, groups, domains, and servers.

  Refresh List

Use this option to refresh any list. This includes the list of users and any other list that can change.

  Send Message

Use this option to send a message to the selected user. If no user is selected, this option is unavailable.

  Send Broadcast Message

Use this option to send a message to all users. If no users are logged in, this option is unavailable.

  Stop File Transfer

Use this option to stop the selected file transfer.

  Kill User

This option logs the selected user off. Terminates all connection for the logged in session.

  Spy on User

This option allows you to watch what a user is doing.

  Close

This option closes the current live activity monitor such as spying on a user.

  Add IP

This option adds an IP address to the IP access list for a server. When selected you are prompted to enter the IP address and other information.

  Remove IP

This option removes the selected IP address from a list.

  Flush List

This option removes all items in a list. Use with care because all items in the list are removed. This option cannot be undone.

  New Domain

This option creates a new domain for the selected server. When selected you will be prompted to answer questions about the new domain.

  New User or Group

This option creates a new user when "Users" is selected, and creates a new "Group" when "Groups" is selected.

  Copy User or Group

This option makes a copy of the selected user or group.

  Filter Text

This option allows you to filter information from a text window based on the content. After selecting this option you are prompted for the information you want to see.

  Clear

This option clears the text from the selected text window. It is used mostly for logs such as the Domain Log.

  Restore

This command resets the right panel’s settings. Use this command when you don’t want to use the changes you have made in any configuration panel. This button is unavailable when no changes have been made.

  Apply

This command sends your changes to the Serv-U Engine. Use this button to make your changes on the Serv-U Engine. This button is unavailable when no changes have been made.

  Up

This option moves the selection up one item in the left panel tree view.

  Refresh

This option refreshes the information in the right panel. When selected the Serv-U Administrator gets the current settings from the Serv-U Engine.

  Cut

This option performs a Windows "cut" operation. By using this option when text is selected, the text is cut from the screen and copied to the Windows Clipboard.

  Copy

This option performs a Windows "copy" operation. By using this option when text is selected, the text is copied to the Windows Clipboard.

  Paste

This option performs a Windows "paste" operation. When information is available on the Windows Clipboard for pasting, this button is available. When selected the contents of the Windows Clipboard is pasted into a text field.

  Help Topics

Use this command to display the Serv-U help topics.

  Purchase

Use this command to purchase Serv-U through your Internet connection.

  About

Use this command to display the version number of FTP Voyager. If you are using a registered version of FTP Voyager, your name will appear in this dialog box.


Status Bar

See Also

The bottom part of the Administrator program shows a status bar. You can enable or disable seeing the status bar through the View menu. The status bar gives information at-a-glance about the server that is selected in the Administrator program, to get this information the Administrator program needs to be logged in to that server. The update frequency of the status bar depends on the server that the Administrator program has selected, it is more frequent for the local server.

The first (left) field of the status bar shows the server that is currently selected in the Administrator program and the type of administrator privilege the Administrator program has on that server.

The second field shows the total throughput of the server in kilo-bytes-per-second. This is the total of all users, all commands and replies that are being sent and received, and all file transfers plus directory listings. Shown are downlink speed, from server to clients, and uplink speed, from clients to server.

The third field shows socket use. Every network connection and every listening port takes up a socket. Each data transfer (a file transfer or a directory listing) sets up a separate network connection, which will be reflected in the number of sockets that are in use. The second number is the total number of sockets Windows claims it can make available. This should not be taken too literally though: Sockets are a shared resource and other programs are also using sockets that count towards this maximum. Also, the system does not really have the ability to make that many sockets available at the same time (32000+ as reported on most systems), so this number should be taken as just an indication rather than an absolute. Be sure to read the notes on Windows 9x in this respect.

The fourth field shows the number of FTP users currently logged in to the server and the user limit for the entire server (if one is set). The first number (8 in the sample above) is the total number of all users, the second number (7 in the sample above) is the number of anonymous users.

The fifth field shows how many file transfers are currently in progress on the server. These can be file uploads or file downloads.

The six field is only present if there are any messages for the system administrator. FTP users can send messages to the sysop using the SITE MSG command. If new messages are present that have not yet been read the little envelope icon will blink. Clicking on the icon will bring up the User Messages window.


User Messages

See Also

The User Messages windows shows messages that were sent by FTP users to the system administrator. If there are any messages the envelope icon will show in the right-hand corner of the status bar and clicking on the icon will make the User Messages window visible. You can also make this window visible by using the "Window | Messages" menu or by pressing F2.

There is only one User Messages window for all servers you administer from the Administrator program, all messages from all servers and domains come to this window. By default messages are stored unless you delete them. You can also reply to messages or send messages to all users on all servers from this window.

The first line of each message shows a date and time stamp, the domain name, and the server name on which the domain is located. The next line is the user name, session ID number, and the message itself.

Toolbar Buttons

All interaction with the User Messages window is conducted through either toolbar buttons or a popup menu with the same options as the toolbar.

There are the following buttons in the toolbar.

 Cut

Place the cursor on any message to enable this button. It will cut the message where the cursor is placed. By selecting multiple messages prior to clicking this button you can delete multiple messages

  Copy

This option performs a Windows "copy" operation. By using this option when text is selected, the text is copied to the Windows Clipboard.

  Clear

This option clears all messages from the User Messages window.

  Send Message

Use this option to send a reply message to a user. A user is selected by placing the cursor on a message you want to reply to. If the cursor is not on a message or the user is no longer logged in to the server, this option is unavailable.

  Send Broadcast Message

Use this option to send a message to all users on all servers.


Menus

See Also

The Serv-U Administrator menus allow you to perform certain Serv-U operations. The menus change depending on what is selected.  The following is an overview of the Serv-U Administrator menus.

File Menu

Perform file operations.

Edit Menu

Perform Cut, Copy, and Paste operations.

View Menu

Perform operations that change the look and feel of Serv-U Administrator.

Window Menu

Perform other Window operations.

Help Menu

Perform Help and registration operations.

Servers Menu

When "Serv-U Servers" is selected, this menu is available.

Server Menu

Available when a server is selected.

Settings Menu

Available when "Settings" is selected.

Activity Menu

Available when "Activity" is selected.

Domains Menu

Available when "Domains" is selected.

Domain Menu

Available when a domain is selected.

Users Menu

Available when "Users" is selected

User Menu

Available when a users is selected.

Groups Menu

Available when "Groups" is selected.

Group Menu

Available when a Group is selected.


File Menu

See Also

The file menu contains all file operations that are available. Currently the File menu contains one option:

  Exit

Select this option to exit the Serv-U Administrator. The standard MS Windows Alt-F4 key will also exit the program. When selected the Serv-U Administrator disconnects from all connected servers then exists. Selecting this option does NOT stop the Serv-U Engine.


Edit Menu

See Also

This menu contains all of the text edit operations that are available. These options are available only when working on text fields. The following are the options:

  Cut (Ctrl+X)

Select this option to cut (delete) the selected text from the current edit control and copy to the Windows Clipboard. If no text is selected (highlighted) or the cursor is not in an edit control, this option is not available.

  Copy (Ctrl+C)

Select this option to copy the selected text to the Windows Clipboard. If no text is selected (highlighted) or the cursor is not in an edit control, this option is not available.

  Paste (Ctrl+V)

Select this option to paste text from the Windows Clipboard into an edit control. If no text is on the Windows Clipboard or the cursor is not in an edit control, this option is not available.


View Menu

See Also

This menu allows you to select what you want the Serv-U Administrator to show you, and allows you to refresh certain panels. The following list contains the View Menu options:

  Up

Move up one item in the left panel tree view.

  Refresh (F5)

Select this option to refresh the currently selected information. For example, if "Users" is selected, and Refresh is selected, the information about users is freshly retrieved from the server. This option is important especially for remote configuration or configuration where more than one person can be making configuration changes to the Serv-U Engine. By using Refresh you’ll be able to see any changes made since the last time refresh occurred.

Toggle Panels (F6)

This option switches focus from the left to right panel and back. This menu options is available to aid visually impaired users to help them easily and quickly navigate from one panel to the next.

Hide/show Left Panel (F7)

This option either hides or displays the left panel (tree panel). If the left panel is visible, it is hidden. If the left panel is not visible it is shown. This is particularly useful when the Administrator program is used on systems with limited screen resolution. Hiding the left panel allows more space for the right panel.

Hide/show Right Panel (F8)

This option either hides or displays the right panel (configuration panel). If the right panel is visible, it is hidden. If the right panel is not visible it is shown.

Splash Screen

Toggles between showing the splash screen when the Administrator program is started, and not showing it.

Toolbar

Toggles between showing and hiding the toolbar at the top of the Administrator window. The toolbar is shown by default.

Status Bar

Toggles between showing and hiding the status bar at the bottom of the Administrator window. The status bar is shown by default.

Menu Images

This option enables or disables small images (like those used in the toolbar) in menus. Some screen readers for the visually impaired are unable to read the menus when menu images are used. For that reason menu images are not shown be default. The Setup Wizard which runs when the Administrator program is started for the first time will ask if menu images should be shown or not.

Tray Icon

This option enables or disables the Tray Icon for Serv-U. When the tray icon is enabled it will automatically start each time the computer is started. To stop the Tray Icon from starting automatically it has to be disabled by using this option.


Window Menu

See Also

This menu allows you to perform Window operations. Currently only one Window Menu option exists:

Messages (F2)

Select this option to view the User Messages Window. This window allows Serv-U users, connected to your server, to send you messages (i.e., the system administrator). You can reply by using broadcast messages or individual user messages.


Help Menu

See Also

This menu is used to gain access to informational resources for Serv-U, registration information, and other useful information. The following list contains the Help Menu options:

Serv-U Help (F1)

Select this option to read context sensitive help about what you have selected in the main window. You can press F1 any time in any of the panels and tabs, it will bring up the appropriate help topic.

  Contents and Index (Shift+F1)

Select this option to open the Help Contents and Help Index window for Serv-U. When this window appears you may select the help information you desire.

Getting Started

Select this option to go to the "Getting Started " section of this help file.

Serv-U on the Web

The following menu options will give you the most current information about Serv-U through the Internet.

Home Page

This option brings you to the Serv-U home page http://www.Serv-U.com/. The Serv-U home page is the place to go for the most recent information, news, and releases of Serv-U.

Knowledge Base

This option opens your web browser and takes you to the Serv-U Knowledge Base or FAQ section on the Serv-U web page.

Support Section

This option opens your web browser to the Serv-U support section on the Serv-U web page. For other support options, click here.

Feedback

Use this option to provide RhinoSoft.com and the Serv-U developers with feedback about Serv-U, our service, or anything else that is on your mind.

Lost Registration ID

If you need to find back your registration ID this option will bring you to the Serv-U Lost ID web page.

Upgrades

This option visits the Serv-U Update Checker web page. Use this option to check if you are using the most current version of Serv-U. When selected the Serv-U Update Checker will also tell you where you can get an update.

 Purchase Electronically

Use this option to purchase Serv-U using your web browser. When selected you can purchase using a credit card, check, money order, or wire transfer.

Pricing Information

When selected your web browser opens taking you to the Serv-U pricing page on the Serv-U web page. Here you will find the current pricing for Serv-U.

Contact Sales

This option opens up your E-mail program ready for a message to the Serv-U sales department.

Contact Support

Use this option to send an E-mail message to the support department for Serv-U.

Local IP address

Use this option to display a list of the IP addresses available on this computer.

  About Serv-U

This option displays copyright and version information about Serv-U.


Servers Menu

See Also

This menu appears when "Serv-U Servers" is selected in the left tree panel. This menu allows you to manage the servers you want to administer. The following are the Servers Menu options:

  New Server

This option allows you create a new server-entry to manage remotely. After selecting this option you are prompted to enter the information about the server.

  Delete Server

This option deletes the selected server-entry. If a server is selected in the FTP Servers Tab this option is available. If none exist or none is selected, this option is unavailable.


Server Menu

See Also

This menu appears when a server-entry is selected in the left tree panel. This menu allows you to manage the connection to the server, delete, or modify the server. The following shows the Server Menu options:

  Connect

When the selected server-entry is not connected to the Serv-U Administrator, this option is available. Select this option to connect to the selected server.

  Disconnect

When the selected server-entry is already connected to the Serv-U Administrator, this option is available. Select this option to disconnect from the selected server.

  Delete

Select this option to delete the selected server-entry from the left tree panel. Deleting the server-entry does not disable or stop the Serv-U Engine; it simply removes it from the Serv-U Administrator tree panel.

  Restore

This option resets the right panel’s settings. Use this command when you don’t want to use the changes you have made in any configuration panel. This option is unavailable when no changes have been made.

  Apply

This option sends your changes to the Serv-U Engine. Use this option to make your changes on the Serv-U Engine. This option is unavailable when no changes have been made.


Settings Menu

See Also

This menu appears when "Settings" is selected for a server or for a domain. This menu allows you to restore or apply any changes you make in the right configuration panel. The following shows the Setup Menu options:

  Restore

This option resets the right panel’s settings. Use this command when you don’t want to use the changes you have made in any configuration panel. This option is unavailable when no changes have been made.

  Apply

This option sends your changes to the Serv-U Engine. Use this option to make your changes on the Serv-U Engine. This option is unavailable when no changes have been made.


Activity Menu

See Also

The Activity Menu appears when "Activity" is selected in the left tree panel. The contents of this menu depend on which item is being monitored in the right configuration panel. The following shows the Activity Menu options:

Users

The Users tab in the Activity tree item allows you to monitor and communicate with selected users. The following are the Users Activity Menu options:

  Reload Info

When this option is selected the user information for the selected server or domain is reloaded or updated.

  Send Message

This option allows you to send a message to the selected user. Not all FTP clients support this feature, so there’s no guarantee that the user receives the message.

  Broadcast

This option allows you to send a message to all users for the selected server or domain. Not all FTP clients support this feature, so there’s no guarantee that the user receives the message.

  Stop Transfer

This option stops the selected user’s file transfer. This option is not available if the user is performing no transfers or no user is selected.

  Kill User

This option disconnects the user from the server. Use with care since this is an abrupt disconnect and it will interrupt whatever the user is doing.

  Spy on User

Use this option to "spy" on the selected user. When this option is selected a spy tab appears for the user allowing you to watch what the user is doing.

Blocked IPs (Server Only)

The Blocked IPs tab in the Activity tree item allows you to monitor blocked IP address, the number of connection attempts, and the number of seconds before the IP address is allowed again. The following are the Blocked IPs Activity Menu options:

  Reload List

When this option is selected the Blocked IPs information for the selected server or domain is reloaded or updated.

  Add IP

This option adds an IP address to the IP access list for a server. When selected you are prompted to enter the IP address and other information.

  Remove IP

This option removes the selected IP address from the list of blocked IPs.

  Flush

This option removes all items in a list. Use with care because all items in the list are removed and all the previously blocked IPs are allowed to connect again. This option cannot be undone.

Session Log & Domain Log

The Session Log or Domain Log tab in the Activity tree item allows you to monitor the session and domain logs. The following are the Session Log Activity and Domain Log Activity Menu options:

  Reload (session log only)

When this option is selected the Session Log information for the selected server or domain is reloaded or updated.

  Filter

This option allows you to filter information from a text window based on the content. After selecting this option you are prompted for the information you want to see.

  Copy

This option performs a Windows "copy" operation. By using this option when text is selected, the text is copied to the Windows Clipboard.

  Clear (domain log only)

This option removes all text from the domain log. Using "Refresh" (F5) will bring the information back again.

Spy

The Spy tab in the Activity tree item allows you to monitor a user’s activity. The following are the Spy Activity Menu options:

  Copy

This option performs a Windows "copy" operation. By using this option when text is selected, the text is copied to the Windows Clipboard.

  Clear

This option clears the text from the spy window.

  Send Message

This option allows you to send a message to the selected user. Not all FTP clients support this feature, so there’s no guarantee that the user receives the message.

  Stop Transfer

This option stops the selected user’s file transfer. This option is not available if the user is not performing a transfer.

  Kill User

This option disconnects the user from the server. Use with care since this is an abrupt disconnect and will interrupt whatever the user is doing.

  Close Spy

This option closes the Spy tab.


Domains Menu

See Also

This menu appears when "Domains" is selected for a server. This menu allows you to add and delete domains for the selected server. The following shows the menu options:

  New Domain

This option creates a new domain for the selected server. When selected you will be prompted to answer questions about the new domain.

  Delete Domain

This option removes the selected domain in the Domains Tab. Use with care! Once deleted, everything stored for that domain is removed including user and group settings.


Domain Menu

See Also

This menu appears when a domain is selected in the left tree panel. This menu allows you to manage the connection to the domain, delete, or modify the domain. The following shows the Domain Menu options:

  Apply

This option sends your changes to the Serv-U Engine. Use this option to make your changes on the Serv-U Engine. This option is unavailable when no changes have been made.

  Delete Domain

Select this option to delete the selected domain from the left tree panel. Deleting the domain deletes and disables the domain in the Serv-U Engine.

  Reload Accounts From Database

In case the domain is stored in an ODBC database this option will re-initialize the database coupling and reload all user and group accounts from the database.

  Restore

This option resets the right panel’s settings. Use this command when you don’t want to use the changes you have made in any configuration panel. This option is unavailable when no changes have been made.


Users Menu

See Also

The Users Menu appears when "Users" is selected in the left tree panel. This menu allows you to add, delete, and copy user settings. The following shows the Users Menu options:

  New User (Ins)

This option creates a new user and adds the new user to the left tree panel under the "Users" selection and in the Users Tab. After selecting this option you are presented with a series of questions about the new user.

  Delete User (Del)

This option deletes the selected user when a user is selected in the Users Tab. After selecting this option, you are prompted whether or not you’re sure you want to delete.

  Copy User

This option makes a copy of the currently selected user when a user is selected in the Users Tab. The new user is added to the Users Tab. This option is useful for quickly creating new user accounts from templates or other accounts.


User Menu

See Also

The User Menu appears when a user is selected in the left tree panel. This menu allows you to delete the user, make a copy of the user, and apply user changes. The following shows the User Menu options:

  Delete User (Del)

This option deletes the selected user from the left tree panel. After selecting this option, you are prompted whether or not you’re sure you want to delete.

  Copy User

This option makes a copy of the selected user and adds it to the end of the users listed in the left tree panel. This is a quick way to generate new user accounts from either existing users or user template accounts.

  Restore

This option resets the right panel’s settings. Use this command when you don’t want to use the changes you have made in any configuration panel. This option is unavailable when no changes have been made.

  Apply

This option sends your changes to the Serv-U Engine. Use this option to make your changes on the Serv-U Engine. This option is unavailable when no changes have been made.


Groups Menu

See Also

The Groups Menu appears when "Groups" is selected in the left tree panel. This menu allows you to add, delete, and copy group settings. The following shows the Groups Menu options:

  New Group (Ins)

This option creates a new group and adds the new group to the left tree panel under the "Groups" selection and in the Groups Tab. After selecting this option you are presented with a series of questions about the new group.

  Delete Group (Del)

This option deletes the selected group when a group is selected in the Group Tab. After selecting this option, you are prompted whether or not you’re sure you want to delete.

  Copy Group

This option makes a copy of the currently selected group when a group is selected in the Groups Tab. The new group is added to the Groups Tab.


Group Menu

See Also

The Group Menu appears when a group is selected in the left tree panel. This menu allows you to delete the group, make a copy of the group, and apply group changes. The following shows the Group Menu options:

  Delete Group (Del)

This option deletes the selected group from the left tree panel. After selecting this option, you are prompted whether or not you’re sure you want to delete.

  Copy Group

This option makes a copy of the selected group and adds it to the end of the groups listed in the left tree panel.

  Restore

This option resets the right panel’s settings. Use this command when you don’t want to use the changes you have made in any configuration panel. This option is unavailable when no changes have been made.

  Apply

This option sends your changes to the Serv-U Engine. Use this option to make your changes on the Serv-U Engine. This option is unavailable when no changes have been made.


Configuration Tabs

See Also

All server setup is performed through the right-hand panel which changes content upon selecting a different entry in the tree in the left panel. The right hand panels all consist of tabs, sometimes a single one, sometimes multiple. The following is an overview of the Serv-U Administrator tabs.

FTP Servers

Show all local and remote Serv-U servers available for administration.

FTP Server

Set (remote) administration parameters, start/stop a server.

License

Display trial or registration information.

Domains

Show all domains available on a server, create new domains or delete them.

Users

Show all users for a domain, create new users or delete them.

Groups

Show all groups for a domain, create new groups or delete them.

Server Settings - General

Server Settings - SSL Certificate

Server Settings - Dir Cache

Server Settings - Advanced

Set server-wide parameters such as user limit, directory listing cache, socket parameters and file-locking parameters.

Activity - Users

Activity - Blocked IPs

Activity - Session and Domain Log

Activity - Spy

Monitor what is happening on a server, either at the server level or domain level. Kick and ban users, send messages to users, block users, view user session details, and view server and domain logs.

Domain Parameters - Domain

Domain Parameters - ODBC

Domain Parameters - Dynamic DNS

Set parameters for the domain, such as port number, IP address, use of SSL/TLS, database parameters in case of ODBC storage, and use of a dynamic DNS service.

Domain Settings - General

Domain Settings - IP Access

Domain Settings - Messages

Domain Settings - Logging

Domain Settings - UL/DL Ratios

Domain Settings - Advanced

Setup for a ‘virtual FTP server’. Set domain-wide parameters such as virtual directories, domain access by IP address, FTP messages that are sent to users, and domain logging.

User - Account

User - General

User - Dir Access

User - IP Access

User - UL/DL Ratios

User - Quota

User account settings such as user name and password, home directory, directory and IP access rules, upload/download ratios and disk quota limitations.

Group - Account

Group - Dir Access

Group - IP Access

Group account settings such as directory and IP access rules.


FTP Servers

See Also

The FTP Servers tab appears when "Serv-U Servers" is selected in the left tree panel. This tab shows a list of all of the Serv-U server-entries that the Serv-U Administrator knows about for administration. When selected the Servers Menu appears on the menu bar.

Servers also appear under "Serv-U Servers" in the left tree panel. To configure or monitor any server, either click on the server name in the left tree panel, or double click on the server in the FTP Servers tab.

The entry named "<< Local Server >>" is a special one that is automatically added to the list when the Administrator sees there is a Serv-U Engine installed on the same PC as the Administrator program is running on. Double click on it to set up or monitor your local FTP server. If the local server is not running yet this will also start the server.

Note that creating or deleting entries in the FTP Servers tab neither creates nor deletes actual FTP servers. The entries in this tab are merely links to those FTP servers for administrative purposes.


FTP Server

See Also

When an FTP server is selected, the FTP Server tab appears in the right configuration panel. From this panel you may configure the Serv-U Administrator connection to the server. If connecting to the "Local Server" running on the same machine, you can also start and stop the server. The local server tab is somewhat different from the remote server tab, as many of the entries are not needed for connecting to the local server.

When connected to a server the lower-right corner of this tab will show the build number of the server. This can be helpful information when you need technical support. The following shows the fields in this tab:

Start Automatically (system service)

This checkbox is only available for the local server. Check it to make the local server start automatically  as soon as the PC is started, and to keep the server running even when PC users log out of the PC and back in again.

Name

Enter the name of the server. The name is a descriptive field that allows you to describe the server in the Serv-U Administrator. By default the local server is named "<< Local Server >>", this cannot be changed.

FTP server IP address or name

Enter the IP address or name of the server. If you enter a name instead of an IP address, that name will need to resolve to an IP address. For example, you might enter "ftp.Serv-U.com" which has a DNS entry resolving to an IP address. The value for the "<< Local Server >>" is always 127.0.0.1 and this cannot be changed (This is a special IP address that always points to the local PC).

Account name

Enter the user account name to configure the server. The "<< Local Server >>" default user name is "LocalAdministrator" and this cannot be changed. For any remote server, use a valid user account name that exists on the remote server. The user must have some administrative privilege to configure the server or you will not be able to log in to the remote server. See the user account setup for more information about users and user privileges.

Account password

Enter the user’s password here. You may use any value here when configuring "<< Local Server>>". For any remote server, use a valid password that belongs to the user account.

Save password

Select this option to save the password between connections. When the password is saved on your computer it is saved in a somewhat encrypted format to keep it from prying eyes. If you want absolute security then do not save the password.

FTP server port

The Administration port is used to connect to the server. For "<< Local Server >>" this value will vary and is configured automatically. For any remote server it should be the same as the port number you use for logging in to that server, i.e. the normal FTP command socket port. For most servers this will be port 21 (the default for FTP). Do not change this value unless you are sure what you are doing.

Use SSL to encrypt communications

When this option is enabled the Administrator program uses strong SSL encryption to talk to the Daemon. This makes it impossible to listen in to the conversation between Administrator and Daemon.  The advantage of switching on SSL encryption is security, the disadvantage is overhead and speed. SSL communications are much slower and have much more overhead than plain-text communications.

Start/Stop Server

This button lets you start the FTP server (local server only) or stop a server. For remote servers the stop button is only visible when the Administrator program is connected to the server. When connected to the server the stop button will present a dialog box with choices how and when the server should be stopped. For the local server these choices are only visible when the Administrator program is connected to the local server.

The Stop Server dialog box looks as follows:

Stop server immediately

Stops the server and causes the Engine task to exit. This option does not wait for users to complete what they are doing. Use this option with care! This option will cut off any ongoing data transfers and for a remote server you will not have any way to restart the server through the Administrator program.

Stop server after all users have logged off

This option waits until all users have completed what they are doing and have logged off before the server is stopped. The Engine task exits after that. This means you will not have any way to restart the server through the Administrator program if this is a remote server. New FTP users connecting to the server will see a message indicating the server is about to go down.

Stop server after all transfers have completed

This option waits until all file transfers have before the server is stopped. The Engine task exits after that. This means you will not have any way to restart the server through the Administrator program if this is a remote server. New FTP users connecting to the server will see a message indicating the server is about to go down.

Put server offline, server keeps running

For remote servers it may not be a good idea to completely stop them since the Administrator program cannot restart the server. For this it may be more useful to just put the server offline. Putting the server offline does not affect existing FTP users or ongoing transfers, they can continue their FTP session. Only new users connecting to the FTP server will see a message indicating the server is offline.

Cancel pending server stop or go online

Use this option to undo a pending server stop or to put the server back online after it has been placed offline.


License

See Also

The License tab allows you to view or enter your license information. To purchase a license for Serv-U visit our purchase page at http://www.Serv-U.com/purchase.htm. Without a license Serv-U will work for 30 days in Corporate Edition trial mode. After that it will continue to work, but as Personal Edition with certain limitations. Also see the information on registering Serv-U for more about purchasing a license.

Enter Key

This button is only needed if you need to enter a new registration key while there is already a valid key present. Normally Serv-U will look at the Windows clipboard for a registration key as soon as you select the License tab and if no key has been entered yet in Serv-U while one is present on the clipboard it will automatically enter the key. However, if you need to enter a new key, for example because you update protection license has expired and you purchased a new one, this is the button to use. If a valid key is present on the Windows clipboard, pressing this button will enter it. If no key is found on the clipboard this button will bring up a dialog box to enter a key.

Register

This button is only visible when no registration is present. Press this button to open up a Web browser and go to the Serv-U registration page. The registration page has pricing information, both for single copies as well as multi-copy licenses and lets you purchase a registration key through a secure Web site.

Copy Key

This button is visible when a registration key is present. Use this button to place a copy of the registration key on the Windows clipboard. From there you can use the "paste" option in a text editor (for example using Notepad) to create a backup file of your registration key.

Remove Key

This button is visible when a registration key is present. Normally one only needs this if an invalid or expired registration key is present in the server. Pressing this button removes the registration key. Before proceeding it will ask you if you are sure you want to remove the key.


Domains

See Also

The Domains tab shows all of the configured domains for the selected server. When "Domains" is selected in the left tree panel the Domains tab appears in the right panel and the Domains Menu appears in the menu bar. Double click on any defined domain to configure the domain and open the Domain tab.

From this tab you can create new domains or delete existing ones. Domains also appear under Domains in the left tree panel.


Domain (Domain Parameters)

See Also

The Domain tab appears when a domain is selected in the left tree panel. When this tab is active the Domain Menu also appears allowing you to configure the selected domain. The following shows the Domain tab fields.

Name

Enter a descriptive name for the domain. This name will be used to help you identify the name of the server.

Domain IP address

Enter the IP address on which to accept connections. If you may limit this to a single IP address, or you may use all available IP addresses. Normally you would enter an IP address here only if you intend to use multiple domains on this computer and have more than one IP address in use on this computer.

If your PC has a "dynamic IP address", i.e. one that changes each time you connect to the Internet, leave this entry blank.

Each domain on the same FTP server needs to have a unique combination of IP address and port number. If you have multiple domains on your server this is a restriction to keep in mind. Unlike the HTTP protocol there is no ‘header’ with information on the user’s intent. This means it is not possible to create ‘virtual’ domains as is customary with Web servers where multiple domains share the same IP/port combination, since the FTP server has no way to determine what domain the FTP user intended to connect to. Serv-U does allow you to create one domain that responds to all available IP addresses in addition to IP-specific domains that use the same port number. When connections are made to this IP address the server will first look if there is a domain with an exact IP/port match to the incoming connection and route the FTP user to this domain, if no exact domain is found the user is routed to the domain that uses all available IP addresses.

Domain type

Select how you would like the domain information to be stored. If the information is stored in a .INI file then it is easy to manipulate using a text editor or to move to different computers. If it is stored in the registry, it is faster for large numbers of users. For .INI file storage the default used by Serv-U is in file ServUDaemon.ini, in the Serv-U directory.

On Windows 95/98/ME there is a limit of 64Kb for .INI files. You normally need hundreds of users to reach this limit, and storing the domain information in the registry is a way to get around this limit. On NT and Windows 2000/2003 there is no limit to the size of .INI files, but Windows gets slower and slower in handling .INI files as they get larger. If the ServUDaemon.ini file size on your system reaches several hundred Kb it is time to store domains in the registry.

When stored in the registry the entries are located at:

\HKEY_LOCAL_MACHINE\Software\Cat Soft\Serv-U\Domains\

The third option is to store user and group accounts in an ODBC database (Corporate Edition only). When this option is selected a tab appears to specify the ODBC data source. Database storage means accounts can be added/edited/deleted through the Administrator program as well as directly by a database management program. It is fast, and there is no limit to the number of accounts that can be stored.

Security

This selection determines what type of connections the server will accept. The choices are between regular, unencrypted FTP and secure-FTP through the use of SSL/TLS. Make sure to review the section about creating your own server certificate before using secure-FTP!

Regular FTP only, no SSL/TLS sessions

This is the default, and also the only option if your server is not enabled to use SSL/TLS (as determined by the Edition of your server). The domain will not accept SSL sessions even if SSL/TLS is available to the server. The only exception to this is for remote administration sessions, those will always use SSL if it is available.

Allow SSL/TLS and regular FTP sessions

This option is also called explicit secure-FTP. The domain will allow regular FTP sessions without encryption as well as encrypted FTP sessions using SSL/TLS. The FTP client determines if it wants the session to be encrypted or not by sending the AUTH command to the server to switch to using SSL.

Allow only SSL/TLS sessions

This option is also called implicit secure-FTP. The domain accepts encrypted FTP sessions only, through the use of SSL/TLS. As soon as the client connects to the server it uses encryption, regular FTP sessions are not accepted. Instead of port 21 for regular FTP sessions implicit secure-FTP uses port 990 by default.

FTP port number

The FTP port number is the port number that Serv-U uses to listen for connections. The standard FTP command port is port 21 for regular FTP and port 990 for implicit secure-FTP connections. Normally you would not change this value. However you would change it for many different reasons including security and for supporting many different servers on the same computer with a single IP address. In the case where you change this port number to something other than port 21 for regular FTP or port 990 for implicit secure-FTP, anyone connecting to this server will need to know the port number.

Enable dynamic DNS

If your IP address changes each time you connect to the Internet you can use the dynamic DNS service to obtain a fixed symbolic IP name (such as "yourname.DNS4Me.com"). Your users can then use the fixed IP name to connect to your FTP server. Check this box to enable dynamic DNS use. Doing so will show the DNS tab, for setting up the dynamic DNS parameters.

With dynamic DNS enabled Serv-U will automatically keep your Internet IP address current. Serv-U will also take care of automatically adjusting the IP address for passive mode data transfers.

Put domain online/offline

This button lets you quickly put the domain online or offline. When offline the existing connected users can continue what they are doing, but new connections to the domain are refused. Putting a domain offline can come in handy in case maintenance needs to be done on the domain’s files.


Domain ODBC (Domain Parameters)

See Also

Serv-U can store user and group accounts in a relational database. Any database will work, as long as there is an ODBC connector for it. When a domain is created with ODBC storage this tab is visible. In it you tell Serv-U how it should connect to the ODBC data source and what setup items are available from that data source.

Serv-U has been tested with a number of popular data sources, including the powerful freeware MySQL server, MS SQL Server, and MS Access. Sample databases, corresponding Serv-U settings, and utilities are available from the Add-On pages on the Serv-U Web site:

http://www.serv-u.com/addons.asp

The way Serv-U uses an ODBC data source is very flexible. Tables and columns can be named any way you wish, as little as just username/password/home directory/access can be stored in a single table, or as much as every setup option available for accounts, and within reason database data types are automatically mapped to Serv-U’s types.

There are two options in the domain’s Advanced settings tab that can be of particular use to ODBC domains. In case passwords should be stored in clear-text rather than the default encrypted format, uncheck the ‘Store passwords in encrypted form’ option. The other option is ‘Account cache time-to-live’. This sets the number of seconds Serv-U should cache the user or group information before re-reading it from the database. The default for ODBC domains is 60 seconds. This means it can take up to 60 seconds before the server sees any changes made to the database accounts by external programs. Lowering this value means changes are seen more rapidly by the server. The downside of this is increased database access and overhead.

Reload Accounts From Database

Pressing this button makes Serv-U disconnect from the data source, reconnect, and re-read account information. All cached account information is discarded. In case of changes to the database this is the way to make Serv-U quickly aware of them.

ODBC Database Coupling Settings

While the list on this tab seems long and intimidating, it is actually straightforward and easy to set up. The list consists of three sections: The first section is about ODBC data source access, the second section specifies table names of the ODBC data source, and the third section spells out the column names Serv-U should couple with to get and set account information.

In case Serv-U cannot properly connect to the data source the domain will be placed offline. This can be recognized by a red slash through the domain name in the left pane. If this happens, more information can be obtained, including the exact ODBC error, by looking at the Server session log.

Data Source Access

The first three entries on the list deal with connecting to an ODBC data source (or DSN, to use ODBC parlance). To use any database, you first need to create a DSN through the "Data Sources (ODBC)" applet in Control Panel. The configuration for each DSN is specific to the database that is being used; please refer to the database’s documentation for this.

The following entries are part of the data source access section:

ODBC source name

Name of the ODBC data source (DSN name as you set up it in the ODBC Data Source Administrator. This field cannot be left blank.

ODBC account name

Name of an account to access the underlying database that is being used as the ODBC data source. Can be left blank if anonymous access is used to the database. Keep in mind that the account name is case sensitive on many data sources.

ODBC account password

Password for the database account. Only needed if a password is necessary to log into the database. Keep in mind that passwords are almost always case sensitive on data sources.

Table Names

The table names tell Serv-U what tables should be used by Serv-U to store account information. The minimum is to have a single table, for user accounts. All the other tables are optional. Tables need to exist before they can be used in Serv-U, the server does not create any tables. The following entries are part of the table names section:

Table name of users

Name of the database table containing user accounts. This entry is always needed. In case you only need a single access rule, no IP access rules, and no groups, this is the only entry that is needed.

Table name of groups

Name of the database table containing group accounts. This entry is optional, and only needed in case groups are needed.

Table name of user dir access rights

Name of the database table containing user directory access rules. This entry is optional, and only needed in case there is no field to store a directory access rule in the user table, or more than one rule is needed per user account.

Table name of group dir access rights

Name of the database table containing group directory access rules. This entry is optional, and only needed if groups are supported, there is no field to store a directory access rule in the group account table, and/or more than a single directory access rule is needed per group account.

Table name of user IP access rights

Name of the database table containing user IP access rules. This entry is optional, and only needed in case IP access rules need to be stored for user accounts.

Table name of group IP access rights

Name of the database table containing group IP access rules. This entry is optional, and only needed in case IP access rules need to be stored for group accounts.

Column Names

To couple Serv-U’s internal variables to data source fields the database column names need to be specified in the columns names section. Most of these entries are optional, only a few are required. It depends on how simple or complex you want to make your account setup. If fields are not present Serv-U will not be able to store or use that corresponding account feature. Instead the default is used in that case, defaults are always sensible and secure, i.e. the default will not allow undue access. The fields specified here need to exist in the database, Serv-U does not create them.

The minimums needed are a single table for user accounts, with fields for account name, password, home directory, and directory access. If multiple tables are present the column names are shared between columns. This means that the database tables for, say, user accounts and user directory access rules need to use the same name for the account fields in both. The same is true for several other column names. To support all Serv-U features a total of 6 tables are needed: A user accounts table, a group accounts table, a user directory access rules table, a group directory access rules table, a user IP access rules table, and a group IP access rules table.

These are the table structures for the various database tables:

User accounts table

User accounts table - Continued

Group accounts table

User/Group directory and IP access rules tables

Now on to the list of column name entries and a description of each one of them:

Column name of dir/IP access rules index no.

This field is used in directory and IP access rules tables for both users and groups. It serves to allow multiple rules per user, the first rule has index no. 1, the second rule 2 etc. This entry is only needed in case there are directory or IP access rule tables, and required if that is the case. The field should be an integer, 8 bit is sufficient. It should be indexed and part of the primary key of the access rules tables (together with the account name field).

Column name of account name

This field is used in all tables and is required. It is used for the user and group account names fields in all tables. It is a character field, length depends on what length is needed for account names, 50 characters is suggested. This field should be indexed and is the primary key for the users and groups tables, and part of the key for access rules tables (together with the index number field).

Column name of password

This field is used in the user accounts table and it is required. It is used to store either the encrypted or clear-text account passwords. It is a character field, a length of 50 characters is suggested.

Column name of password type

This field is used in the user accounts table and it is optional. It is a (small) integer field with the following values:

0 = regular password

1 = S/KEY one-time-password using MD4

2 = S/KEY one-time-password using MD5

Column name of allow change password

This field is used in the user accounts table and it is optional. It is used to tell Serv-U if the user should be allowed to change password through the FTP client program (TRUE) or not (FALSE). It is a boolean field, or if the underlying database doesn’t support true boolean (as in MySQL) a 2 bit integer will work.

Column name of S/KEY settings

This field is used in the user accounts table and it is optional. It is used to store internal bookkeeping for S/KEY passwords and is only needed in case accounts use S/KEY passwords. No value should be set directly by the database, Serv-U updates this field by itself. It is a character field, minimum length should be 50 characters.

Column name of dir/IP access rule

This column name is used for several database fields: First, the user or group directory access rule field, in both the accounts and directory access rules tables. Second, the IP access rule field in both the user and group IP access rules tables.

For directory access rules

This field can be present in either the user accounts table or user directory access rules table, similarly, if there are groups, it needs to be present in either the group accounts table or group directory access rules table. If it is present in both the accounts table and access rules table then the first directory access rule will be stored in the accounts table and all subsequent rules go into the access rules table. If there is no access rules table then only one access rule is supported for the user or group accounts. This is a character field, length depends on what is needed for paths, 200 characters is suggested. This field has the following syntax:

<full path> | <access>

with <access> :

R = read access

W = write access

A = append access

M = modify access

C = create directory access

D = delete directory access

L = list directory access

E = execute program access

P = inherit rule to sub-directories

For IP access rules

If there is a user or group IP access rules table this field is required. It contains the actual IP access rule. This is a character field, a length of 17 characters or more is required. IP addresses can be both numerical as well as symbolic (textual). The address can contain wildcards in the form of ‘*’ and ‘?’. The syntax is as follows:

<access> | <IP name or address>

with <access>:

A = allow access

D = deny access

Column name of home directory

This field is used in the user accounts table and is required. It contains the user’s home directory. This is a character field, length depends on what is needed for paths, 200 characters is suggested.

Column name of administrative privilege

This field is used in the user accounts table and is optional. It tells the server what, if any, administrative privilege the account has. This is a (small) integer field with the following values:

0 = no privilege

1 = system administrator privilege

2 = group administrator privilege

3 = domain administrator privilege

4 = read-only administrator privilege

Column name of login message file

This field is used in the user accounts table and is optional. It contains the path of the login message file that is used to generate the login message reply. This is a character field, 200 characters length is suggested.

Column name of account enable/disable

This field is used in the user accounts table and is optional. It is used to disable (TRUE) or enable (FALSE) the account. It is a boolean field.

Column name of session encryption

This field is used in the user accounts table and is optional. Its value indicates whether a client can only use secure-FTP (TRUE) or if a regular plain-text session (FALSE) is sufficient. It is a boolean field.

Column name of lock user in homedir

This field is used in the user accounts table and is optional. When a user is locked (TRUE) he sees the root ‘/’ as his home directory and all paths are relative to the root. When not locked (FALSE) the user sees the full physical path. It is a boolean field.

Column name of hide hidden files

This field is used in the user accounts table and is optional. When enabled (TRUE) the user does not see files and directories that have the ‘hidden’ file attribute set. When disabled (FALSE) the user sees all files and directories. This is a boolean field.

Column name of always allow login

This field is used in the user accounts table and is optional. When enabled (TRUE) the user is allowed to log in even when the current user limit for the account or server is reached. When disables (FALSE) the user limit rules apply. This is a boolean field.

Column name of maximum concurrent users

This field is used in the user accounts table and is optional. This field sets the maximum number of concurrent client sessions using the particular user account. This is an integer field, 0 indicates there is no limit.

Column name of maximum uplink speed

This field is used in the user accounts table and is optional. It sets the maximum speed in the uplink direction, i.e. for uploads. This is an integer field, units are bytes/second and 0 indicates there is no limit.

Column name of maximum downlink speed

This field is used in the user accounts table and is optional. It sets the maximum speed in the downlink direction, i.e. for downloads. This is an integer field, units are bytes/second and –1 indicates there is no limit.

Column name of maximum users from IP

This field is used in the user accounts table and is optional. It determines if the same client (from the same IP address) can log in multiple times or not. This is an integer field. The number in the field sets how many times a client from the same IP can log in. A value of –1 indicates there is no limit.

Column name of idle time-out

This field is used in the user accounts table and is optional. It sets the time a session can be idle before the server forcefully disconnects the session. This is an integer field, the units are seconds, 0 indicates there is no limit.

Column name of session time-out

This field is used in the user accounts table and is optional. It sets the time a session can be connected to the server, regardless of activity. When the session time-out is up the session is disconnected forcefully. This is an integer field, the units are seconds, 0 indicates there is no limit.

Column name of enable quota

This field is used in the user accounts table and is optional. If disk quota support is needed this field needs to be present. When enabled (TRUE) the account has disk quota enforced, when disabled (FALSE) there is no disk quota management for the account. This is a boolean field.

Column name of current disk quota

This field is used in the user accounts table and is optional. If disk quota support is needed this field needs to be present. This is the number of currently used bytes of disk quota for the account. It is a 64-bit integer field. If only 32-bit integers are available in the underlying database, such as in MS Access, this can be used but disk quota will be limited to a maximum of around 2GB.

Column name of maximum disk quota

This field is used in the user accounts table and is optional. If disk quota support is needed this field needs to be present. This is the maximum number of bytes the account is allowed to use. It is a 64-bit integer field. If only 32-bit integers are available in the underlying database, such as in MS Access, this can be used but disk quota will be limited to a maximum of around 2GB.

Column name of ratio type

This field is used in the user accounts table and is optional. If ratio support is needed this field needs to be present. This field tells the server how ratios should be counted. This is a (small) integer field with the following values:

0 = no ratios

1 = count files-per-session

2 = count bytes-per-session

3 = count files-over-all-sessions

4 = count bytes-over-all-sessions

Column name of upload ratio

This field is used in the user accounts table and is optional. If ratio support is needed this field needs to be present. This field tells the server how many files/bytes should be uploaded to get XX downloads. This is an integer field.

Column name of download ratio

This field is used in the user accounts table and is optional. If ratio support is needed this field needs to be present. This field tells the server how many files/bytes can be downloaded per YY uploads. This is an integer field.

Column name of ratio credit

This field is used in the user accounts table and is optional. If ratio support is needed this field needs to be present. This field keeps track of the account’s current ratio credit in files or bytes. This is a floating point number field.

Column name of account expiration date

This field is used in the user accounts table and is optional. It specifies the date that the account should automatically be deleted. Any date during or before 1980 means the account should never be deleted. This is a date/time field.

Column name of member group names

This field is used in the user accounts table and is optional. It contains the groups the user account is a member of. This is a character field, a length of 80 characters is recommended. Syntax for this is:

<group> | <group> | <group> …

Column name of account notes

This field is used in the user and groups accounts table and is optional. It is used to contain miscellaneous notes for the system administrator. This is a character field, the length depends on the note length one wants to store.


Dynamic DNS (Domain Parameters)

See Also

The DNS tab only shows when dynamic DNS is enabled in the Domain tab. By setting up dynamic DNS your users can enter a fixed symbolic IP name (such as "yourname.DNS4Me.com") to connect to your FTP server, even if your IP address changes.

Serv-U will also take care of automatically adjusting the IP address reported back to FTP clients when they use the PASV command, which happens for passive mode data transfers. This will make life easier for you if your server is behind a firewall and your IP address is dynamic, i.e. it changes every so often, since you no longer have to update the address by hand in the domain’s Advanced settings tab.

Note:

For Serv-U to automatically update your passive mode IP passive mode transfers have to be allowed, and the "use IP" field on the domain’s Advanced settings tab has to be left blank.

IP name

Enter the symbolic IP name for your FTP server here, as reported by your dynamic DNS provider.  This is the IP name you give to others so they can connect to your FTP server.

IP address (read-only)

The IP address reported in this field is the current numerical Internet IP address. Regardless if the FTP server is behind a firewall or on a LAN, this will report the server IP address as seen from the Internet.

Tip

If your IP address changes regularly, or you do not have a fixed symbolic IP name, your life can be made much easier by signing up with a dynamic DNS provider. Not only will this take care of making Serv-U work even if the underlying server IP changes, it will also make it much easier for your friends to remember the address of your server. While there are many dynamic DNS providers there is one we especially recommend: DNS4Me. It is made by RhinoSoft, the same people that market Serv-U. DNS4Me is easy to use, gets the job done without undue complexity, and Serv-U has been tested with it. Give it a try!

http://www.DNS4Me.com/


Users

See Also

The Users tab shows all of the currently defined users for the selected Domain. When "Users" is selected the Users Menu appears allowing you to add and delete users from this list. Double click on any user to configure the user.


Groups

See Also

The Groups tab shows all of the currently defined groups for the selected Domain. When "Groups" is selected the Groups Menu appears allowing you to add and delete groups from this list  Double click on any group to configure the group.


General (Server)
General (Server Settings)

See Also

The General (Server) tab appears in the right configuration panel when Settings is selected for a Server. The following shows the configuration fields:

Max. upload speed

You may limit the upload network bandwidth that Serv-U will use by specifying maximum value here (in Kbytes-per-second). If left blank, the maximum available bandwidth will be used.

Max. download speed

This value limits the download network bandwidth that Serv-U will use by specifying maximum value here (in Kbytes-per-second). If left blank, the maximum available bandwidth will be used.

Max. no. of users

Sets maximum number of simultaneous users. A setting of 0 will allow no users, leaving this option blank will set no limit on the number of users.

Check anonymous passwords

'Netiquette' prescribes that users logging into an FTP server under the 'Anonymous' user name should use their E-mail address as their password. When this option is checked, Serv-U will check the passwords that anonymous users enter to log into the server. (These basic checks make sure the password resembles an e-mail address. No verification of valid e-mail addresses is done). If left unchecked the server will accept anything for the anonymous user's password.

Delete partially uploaded files

If checked, partially uploaded files that did not complete successfully are automatically deleted. By default, this is unchecked, so partial transfers can be resumed where they left off.

Use only lower case for files/dirs

For some operating systems it is easier to have to deal with only lower-case, in particular if the OS is case sensitive. Enabling this option will produce directory listings with only lower case for file and directory names and uploaded files with be stored using lower case.

Block anti time-out schemes

Many FTP client programs have an automatic mechanism that prevents users from being logged out after a certain inactivity time. When checked, Serv-U will count how long a user has been idle in a way that prevents client programs that periodically send automatic commands to the server from keeping idle connections open.

Block FTP_bounce attacks

When checked, the server will only allow file transfers between the FTP client and server, and block any direct server-to-server transfers (FXP). This prevents a type of malicious attack known as 'FTP_bounce attacks' (see CERT advisory CA-97.27).

Block users who connect more than XX times within YY seconds for ZZ minutes

Use this option to protect your FTP server from 'hammer attacks'. When enabled, users are blocked from connecting to your server in rapid succession. If they make more than XX connections within YY seconds their subsequent connections will be terminated immediately upon connection and they will be blocked for the next ZZ minutes. No message is sent to the user when he is blocked, which makes using this option very low overhead for the server. You can view blocked IPs and make changes to them in the Blocked IPs tab of the Activity panel.


SSL Certificate
SSL Certificate (Server Settings)

See Also

This tab only shows when SSL/TLS is enabled for your server, which in turn depends on the server Edition and registration key.

The certificate is used for secure-FTP connections and data transfers that use SSL/TLS. When a secure-FTP client connects an "SSL handshake" ensues. Its purpose is to establish the server’s identity, an encryption key for use during that session, and a specific cipher to encrypt the session data with. The SSL handshake works as follows: First, the client sends a list of ciphers it’s willing to support to the server. Next, the server chooses a cipher for use during the subsequent session and sends over its certificate together with a big random number. The certificate tells the client who the server is and it contains an encryption key, called the server’s "public key". The client also creates a large random number and encrypts this using the server’s public key from the certificate. Next the server decrypts the client’s message using its "private key" (that corresponds to the server’s public key). Both client and server now use the random values to create a unique "session key" for encryption of the subsequent session and from there on both sides use that key and the selected cipher to encrypt the rest of their session. That is the SSL handshake in a nutshell, somewhat simplified but it gets the idea across.

For secure Web servers a trusted third party, like Verisign that vouches for the server’s identity normally signs the server certificate. In the case of Serv-U’s certificate it is a "self signed" certificate, meaning it is signed by the server itself. This means it does not provide any guarantees for the server’s identity (since you can enter any values you like), but it does give the client a public key for encryption. Any time you make changes to the server’s certificate Serv-U automatically generates a new self-signed certificate with new, random, public and private keys for use by the server.

! IMPORTANT – IMPORTANT – IMPORTANT !

If you are going to use Serv-U for secure-FTP you must create your own server certificate. The server's private key needs to be a secret and the default key that gets installed is the same for every installation and thus no secret. To create your own certificate just enter your own certificate values and save them.

The following entries are part of the SSL certificate:

Common name

This should be set to the server’s IP name, or if no IP name is available the server’s IP address. The client normally checks if the certificate’s common name matches with the server’s IP name and will show a warning to the user if not.

E-mail

Set this to the E-mail address you want FTP clients to see.

Organization

Set this to the name of your company or organization, like "Cat Soft, LLC" or "RhinoSoft.com".

Unit
This should be set to the organizational unit that owns the certificate, like "Software" or "IT".

City/town

Set this to the city or town where you are located.

State/province

Set this to the state or province where you are located.

Country

This has to be the 2-letter abbreviation of the country where you are located (as defined in the ISO-3166 standard), like "US" for United States. Valid country codes are:

Afghanistan	AF

Albania	AL

Algeria	DZ

American Samoa	AS

Andorra	AD

Angola	AO

Anguilla	AI

Antarctica	AQ

Antigua and Barbuda	AG

Argentina	AR

Armenia	AM

Aruba	AW

Australia	AU

Austria	AT

Azerbaijan	AZ

Bahamas	BS

Bahrain	BH

Bangladesh	BD

Barbados	BB

Belarus	BY

Belgium	BE

Belize	BZ

Benin	BJ

Bermuda	BM

Bhutan	BT

Bolivia	BO

Bosnia and Herzegovina	BA

Botswana	BW

Bouvet Island	BV

Brazil	BR

British Indian Ocean Territory	IO

Brunei Darussalam	BN

Bulgaria	BG

Burkina Faso	BF

Burundi	BI

Cambodia	KH

Cameroon	CM

Canada	CA

Cape Verde	CV

Cayman Islands	KY

Central African Republic	CF

Chad	TD

Chile	CL

China	CN

Christmas Island	CX

Cocos (Keeling) Islands	CC

Colombia	CO

Comoros	KM

Congo	CG

Congo, The Democratic Republic Of The	CD

Cook Islands	CK

Costa Rica	CR

Côte D'ivoire	CI

Croatia	HR

Cuba	CU

Cyprus	CY

Czech Republic	CZ

Denmark	DK

Djibouti	DJ

Dominica	DM

Dominican Republic	DO

East Timor	TP

Ecuador	EC

Egypt	EG

El Salvador	SV

Equatorial Guinea	GQ

Eritrea	ER

Estonia	EE

Ethiopia	ET

Falkland Islands (Malvinas)	FK

Faroe Islands	FO

Fiji	FJ

Finland	FI

France	FR

French Guiana	GF

French Polynesia	PF

French Southern Territories	TF

Gabon	GA

Gambia	GM

Georgia	GE

Germany	DE

Ghana	GH

Gibraltar	GI

Greece	GR

Greenland	GL

Grenada	GD

Guadeloupe	GP

Guam	GU

Guatemala	GT

Guinea	GN

Guinea-Bissau	GW

Guyana	GY

Haiti	HT

Heard Island and Mcdonald Islands	HM

Holy See (Vatican City State)	VA

Honduras	HN

Hong Kong	HK

Hungary	HU

Iceland	IS

India	IN

Indonesia	ID

Iran, Islamic Republic Of	IR

Iraq	IQ

Ireland	IE

Israel	IL

Italy	IT

Jamaica	JM

Japan	JP

Jordan	JO

Kazakstan	KZ

Kenya	KE

Kiribati	KI

Korea, Democratic People's Republic Of	KP

Korea, Republic Of	KR

Kuwait	KW

Kyrgyzstan	KG

Lao People's Democratic Republic	LA

Latvia	LV

Lebanon	LB

Lesotho	LS

Liberia	LR

Libyan Arab Jamahiriya	LY

Liechtenstein	LI

Lithuania	LT

Luxembourg	LU

Macau	MO

Macedonia, The Former Yugoslav Republic Of	MK

Madagascar	MG

Malawi	MW

Malaysia	MY

Maldives	MV

Mali	ML

Malta	MT

Marshall Islands	MH

Martinique	MQ

Mauritania	MR

Mauritius	MU

Mayotte	YT

Mexico	MX

Micronesia, Federated States Of	FM

Moldova, Republic Of	MD

Monaco	MC

Mongolia	MN

Montserrat	MS

Morocco	MA

Mozambique	MZ

Myanmar	MM

Namibia	NA

Nauru	NR

Nepal	NP

Netherlands	NL

Netherlands Antilles	AN

New Caledonia	NC

New Zealand	NZ

Nicaragua	NI

Niger	NE

Nigeria	NG

Niue	NU

Norfolk Island	NF

Northern Mariana Islands	MP

Norway	NO

Oman	OM

Pakistan	PK

Palau	PW

Palestinian Territory, occupied	PS

Panama	PA

Papua New Guinea	PG

Paraguay	PY

Peru	PE

Philippines	PH

Pitcairn	PN

Poland	PL

Portugal	PT

Puerto Rico	PR

Qatar	QA

Réunion	RE

Romania	RO

Russian Federation	RU

Rwanda	RW

Saint Helena	SH

Saint Kitts and Nevis	KN

Saint Lucia	LC

Saint Pierre and Miquelon	PM

Saint Vincent and The Grenadines	VC

Samoa	WS

San Marino	SM

Sao Tome And Principe	ST

Saudi Arabia	SA

Senegal	SN

Seychelles	SC

Sierra Leone	SL

Singapore	SG

Slovakia	SK

Slovenia	SI

Solomon Islands	SB

Somalia	SO

South Africa	ZA

South Georgia and The South Sandwich Islands	GS

Spain	ES

Sri Lanka	LK

Sudan	SD

Suriname	SR

Svalbard and Jan Mayen	SJ

Swaziland	SZ

Sweden	SE

Switzerland	CH

Syrian Arab Republic	SY

Taiwan, Province Of China	TW

Tajikistan	TJ

Tanzania, United Republic Of	TZ

Thailand	TH

Togo	TG

Tokelau	TK

Tonga	TO

Trinidad and Tobago	TT

Tunisia	TN

Turkey	TR

Turkmenistan	TM

Turks and Caicos Islands	TC

Tuvalu	TV

Uganda	UG

Ukraine	UA

United Arab Emirates	AE

United Kingdom	GB

United States	US

United States, minor outlying islands	UM

Uruguay	UY

Uzbekistan	UZ

Vanuatu	VU

Vatican City State, see Holy See

Venezuela	VE

Viet Nam	VN

Virgin Islands, British	VG

Virgin Islands, U.S.	VI

Wallis and Futuna	WF

Western Sahara	EH

Yemen	YE

Yugoslavia	YU

Zaire, see Congo, The Democratic Republic Of The

Zambia	ZM

Zimbabwe	ZW


Dir Cache
Dir Cache (Server Settings)

See Also

Creating a directory listing is a slow process for the server: It has to access the disk, determine if the user has access to each of the elements of the listing, and sort it. The Dir Cache tab allows you to configure a cache that will hold directory listings created by user requests. If a user requests a directory listing that already exists in the cache, then the server will not recreate it, thus greatly improving server performance. This tab is accessed from the Settings selection in the left tree panel. When selected the Settings Menu appears.

The following are the available options:

Enable cache

This check box switches use of the directory cache mechanism on or off. The directory-listing cache is switched on by default.

Maximum size

Under Windows 95 and NT, the cache is on by default, and set to a maximum of 25 different listings. When the cache fills up, then the next new request will cause Serv-U to expire the least recently requested directory listing and replace it with the new one.

Time-out

The time-out value determines how long directory listings remain in the cache, regardless of how often they are requested by clients. The default value is 600 seconds (10 minutes).

Auto refresh

Select this option to automatically refresh the cache list information in this tab.

Cache List

This list shows all of the cached directories and information about the entry.


Advanced (Server)
Advanced (Server Settings)

See Also

These options affect the overall server behavior and functionality. The defaults for these options are generally the correct ones for your PC. Changes to these options can greatly affect server performance and security. Only make changes if you know exactly what you are doing!

Server

These options apply to the server.

Enable security

This option allows you to enter a global setting to enable or disable all security. Default is enabled. Disabling security will allow anybody on the network to delete/change/copy everything on your PC!  Do not ever leave the Enable security option unchecked if your computer is connected to the Internet!!!

Packet time-out (seconds)

Enter the number of seconds for a file transfer to wait without receiving anything from network or sending anything over it before declaring the transfer as dead. Serv-U will normally wait for the transfer to complete, or if no activity occurs during this time period, stop the file transfer and consider it canceled.

Dir listing mask

This option allows you to specify the directory-listing mask. The default is rw-rw-rw. It is used in directory listings to represent the file or directory attributes, making them look like UNIX. Some FTP clients do not take kindly to directory listings that show the user as not having access to a file and will now show files with the wrong mask (The AOL FTP client being one of them).

PASV port range

When the PASV command is used Serv-U opens a data socket and tells the client where it can connect. The data socket is used for directory listings and file transfers in passive mode. By default this port range is blank which means the server will acquire a new listening socket with a random port number between 1024 and 65535 for every passive mode transfer.

Using this range Serv-U will limit which ports are used. This is very important for firewall configurations that limit incoming connections’ port usage. When blank Serv-U allows Windows to pick the port number, when a range is entered Serv-U will set up a fixed number of sockets on these ports and use these to service passive mode data transfers.

If this option is used the idea is to use a range of ports that are available, i.e. above 1024, something with high port numbers like 23580-23590. The number of ports to designate depends on a few factors: If you allow FXP (direct server-to-server transfers) you need as many ports as you get concurrent FXP clients otherwise the server may not be able to figure out what passive mode connection should be routed to which FTP session. If you allow multiple connections from the same client IP you ideally need as many ports as you get concurrent connections from the same IP. This again is so Serv-U can distribute requests over the available sockets and figure out what connection should go to which session. If neither of the two applies then in theory a single port would do the job, though it is better to use at least 3 ports or so to distribute requests and make lookups faster (the lookups hook the client connection up with an FTP session). On NT/W2K a good average number would be something like 10 ports, on Win9x/ME use no more than 5 ports since that OS is 'socket challenged' and quickly runs out of available sockets. Serv-U will not allow more than 50 ports to be used for the passive mode range regardless of your settings, since that many start to impair performance. Anywhere close to 50 ports should really never be needed, even on the busiest of servers.

Sockets

These advanced options allow you to configure how sockets are used in Serv-U. Be very careful here and use these options only if you are sure you know what you are doing. Changing these options could disable Serv-U.

Inline out-of-band data

Selecting this option parses Out-of-band socket data into the regular TCP data stream, treating it like normal data. This is useful to counter denial-of-service attacks that send large amounts of out-of-band data to socket stacks that cannot handle this.

Send keep-alive’s

Selecting this option periodically sends keep-alive packets to determine socket connection status.

Disable Nagle algorithm

Selecting this option disables waiting for the ACK TCP handshake before sending the next packet. Disabling the Nagle algorithm can greatly increase network overhead! Typically this is only used for connections with very large latencies, such as satellite links.

Send buffer (bytes)

Sets the buffer size in bytes that Serv-U should use when sending blocks of data to the socket stack. The default depends on the socket stack (8192 bytes for most implementations of MS Windows).

Receive buffer (bytes)

Set the buffer size in bytes that Serv-U should use when receiving blocks of data from the socket stack. The default depends on the socket stack (8192 bytes for most implementations of MS Windows).

File Uploads

These options allow you to configure how file uploads occur on the server.

Allow no/read access

While a file is being uploaded first try opening the file with no access to other clients and processes. If this fails try opening with read access.

Allow no access

Do not allow any other client or process to access the file while it is being uploaded.

Allow full access

Allow full access to other clients or processes to access the file while it is being uploaded.

Adaptive time-out

Slowly lower packet time out for consistently fast transfers during file upload. In case the transfer does not complete successfully this makes it easier to resume the upload since Serv-U will recognize more quickly that the transfer is dead and thus allow access to the file sooner.

File Downloads

These options allow you to configure how file sharing is to occur on the server in Windows.

Allow full access

Wen Allow full access is selected other programs will be able to read and write to files as they are being downloaded.

Allow read access

When Allow read access is selected other programs will be able to read the file only as it is being downloaded.


Users (Activity)

See Also

The Users tab becomes available in the right configuration panel when Activity is selected in the left tree panel. When active the Activity Menu appears in the menu bar.

This configuration tab consists of the list of currently connected users and an Auto reload option. From this list you can see each of the currently connected users, their IP address, what the user is doing, the user’s current directory, and the user’s last command issued. For Windows NT/XP/2000/2003 there is another way to see what is happening on the server: By using the Windows Performance Monitor program.

When a user is connected through secure-FTP a small padlock is shown with the activity icon, indicating the session or file transfer is encrypted.

When Auto reload is selected the current user list is automatically updated.

When a user is selected you can use the menu or toolbar to disconnect the user or send a message to him. Killing a user brings up a dialog box with a number of choices:

Kick user

This option simply disconnects the user without doing anything else. Any ongoing data transfers are cut off, the effect is immediate.

Kick user and block IP XX minutes

This option disconnects the user and places the user’s IP address on the list of blocked IPs and will prevent the user from connecting again for a number of minutes.

Kick user and ban IP xxx.yyy.qqq.zzz

This option disconnects the user and places the user’s IP address on the list of banned IPs of the user account. With the IP being banned the user will not be able to log in again from banned the IP address. The IP address can be edited before and allows for wildcard characters such as ‘*’ and ‘?’. Using the Subnet button will automatically calculate the proper IP address to block all access from the IP-subnet the address belongs to (An IP subnet is usually owned by one entity, like an Internet Service Provider).

Kick user and disable account

This option disconnects the user and disables the user's account. The effect is that no other FTP users can log in to this account until it has been enabled again.

Message to user

Type an optional message here to inform the user of his disconnection. Serv-U will try to send this to the user before disconnecting, but not all FTP clients support messages so the user may never see the message.


Blocked IPs
Blocked IPs (Activity)

See Also

The Blocked IPs tab becomes available in the right configuration panel when Activity is selected in the left tree panel. When active the Activity Menu appears in the menu bar.

This tab consists of the Blocked IP list. This list shows all currently blocked IP addresses. The information here includes the IP address, IP name (through reverse DNS), Seconds left over until the user can connect again, and the Number of hits from this IP address.

When Auto reload is selected the current blocked IP address list is automatically updated.

To manually add or remove an IP address from the list, right-click on the panel or use the menus.


Session Log
Session and Domain Log

See Also

The Session and Domain Log tab becomes available in the right configuration panel when Activity is selected in the left tree panel. When active the Activity Menu appears in the menu bar.

The Session Log shows server information since the last time that it was started. This is the same as the text in the ServUStartUpLog.txt file in the Serv-U directory. The information can be very useful to debug problems. In case of ODBC coupling errors, for domains that store their accounts in an ODBC database, this pane will show the exact ODBC error message.

The Domain Log shows domain activity. This is set up through the "Domain | Settings | Logging" tab.


Spy
Spy (on user)

See Also

The Spy (on user) tab becomes available in the right configuration panel when Activity is selected in the left tree panel. When active the Activity Menu appears in the menu bar.

The Spy tab is intended for taking a closer look at what a user is doing. It shows FTP commands, replies and file transfers. To spy, select a user from the Users tab, after selecting a user choose the "Spy on User" command from the Activity Menu or simply double-click on the user in the Users tab. This tab allows you to monitor the individual commands sent to the user and the responses, in addition monitor any file transfers in progress.

In case the session using secure-FTP SSL/TLS the number of bits of encryption-strength is shown together with the cipher. If a session was created by re-using an older SSL session this is shown by "r-" in front of the cipher. Secure-FTP clients should re-use SSL sessions for data transfers, since re-using requires much less CPU power for the FTP server.


General (Domain)

See Also

The General tab appears when selecting Settings for the selected Domain. The following are the items that can be configured using this tab.

Max no. of users

Enter the maximum number of users that can be connected to the domain at any one time. Leave this field blank for an unlimited number of users.

Virtual path mappings

These mappings allow you to map physical paths to other directories on your computer or network. Using this option allows you to create virtual directories for the user that can be on completely different physical drives or computers. This is convenient to allow users access to other paths/drives even if they are locked in to their home directory.

The following information is shown for virtual path mappings:

Physical path

The actual, real,  path on the computer that is mapped. This can also be a UNC path or network drive (Keep in mind that NT system services by default do not have access to network resources!).

Mapped to

The path in the user’s directory structure where the mapped path shows up. This can be a regular, full, pathname or it can use these values:

%HOME% 	- Replaced with the user’s home directory

%USER%	- Replaced with the user’s account name

Virtual name

The name Serv-U shows to the user for the mapped directory. Virtual directories show up to the user just like regular directories and the user can not distinguish between a mapped directory or a real one.

An Example

Say you want to map a CD-ROM drive F: to the user’s home directory and make this show up as a sub-directory named "CD-Rom". For this the physical path is "f:\", this is mapped to "%HOME%", and the virtual name should be "CD-Rom". Don’t forget to add an access rule to the user’s directory access rules to allow access to f:\.

Important Note

The creation of virtual directories does not automatically mean that users will actually see them! This is determined by the user’s directory access rules. In Serv-U all access is based on physical paths, and for the users to see a mapped directory they need access to the physical path that underlies this mapped directory. This mechanism also allows the creation of multiple virtual directories at the domain level, which are then selectively shown in some of the domain’s user accounts based by using the directory access rules.

There are the following buttons:

Add

Select this button to add a new virtual path mapping to the list. After selecting this option you are prompted for information about mapping.

Delete

Select this button to remove the selected virtual path mapping.

Edit

Select this button to change the virtual path mapping.

Links

These links appear as virtual UNIX style links. With the availability of virtual directories there should be little need for links. They are available when needed though.

Add

Select this button to add a link to the list. After selecting this option you are prompted for information about link.

Delete

Select this button to remove the selected link.

Edit

Select this button to change the link.


IP Access (Domain)

See Also

The IP Access tab allows you to restrict access to your Serv-U FTP server by IP address. Client IP addresses can be allowed or denied access according to rules specified here. Access can be specified using IP names or IP addresses (or combinations of both). This tab is accessed when Settings is selected for a domain.

Edit Rule

To add a rule, first specify whether this is a Deny access rule (deny access to an IP address or address mask), or an Allow access rule (allow access based on an IP address or address mask).

IP addresses can be specified with wild cards. The following special characters may be used. For more information, check out Defining IP access rules.

•	The star '*' character functions as a wildcard for checking the IP address. A '*' in a section of the IP number indicates that all numbers in that part of the IP address qualify as a match.

•	The question mark '?' character functions as a wildcard in IP names only, to stand for a single character.

•	The hyphen '-' character functions as a range in an IP address. For example, the number 152.2.200-202.103 will allow the numbers 200, 201, or 202 in the third part of the IP address.

Rule List

The Rule list on the right hand side shows the current list and order of IP rules. Rules can be added and removed from the list using the Add and Remove buttons to the left of the rule list. Also, the order of the rules may be altered using the Up and Down buttons on the bottom of the rule list.

By default, there are no IP access rules and all IP addresses are allowed to connect to the server. Once the first rule is entered, a user must pass the access rules before access is granted. In order to access the server, a user has to match an ‘allow’ rule. If a user's IP matches a 'deny' rule, the access is denied.

Important Note

THE ORDER OF THE RULES IS IMPORTANT!  When a client contacts the server, the rules are evaluated from top to bottom in the list of rules. The first matching rule applies and evaluation is stopped. If the order is incorrect this may cause rules to never get evaluated.


Messages
Messages (Domain)

See Also

The Messages tab allows you to set up messages used by Serv-U. When Settings is selected for a Domain, this tab becomes available and the Settings Menu appears.

These messages can contain symbolic parameters for server-specific information. When Serv-U displays a sign on or sign off message, it will substitute dynamic data for the specified parameters. Also note that custom user-specific login messages may be specified in User Setup tab and the Group Setup tab.

The server caches messages to increase performance. As long as any message file changes are made through the message setup tab the server will immediately show the changes. If message files are changed outside Serv-U it can take up to 15 minutes before the server picks up the changes.

Server response Messages

The server uses a number of messages that can be changed, to respond to specific commands and situations. Leave the entry blank to revert it back to the default text.

Server ID text

This text is sent to an FTP client when it attempts to connect to the server. Be careful when changing this from the default setting, some FTP clients like FTP Voyager rely on this string to identify that it is connected to a Serv-U server. Changing this string could change the way some clients work.

HELP command reply

The text entered here is sent after listing the supported commands. It is an FTP server tradition to place a support E-mail address here.

Server offline

The text entered here is sent when connection attempts occur and the server is offline.

Server going down

The text entered here is sent when the SysOp wants to shut down the server.

User limit is reached

The text entered here is sent when the maximum user count has been reached and new users are turned away.

No Anonymous access

The text entered here is sent when the server does not allow anonymous access.

Insufficient ratios credit

The text entered here is sent when the user has insufficient credits to download. See UL/DL Ratios for more information.

SYST command reply

The text entered here is sent in response to the SYST command. Be careful when changing this from the default setting. FTP clients use this to determine the type of server they are talking to and tailor their behavior accordingly. Serv-U pretends to be a UNIX FTP server, even though it runs on MS Windows.

Signon message file

Your domain can display a welcome message every time a user connects to it. This is the sign on message. It is the first message sent to the user, even before the user has logged in.

Signoff message file

This displays a good-bye message when the user leaves.  This is the last message sent to the user before he is disconnected.

Directory Change Messages

Serv-U allows definition of specific messages to display to users when they enter a directory. Different directory change messages may be set up for every directory. Directory change messages are stored in files.

The file name may be specified in two different ways:

•	Absolute path file names - (for example C:\FTP\CDMES.TXT). This will display that file for each directory change.

•	Relative path file names - It is possible to use a file name only without the path, for example CDMES.TXT. This will make Serv-U look for and display the file with that name, in the directory into which the user is changing. This is the usual way to use directory change message files, since this makes possible a different message for each directory.

The Messages tab has room for a 'primary' and 'secondary' directory change message file. When looking for a message file, Serv-U will first try the primary file name. If there is no file name specified in there, or the file cannot be found, the server will try to find the secondary file name. This is very useful in case there should be a specific directory change message files for some directories, using a relative file name as the primary directory change message file. An absolute file name can then be specified as the secondary directory change message file. This will show the users the primary file message when available, and the secondary one if there is no primary.  (For example because the directory is on a CD-ROM, so it is not possible to place directory change message files on there).

Like sign-on and sign-off messages, Serv-U provides symbolic message parameters that are dynamically substituted into the displayed messages. These parameters allow inclusion of dynamic information in messages.

Trick

If the Hide hidden files feature is enabled in the user setup, directory change messages may be hidden from the user by making the file ‘hidden’. Hidden files are files with the DOS/Windows 'hidden' attribute set, something that can be done using the DOS program 'Attrib' or by changing the 'properties' of a file in Explorer (using the right mouse button). So, if directory change message files are hidden they won't show up in the directory listings while users still get to see the messages.

Primary dir change message file

This is the file containing the message you want displayed when a directory change occurs.

Secondary dir change message file

This is the file containing the message you want displayed when the primary message file is not found.


Logging
Logging (Domain)

See Also

The Domain Settings Logging tab allows you to configure domain logging options. Options are available for both on-screen and file logging. Debugging level messages are also available.

Screen & File Logging Options

The logging options are shown on the left side of the screen. For each type of information that can be logged, there are two options. The first check box indicates that this particular information should be logged to the message area of the main Serv-U window. The second check box indicates that the particular information should be logged to a file. Further down on the left side are options for server debugging messages of various types. Again, check the option for on-screen or file logging for any information that is of interest to you. Please be aware of performance impacts, and the size of log files, when selecting this information.

Do not log clients from these IPs

At the upper right-hand side, there is a text box where IP addresses, in comma-separated format, can be added. Any client connecting from one of these addresses will not show up in the logs. Its primary purpose is to avoid repetitive logging of maintenance connections like those from server checking software like "WhatsUp". The addresses can contain wild cards. Please consult Defining IP Rules for more information on formatting IP addresses with wildcards.

Enable logging to file

This check box is available to enable or disable logging to the file specified in File name.

Log file name

Should contain a full path and file name of the file in which Serv-U writes logging information. In case a log file rotation option is selected this file name will be used as the base of the actual name, and a date will automatically be created according to the pseudo-characters used in the name. The name can contain the following pseudo-characters:

%D	= day of the month (1..31)

%M	= month in textual form (Jan-Feb-Mar etc..)

%N	= month in numerical form (1..12)

%Y	= 4 digit year (2001)

%X	= 2 digit year (01)

%I	= domain ID number

%S	= domain name

Automatically rotate log file

The log file can be rotated periodically by checking one of the rotation options, this will cause Serv-U to automatically start a new log file at the start of the specified interval. This uses the file name as specified in File name, i.e. make sure the file name contains pseudo-characters that create a unique name time the file is rotated. Automatic log file rotation can be done on a Daily, Weekly, Monthly, Yearly basis. In case of Weekly log file rotation a new file is started on Sundays.


UL/DL Ratios (Domain)

See Also

The UL/DL (upload and download) Ratios tab becomes available when Settings is selected for a Domain. When selected the Settings Menu appears in the menu bar. This tab allows you to define any number of files that are free for downloading and do not factor into any ratios. The following are the options:

Add

Select this button to add a file to the list. Files that appear in the list do not factor into any UL/DL ratios.

Remove

This button is available when a file in the list is selected. Select this button to remove the selected file from the list.

Files may be specified in several ways:

•	A file name with no path information may be entered. This means that any file in any directory with that file name will be 'free'. In the above example, a file called index.txt is free whether it is in the c:\freefiles directory, or the d:\users\bob directory.

•	A file name with a path, but no drive, may be entered. This type of specification indicates that that file, on that path, is free on any hard drive. If a file is specified as '\homes\misc\readme.txt' is specified, then that full path on the d: drive or the f: drive will be 'free'.

•	A full path and drive may be entered. This type of specification will limit the free file to the specific directory on the named drive.

•	Wild cards may be used in any of the above situations. A '*' may be used to indicate a directory name or file name or extension. A '?' character may be used to indicate on character in a directory name, or file name.


Advanced (Domain)

See Also

The Advanced tab becomes available when Settings is selected for a Domain. When selected the Settings Menu appears in the menu bar. This tab allows you to modify the following advanced Domain options:

Account cache time-to-live

Serv-U normally reads account settings only once from the domain storage source (INI file, registry, or ODBC database) and then stores the values internally to speed up subsequent access. This is generally a good thing, since access to a file or database is many orders of magnitude slower than accessing an internal table. However, if you want to update accounts outside of Serv-U, for example in case of ODBC storage by directly updating the database records, the server will not know about those changes until the cache time-to-live expires for the account. Lowering the time-to-live value means Serv-U will pick up changes quicker, but it will also mean more overhead. Setting time-to-live to a higher value means less overhead, but external changes will not be noted as quickly by the server.

Encrypt passwords

Serv-U uses a one-way secure hash function to encrypt passwords, named salted-MD5. Passwords are stored in the ServUDaemon.ini file or in the registry and enabling this option ensures no one can read or recover the passwords. Once the passwords are encrypted they can never be decrypted again. This is literal, password encryption is much like a sausage machine where a pig goes into one end and the sausage comes out the other, cranking the other direction will not get back the pig from the sausage. When this check box is unchecked passwords are stored as clear text and they are visible in the user account setup. By default passwords are stored encrypted.

Changing this option will cause all existing passwords to become invalid and they will have to be entered again in the user account setup.

Allow MDTM command to change file date/time

When selected this allows users with write privileges to change the date and time of an uploaded file using the MDTM command. FTP Voyager supports this option automatically with Serv-U servers. For more information about FTP Voyager visit http://www.ftpvoyager.com/.

Block future dates/times

Select this option to ignore the MDTM command if the date and time is in the future. Be careful, however, some clients may be in a different time zone, and the date and time may actually be valid if in the future.

Allow passive mode data transfers

Select this option if passive mode data transfers should be allowed by the server.

Use IP

Here you can specify an IP address to use for passive mode transfers. This becomes important when the FTP server is behind a firewall or proxy server that shields the server from the outside Internet address. Instead, the server only sees the local LAN address and would normally report this back to the FTP client when it requests a passive mode data transfer. The client needs to know the Internet IP address though, not the LAN IP address. Setting the Internet IP address in this field solves the problem.

Note:

If you have a dynamic IP address Serv-U can automatically update your passive mode IP address for you. In order for this to work you must enable dynamic DNS and enter a valid symbolic IP name on the Dynamic DNS tab, passive mode transfers have to be allowed, and the "use IP" field on this tab has to be left blank.

Convert URL characters in commands to ASCII

Enabling this option tells Serv-U to look for special character sequences in commands send to the server, as used by some Web browsers to encode URLs. An example of this is ‘%20’, which represents the ‘space’ character. These character sequences are then converted back to their regular character (ASCII) form. Enable this option if you are having problems with spaces in file or path names when accessing the server through a Web browser.

NLST command also lists directories

The FTP standard require that the NLST (=Name LiST) command only return file names to the FTP client, and nothing else. However, traditionally many servers, including Serv-U, used to return a full listing including directories and there are FTP clients that rely on this. Checking this option means the server sends directories as well as files when the client issues an NLST command. Note that enabling this option violates the FTP standard.

Automatically create home directory

Enable this option to have Serv-U automatically try to create a user’s home directory if it does not exist. This option is useful for new accounts, where the home directory has not been made manually by the system administrator, as well as in cases where the user accidentally deletes his home directory.


Account (User)

See Also

The Account tab is available when a User is selected in the left tree panel and allows you to configure user options. Users can then be assigned to groups. Users assigned to groups inherit the configuration of the group to which they are assigned. Individual users can be further configured if they have some different setting from their group.

Disable account

Select this check box to disable the account but to keep the settings. When an account is disabled the user is no longer allowed to connect to your server.

Automatically remove account on date

Select this option to delete the account on the specified date. This is useful to automatically delete temporary accounts.

User name

This user name field may be changed while viewing an existing user.

Note that there is one special user name 'Anonymous'. The 'Anonymous' user can be used for guests on your FTP server. The 'Anonymous' user does not require a password. Instead, Serv-U will ask users who log on as 'Anonymous' for an email address.

Group(s)

Every user can be part of one or more groups. Groups can be used to hold common settings shared by several users or group them for administrative purposes.

Password

The password for the user is stored by Serv-U. If the 'encrypt passwords' option is selected in the Advanced Server Settings tab, then Serv-U will store the password using MD5 encryption. To change a password, completely erase anything in this field and type the new password in and press 'Apply'. Also check out the information about S/KEY passwords.

Home directory

The home directory is the directory that the user will be placed into immediately after logging in. Each user must be assigned a home directory. Home directories must be specified with the full path, including the drive letter or UNC share name. If the home directory does not exist Serv-U will create it.

Lock user in home directory

Select this option to lock the user into the home directory, not allowing him to move to another directory, other than subdirectories. This option will also tell the user that his directory is "/" when logged in to the home directory, and hide the actual path from him.

When enabled, Serv-U will show all the directories a user deals with as if they are relative to the user's home directory. That is, the user sees his home directory as root ('/'). This only works for directories that are at or below a users home directory. If enabled, a user is restricted to his home directory and the directories below it, even if there are access rules that would allow the user to go outside these. The exception to this are virtual directories that map other paths to some place at or below the user’s home directory.

Privilege

This box allows you to choose what kind of administrative privilege should be granted to the user. Administrative privilege is used for remote administration of a server through the user account. The following are the selections:

No Privilege

A regular user account that can not be used for remote administration.

Group Administrator

The account can be used for remote administration. The Administrator program will only show users that are members of the same group(s) as the administrator account for editing. Only new group member accounts can be created.

Domain Administrator

The account can be used for remote administration. The Administrator program will only show the domain of the administrator account, and allow changing settings of that domain only. New user and group accounts can be created but only for the same domain as the administrator account.

System Administrator

The account can be used for remote administration. Full access is granted by the Administrator program. All server and domain settings can be changed. New domains can be created, new user and group accounts can be created without restrictions.

Read-only Administrator

This privilege type is for remote diagnostics use only. You may be asked by the RhinoSoft.com support staff to create an account with this privilege, so they can evaluate your server settings remotely. The account can be used for remote administration just like the System Administrator privilege, except that no changes can be made to any setting on the server.

Notes

This text area allows the entry of notes for the system manager. Any text may be entered here.


General (User)

See Also

The General User Miscellaneous tab allows configuration of general settings for a user. This tab can be reached from the User selection in the left tree panel. The following settings are available from this tab:

Require secure connection

If a client should only be able to log in when the connection is using secure-FTP (SSL), enable this option. If disabled, the user will be able to log in using either a regular or secure connection.

Hide 'hidden' files

If enabled, the user will be unable to see any files with an attribute of 'hidden' in their directories. This can be useful to hide files like those containing 'directory links' or 'directory change messages'. You can see and set file attributes from Explorer.

Always allow login

When enabled, a user can log in even when the maximum number of users for the server is reached. This is a handy setting for an administrator account.

Allow only X login(s) from the same IP address

Prevents a user from concurrently logging in more than a certain number of times. Note that some FTP client programs automatically log in a new session for each file transfer (including FTP Voyager and Microsoft's Internet Explorer!), so the number of concurrent logins should preferably not be set too small when this option is enabled.. A minimum of two is recommended to ensure trouble free operation for the users.

Allow user to change password

If checked, the user can change their password from an FTP client. Only certain FTP clients support this option. A recommended client that can change passwords remotely is FTP Voyager, from RhinoSoft.com (see http://www.ftpvoyager.com).

Max. upload and download speed

The maximum speed setting allows you to limit the bandwidth consumed by the user. This maximum applies to each client that logs in. i.e., if the maximum bandwidth is set to 5 Kbytes/second it means that each client that logs into this account will get a maximum throughput of 5 Kb/sec.

Idle time-out

Time before idle connections are dropped. It is suggested that this number be set to not less than 5 minutes, so clients with a bad Internet connection will be able to complete file transfers.

Session time-out

Total session time before user is disconnected. When the session time is reached the user is disconnected from the FTP server and blocked from re-connecting for 1 minute, so others have a chance to log in if it is a busy server. When the session time is reached the user is disconnected without waiting for any ongoing file transfer to complete. Leave this blank for unlimited session times.

Max. no. of users

This number specifies the maximum number of users with the same user name that can be concurrently logged in.

Login message file

This text area can hold an absolute or relative path to the login message text to display to the user. The message text can contain symbolic message parameters.

Password type

This drop down allows you to select normal passwords from the client, or to expect a hash-code generated in S/KEY one-time password format. Unless doing S/KEY one-time passwords, this should remain set to 'Regular Password'.


Dir Access (User)

See Also

The Dir Access tab allows configuration of directory access for the selected user. When selected the User Menu appears in the menu bar. If the user is a member of a Group the group rules take effect. To override group rules enter them here.

File Directory Access Rules

These rules determine which files and directories a user has access to.  These access rules work the same for users and groups. The access rules also control rights to print via FTP, another function of Serv-U.


IP Access (User)

See Also

See IP Access for Domain Settings. Click here to go to IP Access for a domain.


UL/DL Ratios (User)

See Also

The User/Group Upload/Download Ratios tab allows you to set up rules requiring X number of uploads for each Y number of downloads. These ratios can be by number of files, or by bytes. Also, these ratios can be set per session, or over multiple sessions.

Setting upload/download ratios allows you to require users to upload data at some ratio to the data that is being downloaded. That is, the user gets credit for uploads that he can then 'spend' by downloading data. An initial credit can be specified.

The following fields may be configured from this tab; the settings apply equally to users and user groups:

Enable U/D ratios

This check box allows you to turn upload/download ratios on or off.

Count files per session

The ratios apply to files uploaded or downloaded in this session. The ratio will be calculated using the number of files uploaded or downloaded. Each user that logs in to the account will get the Credit amount as set.

Count bytes per session

The ratios apply to files uploaded or downloaded in this session. The ratio will be calculated using the number of bytes uploaded or downloaded. Each user that logs in to the account will get the Credit amount as set.

Count files over all sessions

The ratios apply to files uploaded or downloaded across sessions. The ratio will be calculated using the number of files uploaded or downloaded. The Credit amount applies to all users of all sessions using this account and it is remembered by the server between sessions.

Count bytes over all sessions

The ratios apply to files uploaded or downloaded across sessions. The ratio will be calculated using the number of bytes uploaded or downloaded. The Credit amount applies to all users of all sessions using this account and it is remembered by the server between sessions.

Uploads

The number of bytes/files that need to be uploaded to receive the Downloads amount of credit.

Downloads

The number of bytes/files in credits a user receives for each number of Uploads bytes/files that are uploaded.

Preset/Current

The number of bytes/files credited to the user. This is the initial credit value a user receives if counting per session, or accumulated across multiple sessions if counting over all sessions.

Notes

Note that each user logging into an account with 'per session' type of ratios will receive its own initial credit as specified in Preset/Current and any uploaded files (and credit received) will only be retained for the duration of that session. As soon as the user logs out any accumulated credit is lost.

In case an 'over all session' type of ratios is specified there will be only one credit count for all users logging into the account, i.e. everyone using the account shares the credit count. For this type of ratios the accumulated credit is retained after the user logs out and used as the starting value for the next user logging into the account.

Note that certain files may be marked as 'free' using the Domain UL/DL Ratio tab. These files do not count against downloads in computing upload/download ratios.


Quota
Quota (User)

See Also

You may limit the amount of disk space that users consume using the User/Group Disk Quota dialog. This tab allows you to set a limit for a user. Serv-U will keep track of uploads, and file deletions to calculate a running total of current disk usage.

Enable disk quota

This check box turns disk quota enforcement on or off.

Current X Kb

This sets the current amount of data that the user has on the hard disk. Note that Serv-U keeps a running total based on uploads and downloads. An initial value is entered here, and Serv-U will then keep track of any future activity.

Maximum X Kb

This number is the maximum amount of disk space a user may consume.

Calculate current

Pressing this button makes the server calculate the user's current disk usage by looking at the user's home directory and the directories below this. The calculated value is then placed into the Current entry.


Account (Group)

See Also

The Group tab is accessible when a group is selected in the left tree panel. When selected the Group Menu appears in the menu bar. Groups are a great way to combine multiple user accounts for administrative purposes, and share access permissions and other common permissions and privileges between multiple users. The following are the group fields:

Group name

The group name is used to identify the group and to identify which users belong to which group. Enter this name into the user’s Account tab to make a user a member of this group.

Notes

Enter any notes here that may help you remember and identify the group.


Dir Access (Group)

See Also

The Dir Access tab allows configuration of directory access for the selected group. When selected the Group Menu appears in the menu bar.

File Directory Access Rules

These rules determine which files and directories a group has access to.  These access rules work the same for users and groups. The access rules also control rights to print via FTP, another function of Serv-U.


IP Access (Group)

See Also

See IP Access for Domain Settings. Click here to go to IP Access for a domain.


Getting Started

See Also

You want to put your shiny new FTP server to work fast! Not a problem. First note that Serv-U is designed not to allow access to anything or anybody out-of-the-box. Unless you specify otherwise your PC is well protected by the default settings and nobody has access to it.

To make the server do useful work it needs at least one domain and at least one user account in that domain. For more about this please take a look at the Administrator Overview section.

! IMPORTANT – IMPORTANT – IMPORTANT !

If you are planning to use secure-FTP, i.e. encrypted FTP sessions using SSL/TLS, you must create your own server certificate. This ensures your server has a unique and secret private key, which is used as part of the encryption process. For enabling secure-FTP please see the domain parameters section.

Installer

Running the setup program invokes the installer. The installer takes care of a large number of tasks: Upgrading an existing installation, converting the settings if needed, putting files in their correct locations, starting services and invoking the setup wizard. Normally all it takes to get the magic going is to just run the installer. For most installations the default parameters as presented during installation should work fine.

The installer has options to influence the install process that may be handy for specific situations such as having to install on many systems with non-default parameters. The following are the command line options for the installer:

ServUSetup.exe /S /M=<filename>

These options have the following meaning:

/S invokes a silent install

/M=<filename> specifies text file with installation parameters

The installation parameter file can have the following lines in it:

MAINDIR=<installation directory>

If present, should contain the full path of where you want Serv-U to get installed.

GROUP=<group name>

Program group name, as shown in the start-menu.

COMPONENTS=<A|B|C|D>

Specifies what components should get installed. If present, ‘A’ installs the server Daemon and tray icon programs, ‘B’ installs the Administrator program, ‘C’ installs the textual documentation such as README files and version info, and ‘D’ installs the online help documents.

STARTADMIN=<A|B>

If ‘A’ is present this specifies if the Administrator program should get started after installation is completed. If ‘B’ is present a shortcut is placed on the desktop to start the Administrator program.

STARTTRAY=<0|1>

This tells the installer if the tray-icon should be started after install. Using ‘0’ means it is not started, ‘1’ starts the tray-icon program after install.

A sample parameter file for the installer could look like this:

MAINDIR=d:\go here\su

STARTADMIN=B

STARTTRAY=0

GROUP=My SU Group

COMPONENTS=DAB

The effect of this parameter file would be to install in directory "d:\go here\su", it would name the program group in the start-menu to "My SU Group". It will install the Daemon, Administrator program, and online help, but not the README and version info files. The Administrator program will not get started after install, but it will place a shortcut on the desktop to start it. Finally, the tray-icon will not get started after install.

Setup Wizard

The quickest way by far to set up the initial domain and user account is by using the Setup Wizard. The Wizard will automatically kick in the first time the Administrator program is started. While use of the Setup Wizard is not a requirement (you can cancel out of it), there is little reason not to use it. Anything set up by the Wizard can be changed later. The Setup Wizard will ask a series of questions:

Enable small images with menu items

Unless you are visually impaired and using a screen reader there is nothing to loose by choosing ‘Yes’. This will make the Administrator program show small images with most of the menu items, which makes navigating through the menus easier.

IP Address

The IP address is a set of 4 small numbers separated by dots that uniquely identify your computer on the network. Serv-U can merely use the IP address(es) assigned to your PC, it cannot change them. Your Internet Service Provider is usually the person that assigns an IP address to your computer. Unless you know exactly what IP address you want to use for your FTP server the best answer here is to leave the entry blank. This will make Serv-U use whatever IP address(es) is/are available on your PC.

Install as system service (Windows 9x/ME only)

Answering ‘Yes’ to this question will make the server start automatically as soon as the computer is started and it will continue to run even when users log out and back in to Windows. If you answer ‘No’ you have to start the server yourself each time you log in to Windows. On NT and Windows 2000/2003 Serv-U is automatically installed as a system service.

Domain name

Enter any descriptive name of your choice to identify your FTP server/domain by. If you have an IP name assigned to your PC like "ftp.cat-soft.com"  that would be a good choice.

Allow anonymous access

Anonymous FTP users are a special category: They log in using the account name "Anonymous" and use their E-mail address as the password. If you want to allow anonymous access answer ‘Yes’, otherwise ‘No’.

Anonymous home directory

Every FTP user account needs to have a directory where users are placed when they log in, that is called the ‘home directory’. Enter the complete path including drive letter where you want anonymous users to be placed. For example "c:\ftp\anonymous". Make sure this directory is a real, existing path.

Lock anonymous users in their home directory

Generally this is something you want to do: It hides the real path from the users and only shows them "/" as their home directory.

Create named account

This question lets you create a non-anonymous user account, i.e. an account where the FTP user has to type a name and password to log in. Answer ‘Yes’ if you want a named account.

Account login name

This is the user name the FTP user should enter to log in to the account.

Password

The password the FTP user should enter to log in to the account

Home directory

Enter a full path name including drive (or a UNC path) where the user should be placed immediately after logging in. This should be an existing directory on your PC.

Lock the user in the home directory

If you are setting up a named account for yourself you will want to answer ‘No’ to this question. If the account is for others then ‘Yes’ may be more appropriate.

Account admin privilege

This determines how this account can be used to do remote administration through the Serv-U Administrator program. If you are setting up this account for yourself, by all means, make it ‘System Administrator’, the highest level of administrative privilege. Otherwise it is probably a good idea to leave it at ‘No Privilege’.

After all this, let the Wizard do its magic and you should be looking at domain with one or two new user accounts. Simply click on the account names in the left panel to make changes. Especially important is to take a look at the Dir Access tab in the right panel for the user account. The Wizard has set up default access rules for the account: For the Anonymous account this specifies read-only access of the home directory and the directories below it, for the named account it specifies full access. This is all, you are done! Now try using your freshly created accounts on your server with your favorite FTP client program!

Manual Setup

You did not listen, thought you can do better than the Setup Wizard, and canceled out of it, and are now looking at an almost empty left panel of the Administrator program with only ‘<< Local Server >>’ showing. How to proceed? Here’s a quick step-by-step tutorial to create an anonymous account:

•	Double-click on ‘<< Local Server >>’ in the tree on the left side. This should start the FTP server Engine and expand the tree.

•	Click on ‘Domains’ in the tree on the left side.

•	From the menu select "Domains | New Domain".

•	Do not enter anything for the IP address, unless you are absolutely sure of what you are doing, just click ‘Next’.

•	Enter a descriptive name for ‘Domain name’, anything will do. Then ‘Next’.

•	Unless you are sure, do not change the port number, leave it at 21, click ‘Next’.

•	No changes for the ‘Domain type’ either, click ‘Next’.

•	You now have a brand-new domain. Double-click on it to expand the tree.

•	Click on ‘Users’ in the tree on the left side.

•	From the menu select "Users | New User".

•	Type "Anonymous" for the ‘User name’. Click ‘Next’.

•	Enter the full directory including drive letter where you want anonymous users to be placed immediately after logging in. Say it is "c:\ftp\anonymous", enter this and hit ‘Next’.

•	Stay with ‘Yes’ for ‘Lock user in home directory’, hit ‘Next’.

•	You now have a user account named ‘Anonymous’. Start using it!


Symbolic Message Parameters

See Also

Serv-U FTP Server can display various types of messages:

•	Sign-on/sign-off messages

•	User specific login messages

•	Directory change messages

There are several symbolic parameters that can be entered in the message text. These parameters are expanded while being sent to a client. They all begin with '%'. Here is the complete list:

Time/date

%Time	- displays the current time on your PC

%Date	- displays the current date on your PC

Server statistics

%ServerDays	- displays the number of days the server has been running

%ServerHours	- displays the number of hours the server has been running

%ServerMins	- displays the number of minutes the server has been up

%ServerSecs	- displays the number of seconds the server has been up

%ServerKbUp	- displays the no. Kbytes uploaded to the server since server start

%ServerKbDown	- displays the no. Kb downloaded from the server since server start

%ServerFilesUp	- displays the no. of files uploaded to the server since server start

%ServerFilesDown	- displays the no. of files downloaded from the server since server start

%LoggedInAll	- displays total no. of logged in users since server start

%ServerAvg	- displays the average server throughput since server start

%ServerKBps	- displays current server bandwidth use

Server settings

%MaxUsers	- displays the maximum no. of users, as set in 'Settings - Domain'

%MaxAnonymous	- the maximum no. of anonymous users, as set in 'Settings - Domain'

User info

%Name	- displays the user's login name

%IP	- displays the user's IP number or name if available

%Dir	- displays the user's current directory

%Disk	- displays the user's current disk drive

%DFree	- displays the amount of free space on the user's current disk in Mb

%FUp	- displays the number of files uploaded by the current user

%FDown	- displays the number of files downloaded

%FTot	- displays the total number of files transferred

%BUp	- displays the number of Kbytes uploaded by the user

%Bdown	- displays the number of Kbytes downloaded by the user

%BTot	- displays the total number of Kbytes transferred

%TconM	- displays the total connect time in minutes

%TconS	- displays the connect time in seconds - to be used with '%tconm'

%RatioUp	- displays the 'upload' ratio part for UL/DL ratios

%RatioDown	- displays the 'download' ratio part for UL/DL ratios

%RatioCredit	- displays the current download credit for UL/DL ratios (Kb or 'files')

%QuotaUsed	- displays how much disk quota is used in Kb

%QuotaLeft	- displays how much disk quota is left in Kb

%QuotaMax	- displays the maximum amount of disk space that can be used in Kb

Number of users

%UNow	- displays the current number of Serv-U users connected

%UAll	- displays the number of users since the server was started

%U24h	- displays the number of users in the last 24 hours

%UAnonAll	- all currently logged in anonymous users

%UAnonThisIP 	- all anonymous users logged into this IP home

%UNonAnonAll 	- all non-anonymous users currently logged in

%UNonAnonThisIP	- all non-anonymous users logged into this IP home

%UThisName	- all current users with the current user name logged into this IP home

The file upload and download message directives are for the current session only (i.e. they do not show the aggregate over multiple sessions).

The '%ServerDays', '%ServerHours', '%ServerMins', and '%ServerSecs' directives are meant for use together. The number of hours is what's left after the number of days is subtracted, and the same goes for the number of minutes and seconds.

Example Message:

Welcome to ftp.cat-soft.com, home of Serv-U!

Local time is %time, and %u24h users have visited over the last 24 hours. This server has been up for %ServerDays days, %ServerHours hours, %ServerMins min. and %ServerSecs sec.

Server stats:

    Users logged in: %loggedInAll total

      Current users: %Unow

      Kb downloaded: %ServerKbDown Kb

        Kb uploaded: %ServerKbUp Kb

   Files downloaded: %ServerFilesDown

     Files uploaded: %ServerFilesUp

  Average througput: %ServerAvg Kb/sec

  Current througput: %ServerKBps Kb/sec

Keep in mind that the average client has only 80 characters per line, and the first four are taken up by the reply code. Be brief, 70 characters should generally be considered a safe maximum.


Passive Mode Data Transfers Behind a Firewall

See Also

If Serv-U is running behind a firewall or proxy server with address translation, passive mode data transfers (as used by all Web browsers) will generally not work. The reason is that the IP address of the server is not the same as the IP address outside users should use to connect to the server. Serv-U does not know this, and when the FTP client program asks for its passive IP address it will give the wrong (internal) address.

You can often tell if your server is behind a firewall or proxy server because the server’s IP address is a dummy IP address, which can only be used locally on a LAN, and which will not work over the Internet. Any IP address starting with these numbers is a dummy IP address:

192.168.xxx.xxx

172.16.xxx.xxx – 172.31.xxx.xxx

10.xxx.xxx.xxx

You can use the "Help | Local IP Address" menu selection to view the IP address(es) of your computer.

What is needed is some way to tell Serv-U what IP address it should hand out to FTP clients when they want to do a passive mode data transfer, the right address is the IP address the outside world should use to connect to the server. This can be done via the Domain Settings Advanced tab. In that tab is an entry for IP for passive mode, which is where the IP address to report to FTP clients goes.

Example

Say a server is behind a firewall, and has an IP address 192.168.0.10. The outside world accesses the server by using, for example, address 243.56.78.1. To make passive mode work, enter '243.56.78.1' as the IP to use for passive mode for the domain.

The above assumes the firewall is set up to pass all the needed packets on to the server. In particular, this means the firewall has to allow incoming TCP connections to port 21 on the server, allow outgoing TCP connections from port 20 (for regular mode data transfers), and allow incoming TCP connections to any random port between 1024 and 65535 on the server (for passive mode transfers). Depending on what the firewall allows to pass it may be that despite passive mode address translation it is still not possible to use passive mode for data transfers.

If the firewall is blocking incoming connections to ports between 1024 and 65535 not all is lost yet. You may be able to open up the firewall to pass a limited range of ports to be used for passive mode data transfers. The Advanced tab in the Server Settings is used to accomplish this.


FTP_bounce Attacks

In 'active mode' an FTP client can send a 'PORT' command to a server which tells the server to which IP address and port number it should connect for the next data transfer. There is normally no limitation on the address or port numbers, so a client can instruct the server to connect to any other system rather than to the FTP client itself. This can be abused by malicious clients to probe a network where the server opens up a connection to another server that the client does not normally have access to. FTP_bounce attacks are described in more detail in CERT advisory CA-97.27.

For normal file transfers between server and client there is no need for the server to ever connect to anything other than the client for data transfers. However, there is one legitimate use that deviates from this: The FTP protocol allows for direct transfers from one server to another, bypassing the client. This is called FXP, and some FTP clients can facilitate in setting up such transfers. Typical use would be to transfer large amounts of data between servers on a high-speed network, where the FTP client is on a slow link. In such a case the FTP client opens a connection to both servers and instructs them to directly transfer files between them, using the proper combination of 'PORT' and 'PASV' FTP commands. In case FTP_bounce attacks are blocked at the server receiving the 'PORT' commands such direct transfers will not work.

You can block FTP_bounce attacks, and by extension also FXP, through the "Server | Settings | General" tab.


Defining IP Rules

See Also

There are several places where IP address rules are entered. For example, Serv-U security features determine if the server will allow or deny access based on the IP address of the client. When defining these rules, there are special characters that define masks that apply to groups of IP addresses.

There are three special characters: the star '*', question mark '?', and the hyphen '-'. These wildcards function as follows:

The * (Star) character

A star functions as a wildcard for checking the IP address. Any name or number will match that section of the rule if it is a star.

For example, say all IP-numbers in a company look like 134.56.34.xxx with 'xxx' being any number. To restrict access to the FTP server to other members of the company only, create an 'allow' rule that looks like this:

Allow:	134.56.34.*

Likewise, if unwanted users have IP-numbers in the range 168.76.xxx.xxx, they can be restricted from a server with a 'deny' rule, such as:

Deny:	168.76.*.*

Allow:	*.*.*.*

The 'allow' rule at the end is to allow all people in who passed the first 'deny' rule. Without it no one would be allowed access to the server. Remember, whenever there is even a single access rule users will only be allowed into the server if they qualify for an 'allow' rule.

IP-names may also be used in access rules. IP-name rules work in a similar fashion as IP-numbers. For example, to keep all users from a particular university out of the server, set up the following two rules:

Deny:	*.universityx.edu

Allow:	*.*.*.*

The  - (Hyphen) character

The hyphen is used to denote a range of numbers, so that can only be used for IP-numbers. Simply separate the starting and ending values by a hyphen.

For example, assume that users that need access have IP-numbers 134.56.34.128, 134.56.34.129 and 134.56.34.130. Three 'allow' rules could be defined, each with one of these numbers. However, a faster way to do this is to make a single 'allow' rule like this:

Allow:	134.56.34.128-130

The special characters '*' and '-' don't need to be at the end of the IP-numbers, any place will do. The rule 221.*.76-154.89 is perfectly OK.

The ? (Question mark) character

The question mark is for IP-names only, to match any single character.

Note when using IP name rules

There is one more side effect of IP-name rules. When Serv-U starts, it does not know if there are any IP access rules that need an IP-name lookup, and searching all possible rules is prohibitive. Doing a reverse IP-name lookup is computationally slow and can take any amount of time (Serv-U has a hard-coded limit of one minute for this), during which the FTP client has to wait until the lookup is done. So, by default it does not do reverse-DNS lookups to determine the IP-name of the FTP clients that connect to the server. This means the first time an IP access rule is encountered that needs an IP-name, the user will be bounced (since no name is available at that point). However, once this happens the server switches strategies and does an IP-name lookup every time a user connects.


Printing via FTP

See Also

Serv-U allows access to all PC ports: PRN:, LPT1:, LPT2:, LPT3:, LPT4:, AUX:, COM1:, COM2:, COM3:, and COM4:. This can be a convenient way of setting up a 'network' printer by transferring files directly to PRN: or LPT1: through FTP. These ports are treated like any regular path name, so a user needs access rights to use them. Thus, to make a printer on PRN: accessible and a modem on COM2: the user needs the following access rights in the Users Dir Access or Groups Dir Access tab:

PRN: 	- write and delete rights

COM2: 	- read, write and delete rights

These ports behave very much like files that always exist and can be found in every directory although they do not show up in directory listings. So, no 'change directory' commands are needed, just transfer the file-to-print to the port with the printer. For a command line FTP client this would look like 'put FILE.TXT PRN:' to print file FILE.TXT on a printer attached to port PRN:. For point-and-click type FTP clients, specify that it ask you for the destination file name. Then, when prompted for the destination file name, enter 'PRN:' or another defined port. For example, for the popular client WS_FTP , check the 'Prompt for destinations file names' option in the 'Session Options' section. After doing that, simply upload the file-to-print and it will ask for the destination, for which the printer port name is entered.


One-time Password Processing

Normally FTP sends all passwords via the network in clear-text. Anyone with a packet sniffer in the right place can see them. OTP (=One Time Passwords) changes this, it never sends a password over the network. Instead, it sends a one-way encrypted version of the password called 'hash' over the net. There is no way known to man to retrieve the original password from this hash, so it is very safe. The same hash value is never used twice. So even if someone intercepts it, replaying will not work (that is where the term "one-time password" comes from).

Serv-U supports a popular form of OTP, called S/KEY that in turn comes in two variants, MD4 and MD5, which is the name of the hash function it uses, and both are supported in Serv-U. S/KEY can be enabled for individual user accounts via the General user account tab. When storing passwords in encrypted form, new passwords must be entered since Serv-U needs to know the password when using S/KEY and the encrypted password stored in the user setup cannot be decrypted.

To use S/KEY a client either needs to support it (one that supports S/KEY is FTP Voyager, see http://www.ftpvoyager.com), or needs to let you intercept the USER response and manually enter your password at each log in (the command line FTP client will allow this). In the latter case the S/KEY 'calculator' is required. This program helps calculate a response to Serv-U's challenge. It is named "WinKey" and can be found at:

ftp://ftp.cat-soft.com/add-ons/winkey/


File Access Rules

See Also

Serv-U's file access rules facility allows specification of file access per directory and even per file for each user or group. These access rules can be specified in the Dir Access tab for each user or group. Note that file access rules also control user rights to print via FTP.

There are eight different types of access information that can be set, five that apply to files, three for directories, and the final one has a special meaning.

For file access these are:

•	Read access, allow files to be downloaded from the FTP server.

•	Write access, allow files to be uploaded to the FTP server, but not changed, deleted, or renamed.

•	Append access, allows appending to existing files and is needed for resuming uploads.

•	Delete access, allow the user to change files, rename, or delete them.

•	Execute access, is meant for executing files through FTP, i.e. for running DOS and Windows programs remotely. This should be used with care, since allowing Execute access can easily lead to security holes.

Then there are three items that deal with directories:

•	List access, allows the user to retrieve a directory listing.

•	Create access lets the user create new directories at this path, i.e. the user can make subdirectories.

•	Remove allows the user to delete directories.

The final item is somewhat special:

•	Inherit means that the access rule automatically applies to all subdirectories of the path, i.e. the rule is inherited by subdirectories.

To allow a user to use the 'change directory' FTP command to get into a directory any of the rights is sufficient. So, a user that has read, write, append, delete, execute, list, make, or remove can change to the directory in the access path. Conversely, if a path is specified without any access rights (except maybe for 'Inherit') then the user has no access what so ever to this path.

A user who has write access to a file or path, but not delete access, can upload files to the server as long as they do not already exist. This is good for an upload directory, because it allows uploads without the chance of changing previously uploaded files.

To allow a user to resume an upload the user normally needs at least append access to the file to resume an upload. Only write access will not usually do since that does not allow the user to change any existing file (including the partially uploaded file). There is an exception to this rule though, if a number of conditions are met: The user has to connect from the same sub-net as where the original upload took place from, and log into the same user account. The user has to resume within 12 hours after the upload attempt failed. The user must resume at the end of the partially uploaded file (the resume mechanism in FTP actually allows users to resume anywhere). The previous will work for many situations, but not all. Some ISPs have multiple sub-nets and a user may get assigned an IP address from another sub-net and thus be unable to resume. Still, it is a useful mechanism in case you can not grant append access to a directory.

Execute access is meant for remotely starting programs and usually applies to specific files. Be careful in granting this right: For example, allowing a user to start COMMAND.COM or CMD.EXE also means that this user can delete anything on your hard disk!

If a user needs to be able to see a directory listing, list access must be granted. This can also be used in the opposite way: For example, a user may need to be able to upload files to an upload directory, but that same user should not see and certainly not download anything that is already there. Only specifying write access and leaving list access unchecked will do this.

When a user executes an FTP command concerning files or directories, the user's access path list is checked to see if the command should be allowed to proceed. The list is evaluated from top to bottom and evaluation stops as soon as an applicable rule is found.

THE ORDER OF THE PATH ACCESS RULES IS IMPORTANT!  Unless the access rules are in the right order the correct result will not be achieved!

Examples

An 'Anonymous' FTP site needs a directory tree with all the files the users might want to download, for which they need read access. An upload directory where users can upload new files is also needed, although other users should not be able to immediately download these files, since they have to be checked for viruses first. So, this upload directory needs write but no read access. Assume all files and directories are placed on the 'Y:' drive, under the 'AnonFTP' directory. The 'Upload' directory is also created here for uploads. To accomplish this in Serv-U one would create the user 'Anonymous' with the following access rules (and in this order):

Y:\AnonFTP\Upload	- write, inherit rights

Y:\AnonFTP	- read, list, inherit rights

Reversing the rules will not work: If a user tries to write to the upload directory, the security mechanism will check against Y:\AnonFTP and conclude that Upload is a subdirectory, so the rule applies because inherit is checked, and the rule grants only read and list access. Please take note that write access does not allow a user to get a directory listing of the Upload directory, so not only won't a user be able to download anything from there, the user cannot even see what files are uploaded.

If the drive letter is left out of a path, it applies to all drives: So, a fast way to get full access to all files on all drives is:

\	- read, write, append, delete, list, make, remove, and inherit rights

The same mechanism that determines access to directories also applies to files. It is possible to grant access to specific files on a per-file basis. To take the previous example about the anonymous FTP server: We want to put a file 'Secret.txt' in the AnonFTP directory, but nobody should be allowed to read it. The access path list would look like this:

Y:\AnonFTP\Secret.txt	- no rights

Y:\AnonFTP\Upload	- write, inherit rights

Y:\AnonFTP	- read, list, inherit rights

Again, the order of the paths is important! The directory access rights do not have any special meaning for files, they work the same way on both directories and files alike. Alternatively, if Secret.txt were a directory instead of a file, the above settings would keep users completely out of this directory. Serv-U will hide all files and directories a user does not have list access to. They do not show up in directory listings, so in the above example the Secret.txt file would be truly secret.

Serv-U also supports wildcards in access rules: An example to illustrate some of the possibilities:

Y:\AnonFTP \Secret.txt	- no access

Y:\AnonFTP \*.txt	- read, list, inherit

Y:\AnonFTP \??bra	- read, list, inherit

The second rules makes sure the user only sees file and directory names ending on .txt, nothing else. Access (read access) is also restricted to these files. On top of that, the file Secret.txt is not shown and the user has no access to it. Finally, the last rule will show and give access to anything ending on ‘bra’ with no extension and two characters in front of it. So, if there is a directory named ZEBRA the user will see it and have access to it. Note that just as before the order of access rules are very important. Serv-U looks at them from top to bottom and stops as soon as an applicable rule is found.

Single names without a path may be used: These will be applied to every file and directory name, on every drive. Moreover, the names can contain wildcards. This can be very useful to block access to certain files for all the directories the user has access to. Say one does not want users to upload (or rename) .exe files. Say files named Links.txt are used for link info and should not be shown to the user. A realistic setup for a user with home directory of C:\Users\Joe would be:

*.exe	- no access

Links.txt	- no access

C:\Userx\Joe	- read, write, delete, list, makedir, removedir, inherit access


Additional FTP Commands Supported by Serv-U
Extensions to FTP Supported by Serv-U

See Also

Serv-U supports a number of FTP standards:

•	RFC959	- The File Transfer Protocol

•	RFC1123	- Requirements of Internet Hosts

•	RFC1579	- Firewall-Friendly FTP

•	RFC1760	- The S/KEY One-Time Password System

•	RFC2289	- A One-Time Password System

•	RFC2389	- Feature Negotiation Mechanism for the File Transfer Protocol

•	RFC2228	- FTP Security Extensions

•	RFC2246	- The TLS Protocol

•	draft-ietf-ftpext-mlst-15.txt	- Extensions to FTP

•	draft-murray-auth-ftp-ssl-05.txt	- Securing FTP with TLS

In addition, Serv-U supports a number of command extensions and non-standard FTP commands. They are listed below.

SSCN

This stands for Set Secured Client Negotiation, and tells the server how to handshake secure data connections using SSL. It is used for direct server-to-server transfers (FXP). The syntax is:

SSCN

SSCN [ON/OFF]

The command without any option returns the current SSCN setting, this can be "CLIENT METHOD" or "SERVER METHOD" (default). Sending "SSCN ON" switches to client method for SSL negotiations, "SSCN OFF" switches to server method.

CLNT

An FTP client can tell the server what brand and version it is by using the "CLieNT" command. The syntax is:

CLNT <client ID string>

The client ID string is displayed in the user activity pane.

XCRC

The XCRC command provides a mechanism for FTP clients to verify a file’s integrity on the server. It uses the standard CRC-32 algorithm to calculate a cyclic-redundancy-check, a "finger print" of the file. This syntax is:

XCRC <path/file>

XCRC <path/file> <end>

XCRC <path/file> <start> <end>

The path/file name can optionally be enclosed in quotes. The <end> parameter tells the server the offset where it should stop calculating the CRC. The <start> parameter is the offset where Serv-U should start calculating the CRC.

REST

This is the "RESTart" command, described in RFC959 for resuming file transfers. Serv-U, and all other FTP servers, use the REST command in a non-standard way. The syntax is:

REST <offset>

The <offset> parameter is required, and is the file offset where Serv-U should start resuming. The REST command has to be followed by STOR, RETR, PORT, or PASV. Any other command cancels the restart offset. REST can be used for resuming file downloads and uploads. In case of resuming a file upload normally ‘append’ access is required to resume at the end of the file, or ‘delete’ access to resume at any position in the file. In case a user reconnects from the same IP subnet and resumes within 12 hours of the initial file upload, only ‘write’ access is required.

NLST, LIST

These are the two FTP commands that deal with directory listings, NLST stands for "Name LiST", LIST is "LIST directory". LIST by default returns a long format directory listing with all files and directories, NLST returns a list of file names only (no directories) unless the option "NLST also lists directories" is enabled. Normally they do not have options, or rather, the only option according to RFC959 is a directory path or file, which should be listed. Serv-U’s version of the dir listing commands supports most of the UNIX ‘ls’ options, just like UNIX FTP servers do. These can be convenient for retrieving custom tailored directory listings. Supported options are:

-a	= list all entries including those starting with '.'

-b	= force printing of non-printable characters in octal

-c	= use modification time for listing sorting

-d	= if argument is a dir list only name, not contents

-e 	= list only files

-f	= enable -a, -U, disable -l, -s

-i	= print i-node number in first column

-k	= use 1024 bytes for block size (default is 512 bytes)

-l	= list in long format (default for LIST)

-m	= stream output, list accross page separated by commas

-n	= like -l, but use UID and GID numbers instead of names

-o	= like -l, but without the group info

-p	= put '/' after directory names

-q	= print non-printable characters as '?'

-r	= reverse sort order

-s	= give size of each entry in blocks

-t	= sort by modification time instead of name

-u	= use time of last access for sorting

-w:NN	= set line length to NN characters (default is 80)

-x	= multi-column output with entries sorted accross

-A	= list all entries, except for '.' and '..'

-B	= ignore names ending on '~' for dir listing

-C	= multi-column output with entries sorted down

-F	= put '/' after dir names, '@' after links

-G	= do not display group info

-I:"XX"	= add pattern XX to the list of patterns to ignore

-L	= if argument is a link, list file or dir it references

-N	= force printing of non-printable characters

-Q	= quote names as C-syntax strings

-R	= recursively list sub directories

-S	= sort by size (default is date)

-T	= show extended date/time info for long format listings

-U	= do not sort dir listing

-X	= sort by extension of the name (default is date)

-1	= print one entry per line of output

Most client FTP programs do not let you specify options to the dir listing command, which means these options will not help you much. The command line client which comes with Windows 95 and NT does let you specify options, just add them to the command. For example ‘dir -lR’ will make a long format recursive listing of all files and directories at or below your current directory.

MDTM

Like the previous commands this is from the UNIX world and it lets you query the server for the "Modification Date and TiMe" of a file or directory. Unlike UNIX Serv-U also lets the client set the modification date and time of files on the server, if the user has sufficient access rights to do this. Its use is in synchronizing uploaded files with those on the client. Normally FTP has no way to explicitly set the date of uploaded files, they simply get the date they were created on the server. MDTM lets the client change that so they get the date of the original file on the server. Works for directories too. The syntax to set the date and time is:

MDTM <yyyymmddhhmmss[+-zzz]> <path/file>

Where <yyyymmddhhmmss> is optional, if missing MDTM simply returns the modification date and time of the specified file. If present it is the year, month, day, hour, minutes, and seconds the file should get set to, in UTC. The next part, [+-zzz], is optional time zone information of the FTP client in minutes relative to UTC. If the client provides this info Serv-U will take care to convert the date and time to the proper local time at the server, so dates and times are kept consistent (a file created at 4 in the morning in the Eastern US would be created at 10 in Central Europe). If no time zone info is given Serv-U assumes you are specifying UTC. Many FTP client programs support the MDTM command. The command line FTP client lets you send this by adding the ‘quote’ command, so an example would be ‘quote mdtm 19980525162603 file.txt’.

SITE EXEC

This is the "SITE EXECute" command, to remotely start programs on the server. The syntax is:

SITE EXEC <command line>

If the user has sufficient privileges this will execute the specified command line on the server.

SITE INDEX

This command from the Macintosh world was added to better support the Mac FTP client Fetch. It lets the client retrieve a recursive directory listing via the command connection. The syntax is:

SITE INDEX <path>

The path may contain wildcard characters in its last part, to allow selective retrieval of for example all text files. The command line FTP client would do this (for example) by using ‘quote site index *.txt’.

SITE PSWD

This is the "SITE PaSsWorD" command for changing the user’s password remotely via a FTP client program. Normally FTP does not allow the user to change their password. If the user has sufficient privileges this will make life easier for the system administrator by leaving password changes up to the user. The syntax is:

SITE PSWD <oldpassword> <newpassword>

The passwords may alternatively be enclosed by quotes. This can be useful in case one of the passwords contains spaces. Few FTP clients support this command at the moment. FTP Voyager is one of the few, and in CuteFTP you can add it ‘by hand’. Of course, the command line FTP client also lets you use this command by using it via ‘quote’.

SITE ZONE

Sometimes a FTP client program needs to know the time zone of the server, for example to adapt the dates and times in a directory listing to the local time. This option reveals the server’s time zone relative to UTC. The syntax is:

SITE ZONE

A typical reply would look like this:

210 UTC-240

This would indicate the server is 240 minutes behind UTC. The time shown already takes summer time into account (daylight savings time as it is called in some parts of the world).

SITE SET TRANSFERPROGRESS

This command is for turning notification to the FTP client about the progress of a file transfer on or off. When switched on the server will inform the client every few seconds on the file transfer progress. Having feedback of the progress of a file transfer is especially useful during direct server-to-server transfers (Also named 'FXP'). The syntax is:

SITE SET TRANSFERPROGRESS ON

This will switch transfer progress notification on.

SITE SET TRANSFERPROGRESS OFF

This will switch transfer progress notification off.

SITE CHMOD

The "SITE Change Mode" command comes from UNIX where it is used to change access rights for files and directories. There is no direct equivalent in Windows, it has been added due to popular demand, even though it does not make a whole lot of sense in a Windows file system context. The syntax is:

SITE CHMOD <nnnn> <path/file>

In this <nnnn> is the permission code in octal format. First number is for setting IDs and is not supported by Serv-U, second number is for setting ‘owner’ permissions, third number is for setting ‘group’ permissions and not supported by Serv-U, fourth and last number is for setting ‘other’ permissions and not supported by Serv-U. The octal number format is:

4 = read permission

2 = write permission

1 = search/execute permission

For FTP clients that support the CHMOD command, you can change the file's ‘read-only’ and ‘hidden’ attributes. The server will only look at the ‘owner’ number of the CHMOD command (ie. ‘group’ and ‘other’ are ignored). To make a file read-only the ‘read’ bit has to be set while the ‘write’ bit has to be reset. For the command this means "SITE CHMOD 4xx file.txt" (with "xx" any value) or "SITE CHMOD 5xx file.txt". To remove the read-only attribute just set the "read" and "write" bits, ie. "SITE CHMOD 6xx file.txt". To set the hidden attribute of a file both the "read" and "write" bits need to be reset, ie. "SITE CHMOD 0xx file.txt". Directory listings reflect the file's attributes by showing "r--" for read-only files and "---" for hidden files.

SITE MSG

The "SITE MeSsaGe" command can be used to send a message from an FTP client to the system administrator. The system administrator has the ability to view and send messages back, through the Administrator program. The syntax is:

SITE MSG <message>


Add-on DLLs Overview

See Also

Serv-U supports several mechanisms to extend or modify the server and add support for external sources of account information. This offers virtually endless possibilities, such as:

•	Using an external database to verify user account information and file access

•	Create custom logging of server events

•	Add custom commands

•	Override existing commands

•	Drive actions based on FTP server events

•	And much, much more …

Coupling with Serv-U is done through DLLs that export specific functions, which are then called by Serv-U based on server events. Two types of add-on DLLs are supported (both can be combined in a single DLL though):

User Access Verification DLLs

Every time Serv-U needs to verify access or retrieve an account setting that cannot be found in the internal user database it dispatches an event to the DLL. The access verification DLL can then either provide the information, grant access, or block access.

Event Notification and Hook DLLs

Almost all server actions generate an event that is dispatched to an event notification DLL. For a number of key server commands these events allow the DLL to block or change commands as it sees fit.  This makes for a powerful mechanism to change or extend the FTP server behavior.


Access Verification DLLs Overview

See Also

Serv-U can use an external DLL to verify client access and retrieve information such as a client's home directory etc. If one of more external DLLs are specified and Serv-U cannot find the appropriate information internally it will question each of the external DLL's in turn. This can be used to create an interface to external user databases, which can then control FTP server access. With the appropriate DLL, for example the NT build-in user database could be used, or a Novell user database.

Setup

To make Serv-U use external DLLs for client access verification the DLL names need to be added to the ServUDaemon.ini file. There is currently no interactive user setup to do this, so the INI file has to be edited directly with a text editor such as NotePad. There can be more than one DLL, and Serv-U will query them in the order specified until one of the DLLs signals that it had the required information.

The DLL names need to be added to a section named '[EXTERNAL]'. The format is as follows (using made-up DLL names):

[EXTERNAL]

ClientCheckDLL1=CHKNOVELL.DLL

ClientCheckDLL2=CHKNT.DLL

            .

            .

The file names can be either full path names, or file names only. If the full path is specified then Serv-U will look at that path only. If a file name is given with path information Serv-U will first look in the program directory, then the current directory, the entire PATH, and finally in the Windows directories.

DLL Specifications

Upon startup Serv-U looks for DLLs in the ‘[EXTERNAL]’ section of the ServUDaemon.ini file and tries to bind to a specific function in the DLLs. The DLL entry point for Serv-U needs to be the following function:

int __cdecl HandleClientEvent(RClientEventStr* pEventStruc)

Please note that the function name is case sensitive and uses the "C" calling convention. This is defined as "generate underbars, case sensitive, push parameters right to left, calling function cleans stack". For the Borland line of C/C++ compilers (and those were used to create Serv-U) this is the default calling convention, or it can be specified explicitly by using the ‘__cdecl’ keyword. For other compilers you may have to use a different keyword. Check your compiler’s documentation for a matching type. Using the wrong calling convention will likely result in a program crash immediately during or after the first time Serv-U tries to call the HandleClientEvent() function.

The function should return TRUE (=1) if it handled the event and does not want it to be passed on to the next DLL. It should return FALSE (=0) in case it did not handle the event.

The RClientEventStr structure is defined as follows:

struct RClientEventStr {

  int Event;	// event code

  int Flag;	// flag, meaning depends on event

  char User[40];	// user name

  char Aux[512];	// auxiliary area, usage depends on event

  char HostIP[16];	// server domain IP address

  unsigned long SessionID;	// unique session ID

  int DomainID;	// unique ID for the domain the client connected to

  int DomainPort;	// server domain port number the client connected to

}

The 'Event' code determines the nature of the request and can have the following values:

#define SRVU_LoginMesFile 	1	// get login message file

#define SRVU_HomeDir 	2	// get home dir

#define SRVU_Password 	3	// verify password

#define SRVU_IPAccess 	4	// verify IP access

#define SRVU_WriteFile 	5	// verify write access

#define SRVU_ReadFile 	6	// verify read access

#define SRVU_ModifyFile 	7	// verify mod./del. file access

#define SRVU_ExecProg 	8	// verify execute access

#define SRVU_ListDir 	9	// verify dir listing access

#define SRVU_ChangeDir 	10	// verify dir change access

#define SRVU_DeleteDir 	11	// verify dir delete access

#define SRVU_CreateDir 	12	// verify dir create access

#define SRVU_HideHidden 	13	// get setting for 'hide hidden files'

#define SRVU_RelPaths 	14	// get setting for 'relative paths'

#define SRVU_RatioType 	15	// get setting for type of ratios

#define SRVU_RatioDown 	16	// get setting for download ratio

#define SRVU_RatioUp   	17	// get setting for upload ratio

#define SRVU_RatioCredit 	18	// get/adjust ratio credit setting

#define SRVU_RatioFree 	19	// verify if file is free for ratios

#define SRVU_QuotaEnable 	20	// verify if disk quota is enabled

#define SRVU_QuotaChange 	21	// change in disk quota

#define SRVU_QuotaMax 	22	// maximum disk quota

#define SRVU_AlwaysLogin 	23	// always allow login

#define SRVU_OneLoginPerIP 	24	// allow one login per user/IP pair

#define SRVU_LogClientIP 	25	// log client from this IP address

#define SRVU_SpeedLimit 	26	// maximum transfer speed

#define SRVU_PassChange 	27	// change user's password

#define SRVU_TimeOut 	28	// get user time-out value

#define SRVU_MaxUsers 	29	// max. no. of users for account

#define SRVU_PassChallenge 	30	// get password challenge if needed

#define SRVU_Connect 	31	// information only: client connected

#define SRVU_Close 	32	// information only: client disconnected

#define SRVU_MaxLoginPerIP 	33	// max. no. of logins from same IP for user

#define SRVU_VerifyPasswd 	34	// verify old password before changing it

#define SRVU_AppendFile 	35	// verify append file access

#define SRVU_SignOnMes 	36	// get signon message file

#define SRVU_SignOffMes 	37	// get signoff message file

#define SRVU_Maintenance 	38	// switch to maintenance mode

#define SRVU_SessionTimeOut 	39	// session time-out

#define SRVU_SecureOnly 	40	// only allow login over secure connection

Be sure to read the section on access verification events before implementing a DLL!


Notes on Using Access Verification Events
Notes on Access Verification Events

See Also

The following pages give a detailed description of all the events used in access verification DLLs. Please carefully review the following notes before attempting to implement a DLL.

Event Structure

If your DLL does not handle an event do not change anything in the event structure! The same event structure is passed on to other DLLs, and any changes you make to it while not handling the event will cause the wrong information to be passed on. Also, even if you handle an event, only change those items in the structure as are indicated in the event details on the following pages! For example, if an event like SRVU_ListDir states that only the ‘Flag’ should be changed on return this means it has to return with the path in ‘Aux[]’, just as it found it when the DLL was called. Serv-U’s code relies on this behavior in many places to save unnecessary copying of strings. For the same reason you should never pretend to handle an event by indicating this in the return value unless you comply with all the event requirements. If, for example, SRVU_RatioType requires a string indicating ratio type in ‘Aux[]’ on return then you must set this to one of those strings if you handle the event. Telling Serv-U you handled the event while not putting a value in ‘Aux[]’ on return will at best have unpredictable results and at worst cause random crashes! Finally, some events require you to set the ‘Flag’ to indicate if the DLL handled an event or not, like SRVU_RelPaths for example. This is in addition to the DLL function return value, which should also indicate if the event was handled or not. If the DLL is not handling the event it should not change the ‘Flag’ value! This is a rather convoluted way of working, in fact, that’s exactly how it got to be: The DLL mechanism closely follows Serv-U’s internal events and copies rather directly between its internal structures and the DLL structure. To keep this working for new types of events when Serv-U evolved it got to be the way it is. There probably are better ways to do the job, but we are stuck with it.

Another bit of weirdness in the DLL mechanism which comes from Serv-U’s internal way of working is for those events that require a 0 or 1 to be set in ‘Aux[0]’ to indicate the result (SRVU_HideHidden is an example). These events require a binary 0 or 1 to be set, not the ASCII value for 0 or 1. In other words, what is needed is hex 0x00 or 0x01 in ‘Aux[0]’.

A number of fields of the RClientEventStr structure are not always explicitly mentioned. They can be assumed to be set to their respective values whenever these are available (i.e. use common sense). These are: The ‘User’ field, which is set to the client’s user name when this is available (during and after the USER command). The ‘HostIP’ field is set to the server’s domain IP address to which the client connected. The ‘DomainPort’ field is set to the server’s domain port number to which the client connected. The ‘DomainID’ field is set to a unique number identifying the domain to which the client connected. The ‘SessionID’ field contains a unique session ID number for a client. This can be used to keep track of client state when needed.

Session ID

Note that some events can get called without a session ID (it is then set to 0) in case security info is needed which is not session specific, for example for a directory listing a SRVU_ListDir event is issued with the ‘SessionID’ set to 0 since the result is cached for re-use by other sessions.

Session State

There are two events, SRVU_Connect and  SRVU_Close, which might seem out-of-place since they are only for information to the DLL and do not require any decision. Their function is to allow the DLL to keep track of state of the connected users.

Performance

A number of events get called often and in rapid succession. For example, during a directory listing every entry in the listing results in a SRVU_ListDir event. It is imperative that the DLL responds rapidly, or slow server performance will result. In case events result in a (slow) database lookup the solution may be to cache these lookups so they are not repeated for each event for the same client. The SRVU_Connect and SRVU_Close events can be used for this purpose to keep track of a client connecting/disconnecting and cache access rules. Another approach is to cache all account information on a least-recent-used basis, this is what Serv-U uses internally.


SRVU_LoginMesFile

See Also

Request for the file containing the login message.

On entry:

User =	user name

On return:

Flag =	TRUE (=0x01) if file name was found, FALSE (=0x00) otherwise

Aux =	path and file name of login message file, if one was found


SRVU_HomeDir

See Also

Retrieve the user’s home directory. The returned path should be a full path name including drive.

On entry:

User =	user name

On return:

Flag =	TRUE if home dir was found, FALSE otherwise

Aux =	home dir (full path), if one was found

Note:

In case a user account is disabled Flag = FALSE (i.e. 'no home dir') should be returned.


SRVU_Password

See Also

Verify if the user’s password is correct and the user should be logged in.

On entry:

User =	user name

Aux =	password the user entered, after the ‘\0’ of the password the original user name is passed, in original case and not truncated

On return:

Flag =	TRUE if password was correct, FALSE otherwise


SRVU_IPAccess

See Also

Verify access of the client based on IP address/name.

On entry:

User =	user name if available

Aux =	IP address of client, in text format

On return:

Flag =	TRUE if access is allowed, FALSE otherwise

Note1:

If no user name is present it means the client has just connected (i.e. before login) and a check should be made for server-wide IP access. If a user name is present access should be checked for that particular user only.

Note2:

If a symbolic IP name is available it is tagged-on to the IP address in Aux[] (i.e. behind the first '\0'). If there's no IP name the IP number ends with a double '\0' character.


SRVU_WriteFile

See Also

Verify if write access should be allowed for a file. Write access does not include access to modify or delete an existing file, only new files can be created and written by it.

On entry:

User =	user name

Aux =	full path of file

On return:

Flag =	TRUE if access is allowed, FALSE otherwise


SRVU_ReadFile

See Also

Verify if read access should be allowed for a file.

On entry:

User =	user name

Aux =	full path of file

On return:

Flag =	TRUE if access is allowed, FALSE otherwise


SRVU_ModifyFile

See Also

Verify if modify access should be allowed for a file. Modify access allows the user to modify and delete an existing file. This also automatically includes write access to the file.

On entry:

User =	user name

Aux =	full path of file

On return:

Flag =	TRUE if access is allowed, FALSE otherwise


SRVU_ExecProg

See Also

Verify if the user has the right to execute a program on the server. Be aware that allowing execute access forms a potential security hole since there is no control over what the executed program might do on the server. Also note that the actual execution is done via the FTP command SITE EXEC, which is a Serv-U specific extension and not part of the FTP standard.

On entry:

User =	user name

Aux =	full path and name of program to-be-executed

On return:

Flag =	TRUE if access is allowed, FALSE otherwise


SRVU_ListDir

See Also

Verify if file list access should be allowed for a file or directory. Each directory entry to-be-listed generates an event.

On entry:

User =	user name

Aux =	full path of file or directory entry to-be-listed

On return:

Flag =	TRUE if access is allowed, FALSE otherwise


SRVU_ChangeDir

See Also

Verify if change directory access should be allowed to a (target) directory.

On entry:

User =	user name

Aux =	full path of directory

On return:

Flag =	TRUE if access is allowed, FALSE otherwise


SRVU_DeleteDir

See Also

Verify if the user should be allowed to delete a directory. Note that this does not mean the user can delete directories containing files, even if access is granted.

On entry:

User =	user name

Aux =	full path of directory

On return:

Flag =	TRUE if access is allowed, FALSE otherwise


SRVU_CreateDir

See Also

Verify if the user should be allowed to create a directory.

On entry:

User =	user name

Aux =	full path of directory

On return:

Flag =	TRUE if access is allowed, FALSE otherwise


SRVU_HideHidden

See Also

Determine if files/dirs with the ‘hidden’ attribute should be shown or not in directory listings. By default all files/dirs are shown in listings.

On entry:

User =	user name

On return:

Flag =	TRUE if request was handled by DLL, FALSE otherwise

Aux = 	Aux[0]=0x01 if server should hide 'hidden' files

Aux[0]=0x00 if server should show 'hidden' files


SRVU_SecureOnly

See Also

Inform the server if the user should only be allowed to log in over a secure connection.

On entry:

User =	user name

On return:

Flag =	TRUE if request was handled by DLL, FALSE otherwise

Aux =	Aux[0]=0x01 if user account can only log in on a secure connection

Aux[0]=0x00 if user can log in on a secure or regular connection


SRVU_RelPaths

See Also

Inform the server if all paths reported to the user should be shown relative to the user’s home directory. In essence this cuts off the home directory from all paths, i.e. the home directory itself is shown as ‘/’ when enabled.

On entry:

User =	user name

On return:

Flag =	TRUE if request was handled by DLL, FALSE otherwise

Aux =	Aux[0]=0x01 if server should use 'relative paths'

Aux[0]=0x00 if full path names should be shown


SRVU_RatioType

See Also

Inform the server if upload/download ratios should be enabled, and if so, what type of ratios should be used.

On entry:

User =	user name

On return:

Flag =	TRUE if request was handled by DLL, FALSE otherwise if U/D ratios should be disabled also return FALSE

Aux =	set to the textual representation of the ratio type, as used in the INI file, possible entries are:

"FilesPerSession" = count files for each session

"BytesPerSession" = count bytes for each session

"BytesOverall" = count bytes over all sessions

"FilesOverall" = count files over all sessions

Note:

The return text in Aux is without quotes, i.e. it should contain just the word (FilesPerSession, BytesPerSession, BytesOverall, or FilesOverall).


SRVU_RatioDown

See Also

Server request of the numerical value for the download part in UL/DL ratios.

On entry:

User =	user name

On return:

Flag =	TRUE if request was handled by DLL, FALSE otherwise

Aux =	set to the textual representation of the download ratio, i.e. an unsigned 32-bit number written as a text string


SRVU_RatioUp

See Also

Server request of the numerical value for the upload part in UL/DL ratios.

On entry:

User =	user name

On return:

Flag =	TRUE if request was handled by DLL, FALSE otherwise

Aux =	set to the textual representation of the upload ratio, i.e. an unsigned 32-bit number written as a text string


SRVU_RatioCredit

See Also

Used to either retrieve a user’s current UL/DL ratios credit value, or to modify the existing value in case an "over all session" ratio setting is used.

On entry:

User =	user name

Aux =	set to the textual representation of the value to add to the credit (a floating point number, can be negative) set to "0" if the request is to obtain the current value

On return:

Flag =	TRUE if request was handled by DLL, FALSE otherwise

Aux =	set to the textual representation of the (new) credit value (a floating point number which can be negative)

Note:

All 'credit' calculations should be done with sufficient precision. In C a double is recommended.


SRVU_RatioFree

See Also

Verify if a file should not count towards the user’s upload/download ratio credit.

On entry:

User =	user name

Aux =	set to the path/file name of the file to check if it should be downloadable without affecting credit

On return:

Flag =	TRUE if file is ‘free’, otherwise FALSE


SRVU_QuotaEnable

See Also

Verify if disk quota limitations should be enabled for a user.

On entry:

User =	user name

On return:

Flag =	TRUE if request was handled by DLL, FALSE otherwise

Aux =	Aux[0]=0x01 if disk quota limitations are enabled

Aux[0]=0x00 if there are no disk quota limitations


SRVU_QuotaChange

See Also

Used to either retrieve a user’s current in-use disk space value (in case Aux="0") or to ask for permission to change the amount of disk space in-use. The DLL should change its notion of the current quota value in the latter case to correctly handle multiple simultaneous users using the same FTP account.

On entry:

User =	user name

Aux =	set to the textual representation of the value to change the current in-use quota with, or set to "0" if the request is to obtain the currently used quota value in case the user wants to write a block to disk a negative value is passed, in case space is freed up a positive value is used.

On return:

Flag =	TRUE if request was granted by the DLL, FALSE otherwise

Aux =	in case current in-use quota info was requested this is set to the textual representation of the used quota value (a number that should always be positive), in case of a quota change no return value for Aux is required. Quota is counted in bytes.


SRVU_QuotaMax

See Also

Request for the maximum disk quota value for a user.

On entry:

User =	user name

On return:

Flag =	TRUE if request was handled by DLL, FALSE otherwise

Aux =	set to the textual representation of the maximum disk quota amount in bytes


SRVU_AlwaysLogin

See Also

Request if the user should always be allowed to log in, regardless of the maximum no. of users set up in the server.

On entry:

User =	user name

On return:

Flag =	TRUE if request was handled by DLL, FALSE otherwise

Aux =	Aux[0]=0x01 if user should always be allowed to log in

Aux[0]=0x00 if user should bounce if max. no. of  is reached


SRVU_OneLoginPerIP

See Also

Verify if the user should be allowed to log in only once from the same IP address.

On entry:

User =	user name

On return:

Flag =	TRUE if request was handled by DLL, FALSE otherwise

Aux =	Aux[0]=0x01 only one login allowed from same IP number

Aux[0]=0x00 multiple logins allowed from same IP number


SRVU_LogClientIP

See Also

Server request if a client with a specific IP address should appear in logging to file/screen.

On entry:

Aux =	IP address of client, in text format

On return:

Flag =	TRUE if client should be logged, FALSE otherwise


SRVU_SpeedLimit

See Also

Determine if a user should have a maximum network bandwidth.

On entry:

User =	user name

On return:

Flag =	TRUE if request was handled by DLL, FALSE otherwise in case no speed limit should be used by the server the DLL should also return FALSE.

Aux =	set to the textual representation of the maximum transfer speed in bytes/second, an optional second textual number can be added to indicate a different upload/download speed, numbers should be separated by ‘|’, first number is for upload speed limit, second for download speed limit


SRVU_PassChange

See Also

Verify attempt to change a user’s password. Note that this event is preceded by a SRVU_Password event to determine if the old password supplied by the user was correct.

On entry:

User =	user name

Aux =	the new password

On return:

Flag =	TRUE if the password was changed OK, FALSE if user is not allowed to change passwords


SRVU_TimeOut

See Also

Request for account idle time-out value.

On entry:

User =	user name

On return:

Flag =	TRUE if request was handled by DLL, FALSE otherwise

Aux =	set to the textual representation of the time-out value in minutes, a value of "-1" means there is no time-out.


SRVU_MaxUsers

See Also

Request for the maximum number of concurrently logged-in users for an account.

On entry:

User =	user name

On return:

Flag =	TRUE if request was handled by DLL, FALSE otherwise

Aux =	set to the textual representation of the maximum number of concurrent users for this account, a value of "-1" means there is no limit


SRVU_PassChallenge

See Also

In case the required password is part of a challenge-response type mechanism this event is used to tell Serv-U what challenge should be sent to the user. The S/KEY mechanism uses this, but it can also be used to implement other challenge-response access verification mechanisms.

On entry:

User =	user name

On return:

Flag =	TRUE if request was handled by DLL, FALSE otherwise

Aux =	set to the challenge reply text, including the return code, for example "331 Response to otp-md4 998 scan723 required for skey.", it is also possible to return 4xx and 5xx replies to block the user from logging in


SRVU_Connect

See Also

Connection information event, can be used by the DLL to maintain state.

On entry:

User =	server daemon version string in numerical format, for example "4.1.0.0"

Aux =	IP address of client, in text format

Note:

This event is the first event to be sent to the DLL when a user connects. It is for information only, do not change anything in the event structure.


SRVU_Close

See Also

Connection closure information event, can be used by the DLL to maintain state.

On entry:

User =	user name of client, if available

Note:

This event is the last event to be sent to the DLL when a user disconnects. It is for information only, do not change anything in the event structure.


SRVU_MaxLoginPerIP

See Also

Server request for the maximum number of concurrent logins from the same client IP address into the same user account.

On entry:

User =	user name

On return:

Flag =	TRUE if request was handled by DLL, FALSE otherwise

Aux =	set to the textual representation of the maximum number of concurrent logins for the same IP, a value of "-1" means there is no limit.


SRVU_VerifyPasswd

See Also

Verify if the user’s password is correct before a possible password change. This is different from SRVU_Password so the system has a chance to check actual passwords in cleartext even in a challenge-response type password system (As is used for S/KEY).

On entry:

User =	user name

Aux =	password the user entered, after the ‘\0’ of the password the original user name is passed, in original case and not truncated

On return:

Flag =	TRUE if password was correct, FALSE otherwise


SRVU_AppendFile

See Also

Verify if append access should be allowed for a file. Append access includes write access, but not modify or delete access to an existing file. The main purpose of append access is to facilitate resuming of file uploads.

On entry:

User =	user name

Aux =	full path of file

On return:

Flag =	TRUE if access is allowed, FALSE otherwise


SRVU_SignOnMes

See Also

Request for the file containing the sign-on message. This is the message sent to a client upon connection.

On entry:

IP =	server domain-IP to retrieve sign-on message for

On return:

Flag =	TRUE if file name is available, FALSE otherwise

Aux =	full path and file name of sign-on message file

Notes:

This event does not have a user name or session ID since sign-on message files should only be related to the server domain-IP to which the client connected. In case there is no IP specific message this event should be returned with Flag set FALSE.

The special IP of  "0.0.0.0" is used to request the message file that should be used for all those server IPs without a specific message file.

The server caches messages, and any changes to the file name or file contents can take up to 15 minutes to propagate through.


SRVU_SignOffMes

See Also

Request for the file containing the sign-off message. This is the message sent to the client just before the client gets disconnected after a QUIT command.

On entry:

IP =	server domain-IP to retrieve sign-off message for

On return:

Flag =	TRUE if file name was found, FALSE otherwise

Aux =	full path and file name of sign-off message file

Notes:

This event does not have a user name or session ID since sign-off message files should only be related to the server domain-IP to which the client connected. In case there is no IP specific message this event should be returned with Flag set FALSE.

The special IP of  "0.0.0.0" is used to request the message file that should be used for all those server IPs without a specific message file.

Messages are cached by the server, and any changes to the file name or file contents can take up to 15 minutes to propagate through.


SRVU_Maintenance

See Also

Server request to switch user to maintenance mode for remote setup/maintenance/monitoring of server.

On entry:

User =	user name

IP =	server home-IP of client

On return:

Flag =	TRUE if switch to maintenance mode allowed, FALSE otherwise

Aux =	either "SYSTEM" for system wide maintenance, "DOMAIN" for domain-wide maintenance,  "GROUP" for group-only setup, or "READONLY" for allowing administrator to view system/account info but not make any changes


SRVU_SessionTimeOut

See Also

Request for account session time-out value. This is the maximum amount of time a user can spend logged-in, the user gets disconnected forcefully when the session time-out is up, regardless of activity.

On entry:

User =	user name

On return:

Flag =	TRUE if request was handled by DLL, FALSE otherwise

Aux =	set to the textual representation of the time-out value in minutes, a value of "-1" means there is no session time-out.


Event Notification DLLs Overview

See Also

Serv-U can notify external DLL's of server events and these DLLs can block or modify certain server events (like uploads and downloads). This opens the way for add-ons to Serv-U like alternative log file formats and ‘filters’ for uploads and downloads as well as all forms of automated monitor and statistics software. Because there is a hook for all raw incoming commands as well as command replies, and the SITE command can also be hooked, it is possible to extend the server with any command one would want to add!

If you create an add-on that might be useful for other Serv-U users as well please let me know at Rob@cat-soft.com. You can find add-ons at the Serv-U Web and FTP sites; http://www.serv-u.com and ftp://ftp.cat-soft.com.

Setup

To make Serv-U use external DLLs for event notification and hooking the DLL names need to be added to the ServUDaemon.ini file. There can be more than one DLL, and Serv-U will query them in the order specified until one of the DLLs signals that it wants to block an event. This means in case of only event notification DLLs Serv-U will call all available DLL's.

The DLL names need to be added to a section named '[EXTERNAL]' of the ServUDaemon.ini file. The format is as follows (using made-up DLL names):

      [EXTERNAL]

      EventHookDLL1=WULOG.DLL

      EventHookDLL2=SRVUHOOK.DLL

            .

            .

The file names can be either full path names, or file names only. If the full path is specified then Serv-U will only look at that path. If only the file name is given Serv-U will first look in the program directory, then the current directory, the entire PATH, and finally in the Windows directories.

DLL Specifications

Upon startup Serv-U looks for DLLs in the ‘[EXTERNAL]’ section of the ServUDaemon.ini file and tries to bind to a specific function in the DLLs. The DLL entry point for Serv-U needs to be the following function:

WORD CALLBACK HandleEventHook(RFTPEventStr* pEventStruc)

The following return values are possible:

#define REVNT_None	0	// nothing

#define REVNT_Proceed	1	// let event pass

#define REVNT_Abort	2	// stop event

#define REVNT_Suspend	3	// suspend event until decision is made

For event notification only, the return value REVNT_None should be used. All the other values are intended for hooking of server events that can be passed or blocked by the DLL. The value REVNT_Proceed should be returned in case the event can proceed as normal. REVNT_Abort is used to make Serv-U abort an event in progress. The final value, REVNT_Suspend, should be used if the DLL cannot make an immediate decision and wants the server to suspend the user for which the event occurred until a decision is made at a later time. The latter is an outflow of the way Serv-U is made: It is single threaded using asynchronous sockets, so during processing by the DLL all server operations are halted. This is generally not a problem (the socket stack still continues sending and receiving packets until its buffers are exhausted), but if the DLL needs more than a second or so to process the request it should spawn a separate thread and return REVNT_Suspend. It can then signal via a message at a later time that it has an answer ready. The section on hooking events has more details on using this.

The event notification structure is as follows:

struct RFTPEventStr {

// event info

DWORD  Event;	// event code

DWORD  SubEvent;	// sub-event code

// user info

DWORD SessionID;	// unique ID of the FTP session

char User[40];	// user name

char ClientIP[16];	// IP address of client

char DomainIP[16];	// server IP address the client connected to

// event attributes

DWORD Duration;	// duration of events (in ms)

DWORD Size;	// size of object (i.e. transferred)

// hook info

HWND hWindow;	// window handle to post decision to

UINT Message;	// message to post

char* pReplyText;	// pointer to text to send to user

// scratch pad area

char AuxOne[512];	// auxiliary area one

char AuxTwo[512];	// auxiliary area two

// domain info

DWORD DomainPort;	// server port the client connected to

DWORD DomainID;	// unique ID for the domain the client connected to

// more size info

DWORD HiSize;	// high 32 bits of size info (full size is 64 bit value)

};

Not all fields are used for every type of event. The fields used for specific events will be discussed in the event details. Most of the fields have a specific meaning that is constant throughout their usage. Several fields are always present, for every event notification call, and the handler DLL can assume they are valid at all times. These are: ‘SessionID’, ‘ClientIP’, ‘DomainIP’, ‘DomainPort’, ‘DomainID’, ‘hWindow’, and ‘Message’. As soon as a user name is known by the server (i.e. after the USER command) the ‘User’ field is also filled.

Information about the domain that the client connected to can be obtained from the variables ‘DomainIP’, ‘DomainPort’, and ‘DomainID’. Logically these belong together, but due to history they don’t appear together in the event structure.

A similar story goes for the ‘HiSize’ member. This works together with ‘Size’ variable to form a 64-bit number together. ‘Size’ is an unsigned 32-bit integer with the lower portion of the size information, ‘HiSize’ contains the higher 32 bits. Any time size information is available both values are set.

Note:

Do not change any of the fields in the structure while handling the event! The same structure is passed on to other event notification DLLs (in case there are multiple DLLs).

The ‘Events’ codes used for notification are:

#define EVNT_None 	0	// none

#define EVNT_IPName 	1	// symbolic IP name available

#define EVNT_Connect 	2	// connection was made

#define EVNT_Close 	3	// closed connection

#define EVNT_BouncedIP 	4	// bounced client because of IP address

#define EVNT_TooMany 	5	// bounced user because there are too many

#define EVNT_WrongPass 	6	// too many times wrong password

#define EVNT_TimeOut 	7	// connection timed out

#define EVNT_Login 	8	// use logged in

#define EVNT_StartUp 	9	// start upload of file

#define EVNT_EndUp 	10	// successful upload of file

#define EVNT_StartDown 	11	// start of download of file

#define EVNT_EndDown 	12	// successful download of file

#define EVNT_AbortUp  	13	// aborted upload

#define EVNT_AbortDown 	14	// aborted download

#define EVNT_Rename 	15	// renamed file/dir

#define EVNT_DelFile 	16	// deleted file

#define EVNT_DelDir 	17	// deleted dir

#define EVNT_ChgDir 	18	// changed working directory

#define EVNT_MakeDir 	19	// created directory

#define EVNT_ProgUp 	20	// progress of upload

#define EVNT_ProgDown 	21	// progress of download

#define EVNT_Maintenance 	22	// user switching to maintenance mode

The ‘SubEvent’ codes are:

#define SEVNT_None	0	// no sub-event

#define SEVNT_ErrWrite	1	// problem writing to disk

#define SEVNT_ErrRead	2	// problem reading from disk

#define SEVNT_ErrQuota	3	// insufficient disk quota

#define SEVNT_ErrTOut	4	// packet timed out

#define SEVNT_ErrAbort	5	// user aborted transfer

#define SENVT_ErrUnknown	6	// unknown error

#define SEVNT_ErrClose	7	// data connection closed unexpectedly

#define SEVNT_System	8	// switching to SYSTEM maintenance mode

#define SEVNT_Group	9	// switching to GROUP maintenance mode

#define SEVNT_Domain	10	// switching to DOMAIN maintenance mode

#define SEVNT_ReadOnly	11	// user switching to READ-ONLY maintenance mode

The ‘Event’ codes used for hooked events are:

#define EVNT_HookDown 	100	// hook for file downloads

#define EVNT_HookUp 	101	// hook for file uploads

#define EVNT_HookAppend 	102	// hook for append file upload

#define EVNT_HookUnique 	103	// hook for unique name upload

#define EVNT_HookRename 	104	// hook for rename file/dir

#define EVNT_HookDelFile 	105	// hook for delete file

#define EVNT_HookDelDir 	106	// hook for delete dir

#define EVNT_HookMkd 	107	// hook for make directory

#define EVNT_HookSite 	108	// hook for the SITE command

#define EVNT_HookChgDir 	109	// hook for change dir command

#define EVNT_HookCommand 	110	// hook for raw FTP command

#define EVNT_HookReply 	111	// hook for raw FTP reply

Before implementing a DLL that hooks events be sure to read the implementation notes.


EVNT_None

See Also

Placeholder only. Not dispatched to DLL.


EVNT_IPName

See Also

This event is sent as soon as a symbolic IP name becomes available. This only happens if IP name logging for that user is switched on, or if the IP access rules require a symbolic IP name.

Event = EVNT_IPName

SubEvent = SEVNT_None

AuxOne = symbolic IP name


EVNT_Connect

See Also

This event is sent when a FTP client connects to the server. This is normally the first event to occur for a client.

Event = EVNT_Connect

SubEvent = SEVNT_None

AuxOne = server daemon version string in numerical format, for example "4.1.0.0"


EVNT_Close

See Also

This event is dispatched just before the client is disconnected from the. This is normally the last event to occur for a client’s session.

Event = EVNT_Close

SubEvent = SEVNT_None

Duration = connection time in seconds


EVNT_BouncedIP

See Also

This event is posted in case the client's IP address or symbolic IP name do not pass the IP access rules of Serv-U.

Event = EVNT_BouncedIP

SubEvent = SEVNT_None

AuxOne = set to symbolic IP name if available, empty string otherwise

 	User = set to user name in case the IP access rules were user specific


EVNT_TooMany

See Also

Event used when the limit of concurrently logged in users is reached.

Event = EVNT_TooMany

SubEvent = SEVNT_None


EVNT_WrongPass

See Also

This event is dispatched in case the user tried too many times to log in and did not have a correct password.

Event = EVNT_WrongPass

SubEvent = SEVNT_None


EVNT_TimeOut

See Also

This event is sent when the inactivity counter times out. This occurs just before the connection is closed.

Event = EVNT_TimeOut

SubEvent = SEVNT_None


EVNT_Login

See Also

This event gets posted immediately after a client logs in successfully.

Event = EVNT_Login

SubEvent = SEVNT_None

AuxOne = password (for anonymous users only)


EVNT_StartUp

See Also

This event is sent when an upload is started, i.e. transferring a file from client to server.

Event = EVNT_StartUp

SubEvent = SEVNT_None

AuxOne = file name (complete path)


EVNT_EndUp

See Also

This event gets posted when a file has been uploaded successfully.

Event = EVNT_EndUp

SubEvent = SEVNT_None

AuxOne = file name (complete path)

AuxTwo = transfer mode (as text)

Duration = duration of upload in milliseconds

Size = lower 32 bits of bytes uploaded

HiSize = higher 32 bits of bytes uploaded


EVNT_StartDown

See Also

This event is sent when a download is started, transferring a file from server to client

Event = EVNT_StartDown

SubEvent = SEVNT_None

AuxOne = file name (complete path)


EVNT_EndDown

See Also

After a file has been downloaded successfully this event is dispatched.

Event = EVNT_EndDown

SubEvent = SEVNT_None

AuxOne = file name (complete path)

AuxTwo = transfer mode (as text)

Duration = duration of download in milliseconds

Size = lower 32 bits of bytes downloaded

HiSize = higher 32 bits of bytes downloaded


EVNT_AbortUp

See Also

This event occurs in case of an error during a file upload.

Event = EVNT_AbortUp

SubEvent = One of the sub-event codes

AuxOne = file name (complete path)

AuxTwo = transfer mode (as text)

Duration = duration of upload in milliseconds until the error

Size = lower 32 bits of bytes uploaded when the error occured

HiSize = higher 32 bits of bytes uploaded

Note:

Valid SubEvent's are SEVNT_ErrWrite, SEVNT_ErrQuota, SEVNT_ErrAbort, SEVNT_ErrClose, SEVNT_ErrTOut, SEVNT_ErrUnknown, and SEVNT_None.


EVNT_AbortDown

See Also

This event occurs in case of an error during a file download.

Event = EVNT_AbortDown

SubEvent = One of the sub-event codes

AuxOne = file name (complete path)

AuxTwo = transfer mode (as text)

Duration = duration of upload in milliseconds until the error

Size = lower 32 bits of bytes uploaded when the error occured

HiSize = higher 32 bits of bytes downloaded

Note:

Valid SubEvent's are SEVNT_ErrRead, SEVNT_ErrAbort, SEVNT_ErrClose, SEVNT_ErrTOut, SEVNT_ErrUnknown, and SEVNT_None.


EVNT_Rename

See Also

This event is sent when a file or directory is renamed successfully.

Event = EVNT_Rename

SubEvent = SEVNT_None

AuxOne = original file/dir name (complete path)

AuxTwo = new file/dir name (complete path)


EVNT_DelFile

See Also

This event is posted when a file is deleted successfully.

Event = EVNT_DelFile

SubEvent = SEVNT_None

AuxOne = name of deleted file (complete path)


EVNT_DelDir

See Also

This event is posted when a directory is deleted successfully.

Event = EVNT_DelDir

SubEvent = SEVNT_None

AuxOne = name of deleted directory (complete path)


EVNT_ChgDir

See Also

When user changed to a new directory this event is dispatched.

Event = EVNT_ChgDir

SubEvent = SEVNT_None

AuxOne = new working directory (complete path)


EVNT_MakeDir

See Also

This event gets posted when user created a new directory successfully.

Event = EVNT_MakeDir

SubEvent = SEVNT_None

AuxOne = newly created directory (complete path)


EVNT_ProgUp

See Also

During a file upload this event is posted every few seconds to inform about file upload progress.

Event = EVNT_ProgUp

SubEvent = SEVNT_None

AuxOne = file name (complete path)

AuxTwo = transfer mode (as text)

Duration = duration so far of upload in milliseconds

Size = lower 32 bits of file size uploaded so far in bytes

HiSize = higher 32 bits of uploaded file size so far


EVNT_ProgDown

See Also

During a file download this event is posted every few seconds to inform about file download progress.

Event = EVNT_ProgDown

SubEvent = SEVNT_None

AuxOne = file name (complete path)

AuxTwo = transfer mode (as text)

Duration = duration so far of download in milliseconds

Size = lower 32 bits of  file size downloaded so far in bytes

HiSize = higher 32 bits of downloaded file size so far


EVNT_Maintenance

See Also

This event is issued when the user switches to server maintenance mode for remote setup and maintenance of the FTP server.

Event = EVNT_Maintenance

SubEvent = SEVNT_System, SEVNT_Group, SEVNT_Domain,  or SEVNT_ReadOnly

Note:

The sub-event code indicates if the user is allowed to perform system wide maintenance or group/domain/read-only maintenance only.


Notes on Hook Events

See Also

The previous sections described ‘passive’ event notification. The DLL would get informed of events but was not able to intervene in them. There are a number of 'hook events' that let the DLL actively participate in FTP commands. The DLL can decide to abort the command, in some cases change the command or parameters, or let it proceed. The hook events are:

#define EVNT_HookDown	100	// hook for file downloads

#define EVNT_HookUp	101	// hook for file uploads

#define EVNT_HookAppend 	102	// hook for append file upload

#define EVNT_HookUnique 	103	// hook for unique name upload

#define EVNT_HookRename 	104	// hook for rename file/dir

#define EVNT_HookDelFile 	105	// hook for delete file

#define EVNT_HookDelDir 	106	// hook for delete dir

#define EVNT_HookMkd 	107	// hook for make directory

#define EVNT_HookSite 	108	// hook for the SITE command

#define EVNT_HookChgDir 	109	// hook for change dir command

#define EVNT_HookCommand 	110	// hook for raw FTP command

#define EVNT_HookReply 	111	// hook for raw FTP reply

Hooking Events

The procedure is as follows: A hook event is passed on to the DLL after the initial tests for that command have been passed. For example, for a file download the user needs access to that file, and the file has to exist. When the DLL receives a hook event it can decide between three return codes, REVNT_Proceed is used to let the event proceed, REVNT_Abort stops the event from proceeding and aborts the FTP command initiating it, and REVNT_Suspend is a return code that puts the command interpreter for the client on whose behalf the event was posted in suspended mode. This means no commands are accepted during that time (all other clients can proceed normally), and the server waits for a message from the DLL telling it to call back to get the decision if the event should proceed or not.

The REVNT_Suspend code and the reason Serv-U needs it warrants a little more explanation. Serv-U was originally made in the good old Windows 3.1 days when there was no pre-emptive multi-tasking. To make a server that really works, 'asynchronous' sockets were needed which resulted in a server that is single-threaded. In this particular case of catching events and deciding if they should proceed or not this is important. Because Serv-U is single-threaded the server is blocked from serving other clients while it is in the event notification DLL! This is not a problem if the DLL decides fast whether events can proceed or not (i.e. within a second or so). But, if the DLL needs to do lengthy processing, or if it starts an external program which will take an indeterminate amount of time, it would be a bad idea indeed to block the entire server meanwhile.

In case the DLL needs time to process the event the procedure is therefore to let the DLL spawn another thread to do the processing and return REVNT_Suspend immediately to the server. This will make the server go on with other clients while it waits for a reply from the DLL. When the DLL is ready with a reply it should post a message using the ‘hWindow’ and ‘Message’ fields of the event structure, with the client ID in the message WPARAM field. When Serv-U receives the message it notifies the DLL with the exact same event that resulted in the suspension, and the DLL should now return either REVNT_Proceed or REVNT_Abort. In case it aborts the event the DLL should also supply a pointer to a FTP command reply message in the 'pReplyText' field, indicating to the client why the command was aborted. This reply message should have the correct FTP reply code (generally 550) and syntax (see RFC959).

Command replies can consist of multiple lines. If so, those lines need to follow the correct FTP reply code and syntax (i.e. each line starts with a reply code and all except the last line have a hyphen after the reply code). Keep in mind though that many FTP clients do not support multi-line command replies for the commands being hooked, and they may get confused or lock up (the command line client which comes with Windows is an example of one of those, older versions of WS_FTP are others). Reply messages may also contain any of the `%' message directives, they are expanded just before the reply is sent to the client.

To summarize, a step-by-step overview of the event hooking procedure:

1.	Server sends a hook notification event to the DLL

2.	DLL can decide immediately to either let the command proceed or abort using the return values REVNT_Proceed or REVNT_Abort.

3.	If DLL needs time to decide it should spawn another thread to do the processing and return REVNT_Suspend.

4.	When processing is completed after suspending the client, i.e. only after an REVNT_Suspend reply, the DLL should post a message using the parameters:

RFTPEventStr.hWindow	= window to post message to

RFTPEventStr.Message	= message to post

The WPARAM field of the message should contain the client ID from 'RFTPEventStr.SessionID'.

5.	Serv-U will send the exact same hooking event to the DLL after receiving the message and the DLL should now reply with either REVNT_Proceed or REVNT_Abort.

6.	In case REVNT_Abort is used (regardless if the command was suspended or not) the DLL should set ‘RFTPEventStr.pReplyText’ to point to a FTP command reply message. The reply can be multiple lines and may contain any of the '%' directives. The command reply text must follow the correct FTP syntax (see RFC959) including reply codes!! Serv-U doesn't check the syntax, but not complying would very likely confuse the FTP client.

In case there are multiple DLLs for event notification and hooking Serv-U will send hooking events to the DLLs in the order in which the DLLs are entered in the SERV-U.INI file. Serv-U stops passing events on when a DLL returns REVNT_Suspend or REVNT_Abort, i.e. the remainder of the DLLs in the list will not receive the hooking event.

Changing Command Parameters

For the path/file related events the DLL can change the returned path in AuxOne[] (and AuxTwo[] if applicable). The new path will then be used by Serv-U for the operation. Keep in mind that events get dispatched after Serv-U has already checked access and existence (except , but before applying ratio and quota rules. Also, for file transfers if there is a resume offset in effect this will be applied to the new path. If there are multiple event notification DLLs the event will be passed on from one to the next. Any changes to the event structure will also be passed on down the line. In other words, while it may be a powerful tool to be able to change paths/files on-the-fly, use caution! There can be unexpected and undesired side effects.


EVNT_HookDown

See Also

This event is sent in case the client wants to download a file.

Event = EVNT_HookDown

SubEvent = SEVNT_None

AuxOne = name of file to download (complete path), may be changed on return to point to another file


EVNT_HookUp

See Also

This event is dispatched in case the client wants to upload a file.

Event = EVNT_HookUp

SubEvent = SEVNT_None

AuxOne = file to upload (complete path), may be changed on return to point to another file


EVNT_HookAppend

See Also

This event is dispatched in case the client wants to append to a file.

Event = EVNT_HookAppend

SubEvent = SEVNT_None

AuxOne = file to upload (complete path), may be changed on return to point to another file


EVNT_HookUnique

See Also

This event is dispatched in case the client wants to create a unique file.

Event = EVNT_HookUnique

SubEvent = SEVNT_None

AuxOne = file to upload (complete path), may be changed on return to point to another file


EVNT_HookRename

See Also

This event occurs when client wants to rename a file or directory.

Event = EVNT_HookRename

SubEvent = SEVNT_None

AuxOne = original file/dir name (complete path), may be changed on return to point to another file/dir

AuxTwo = new file/dir name (complete path), may be changed on return to point to another file/dir


EVNT_HookDelFile

See Also

This event is posted when client wants to delete a file.

Event = EVNT_HookDelFile

SubEvent = SEVNT_None

AuxOne = name of file to delete (complete path), may be changed on return to point to another file


EVNT_HookDelDir

See Also

Event sent in case the client wants to delete a directory.

Event = EVNT_HookDelDir

SubEvent = SEVNT_None

AuxOne = directory to delete (complete path), may be changed on return to point to another directory


EVNT_HookMkd

See Also

In case the client wants to create a directory this event is dispatched.

Event = EVNT_HookMkd

SubEvent = SEVNT_None

AuxOne = directory to create (complete path), may be changed on return to point to another directory


EVNT_HookSite

See Also

Dispatched whenever the SITE command is used, thus allowing for any FTP command extension. The FTP command SITE is intended for site-specific command extensions. Serv-U uses it (amongst other things) for executing programs at the server side, via SITE EXEC. The FTP specs in RFC959 recommend all site-specific command extensions to be implemented via the SITE command.

Event = EVNT_HookSite

SubEvent = SEVNT_None

AuxOne = command argument


EVNT_HookChgDir

See Also

This event is dispatched in case the client wants to change to another directory.

Event = EVNT_HookChgDir

SubEvent = SEVNT_None

 	AuxOne = directory to change to (complete path), may be changed on return to point to another directory


EVNT_HookCommand

See Also

The ultimate hook! Allows DLL a chance to do its own command processing by sending raw FTP commands to the DLL before Serv-U processes the command. Use with care!

Event = EVNT_HookCommand

SubEvent = SEVNT_None

 	AuxOne = raw, unprocessed FTP command text, may be changed on return


EVNT_HookReply

See Also

Every FTP reply is passed through this event, allowing a DLL to change the reply text. Multi-line replies are sent to the DLL line-by-line, the DLL needs to track the reply state by monitoring the reply layout. Use with care!

Event = EVNT_HookReply

SubEvent = SEVNT_None

 AuxOne = raw FTP text line, may be changed on return, or a multi-line reply of the DLL’s choice may be substituted by using REVNT_Abort, changing the reply text in AuxOne to an empty line (‘\0’) results in Serv-U dropping the line and not sending it to the FTP client


Performance Monitor

See Also

If Serv-U is running on Windows NT/XP/2000/2003 the Performance Monitor program can be used to keep an eye on your server. Performance Monitor is started through the Windows menu choice ‘Control Panel | Administrative Tools | Performance’. Once started, counters can be selected by pressing the small ‘+’ button at the top. Performance Monitor is capable of viewing counters over a LAN on another computer. To do this, press the "Select counters from computer" radio button and select the computer’s network name in the drop-down list of the Performance Monitor dialog box. The "Performance Object" entry in the same dialog box should be set to "Serv-U FTP Server". This entry will be available in the drop-down list if Serv-U is installed on the (remote) computer.

Available Counters

The following performance counters are available for Serv-U Through Performance Monitor:

•	Current server bandwidth in use

•	Number of connections in the last 24 hours

•	Number of connections per second

•	Number of logins per second

•	Number of current connections

•	Number of sockets in use

•	Number of current file downloads

•	Number of current file uploads

•	Number of current file transfers

•	Maximum number of connections to the server

•	Total number of connections since server start

•	Total number of logins since server start

•	Total number of file transfers that ended in error since server start

•	Total number of file downloads that ended in error since server start

•	Total number of file uploads that ended in error since server start

•	Total number of file transfers since server start

•	Total number of uploads since server start

•	Total number of downloads since server start

•	Total kB transferred since server start

•	Total kB downloaded since server start

•	Total kB uploaded since server start