WFTPD Contents
WFTPD Contents (version 1.9c, 5/30/94)

WFTPD - The Windows FTP Daemon

Quick Setup - how to start quickly
Common Questions - what people keep asking me.

How To:

Fix what broke in the quick setup
Work with Log files and screen logging
Secure your system
Register the program or contact the author
Play the Flute

Menus:

File Menu
Edit Menu
View Menu
Logging Menu
Messages Menu
Security Menu

Command Line Options:

The 'h' option

Miscellaneous:

Upload Announcement
Changes since version 1.8 (and minor version changes)
Look for these features soon...
Acknowledgements


Quick Setup

The important part of a quick setup is to note what WFTPD has as its defaults:

No Log File
Greedy Option off
No logging to screen or disk
A blank Greeting and Farewell message
No display of the MESSAGE.FTP file on a CD command
User/password security enabled - no users defined
Anonymous user disabled, and restricted to the C:\ directory and beneath, should you re-enable this user.
Host/Net security allows all hosts/networks to access WFTPD

This means that what you will need to do on first starting up WFTPD is either to enable the Anonymous user, or add users and passwords, or a combination of both.  Or, if you don't need password protection, simply disable user/password security and allow anyone access to your system.


The Log File

The Log File is a simple text file with the following format:
[X nnnn] mm/dd/yy hh:mm:ss <Message text>
X is a single character, one of:

L - login
C - command
G - get (RETR)
P - put (STOR/STOU)
A - anonymous login
? - Debug information

nnnn is a four digit hex number for the connection number that this message applies to - connections are numbered from 0001 from the time the program is started.  When the program is exited and restarted, the count restarts at 0001.

mm/dd/yy is the date, and hh:mm:ss is the time of the message being written to the log file.

This same information is written to the screen.

You can select the types of messages that will be listed through the Logging menu options.


Greedy Option

There are two schools of thought regarding reading data from an external host through winsock - one says to read as much as you can, as often as you can, and the other says to read a set amount each time, and to allow a little more time to other Windows applications.  The Greedy option controls the choice of these two methods.  When this option is ticked, you may notice your Windows system performance degrades when people are storing files on your system.  If it is not ticked, people storing files on your  machine will lose a certain amount of network performance.

Since it's a matter of personal choice as to which is more important, I've left this as a simple menu option, under the File Menu.


Greeting And Farewell Messages

These messages are currently a maximum of 20 lines long, and are entered through a very simple multi-line edit control.  Any text can be entered here, although it would be advisable to limit yourself to only those characters that are most prevalent amongst the internet community - i.e. 7-bit ASCII.

The Greeting message is displayed to each new connection before they get the prompt for the user name, and the Farewell message is displayed after the FTP daemon receives a QUIT command from the client.

The default messages are blank in the registered version.  In the unregistered version, you cannot edit these messages, and they bear messages enticing your users to tease you about being unable to scrounge up $15 for a registration fee.

Only one user has reported that he felt "replused" [sic] by my "arrogance" in placing such a message in an unregistered piece of software.  I feel it makes the program more usable than embedding nag screens, and many people seem to have gotten a good giggle from this message.  So it stays.


The MESSAGE.FTP File

When this option is ticked in the Messages menu, any time a user changes directory, the new directory is checked for a file called MESSAGE.FTP. If this file exists, it is printed as part of the success message informing the user of his change of directory.

This file may be as long as you can type, but bear in mind that many people have twenty odd lines of screen and no scrollback - if it can't fit on one screenful, you stand the chance that it will not be read in its entirety.

This feature was inspired by wuarchive's facility to display a .message file on certain commands.


The User/Password Security Dialog

This dialog allows you to grant different users access to different parts of your disk(s), and in a future version will allow you to grant different kinds of access to different users.

The Close button simply exits the dialog

The Add/Alter button updates the WFTPD.INI file with the information displayed in the edit boxes.  This button is grayed if the two password entries (the password and the Verify boxes) are not filled in exactly equal.

The Delete button removes a user's entries from the WFTPD.INI file.

Clicking the down arrow to the right of the box for the user name will produce a list of user names already in the WFTPD.INI file.  The  parameters for this user will only appear once the focus is moved away from the user name box.

The Password/Verify boxes will always display '*' for each character entered. This is a standard protection scheme to ensure that people in the next town with high-powered binoculars can't log in to your prized system.

The passwords are stored in encrypted fashion on the WFTPD.INI file.  If you wish to retain your password from a UNIX system, you may copy the password entry from the /etc/passwd file into the WFTPD.INI file - e.g. if my /etc/passwd entry is:
alun:hajibabaomars:194:958:Alun Jones:/home/home/on/the/range:/bin/bash
I would put an entry in the [passwd] section of the WFTPD.INI file a line that reads:
alun=hajibabaomars

The home directory is the directory that the user first sees when he logs in.

If you check the option "Restrict to Home", the user will not be able to change directory to any directory that does not contain the home directory as a substring, effectively limiting his access to his home directory and below.

The "Enable security" check box will disable checking of user names and passwords unless it is checked at the time the dialog closes. Similarly if "Allow Anonymous" is not checked when the dialog closes, then anonymous users will not be allowed.

Remember that everywhere throughout WFTPD, the username "ftp" is synonymous for "anonymous".


Host/Net Security

This dialog allows you to deny or allow access to your site based on the internet address of the host trying to connect.  There is a pair of radio buttons indicating what the default action is - whether you want to generally deny all incoming connections, or whether you wish to allow all connections by default.

Underneath these buttons is a box labeled "Specific action", which contains a list box labeled "Host address".  Any hosts listed in this box (and you can type extra hosts in) may be changed from the default action.  Please note that to add or change a host's entry, you MUST click on the Add/Alter button.  To remove an entry, simply select it in the list, and click on the Delete button.  To specify several hosts in a range, remember that a "*" represents the range 0-255.

If your default action is to allow all hosts, then only those addresses set to "deny" will take any action, and vice-versa.  If your default action is the same as the specific action for a particular host, then it makes sense that that action is what occurs!

The Close button will exit this dialog box - it will not in itself save any alterations that you have made to the host tables - this is done only through the Add/Alter and Delete buttons.


The Security Menu

This menu contains three options that allow you to tailor the security of your site.  Only the top two are currently enabled - the third will come into effect in a later version of WFTPD.

The two active options are:

User/Password
Host/Net


The Message Menu

This menu contains three options.  The Greeting and Farewell messages allow you to design messages that are printed when a user logs in or out, respectively.  The MESSAGE.FTP option is a checked option, that, when enabled, allows a message to be printed out which changes for each directory the connecting user enters.


The Logging Menu

This menu has the following options:

Logging On - turns logging to screen and log file (if opened) on.
Clear Screen - clears the log on screen.

Gets - starts/stops logging all Get (RETR) commands
Puts - starts/stops logging all Put (STOR/STOU) commands
Logins - starts/stops logging all successful user logins
Anonymous - starts/stops logging all successful anonymous logins
Commands - starts/stops logging of all ftp commands received.


The View Menu

Currently this menu only enables you to turn on or off the status bar. The status bar has one purpose, and that is to give you a brief description of each menu option you might select.


The Edit Menu

In some later version of the software, this will allow you to copy sections of the screen log into the clipboard, for pasting into other programs.


The File Menu

This contains commands to open or close the current Log File, an option to enable/disable the Greedy Option, and the exit command.


How To Play The Flute

Well, basically, Jackie, you blow in one end, and move your hands up and down it.

Next week we'll be teaching you how to rid the world of all known diseases and how to make black and white people live in harmony.


How to Register the Program or Contact the Author

The author, Alun Jones, should be reachable via e-mail at "alun@wst.com". For surface/air mail, the author's address is:

Alun Jones
1910 West Mead 3702
Houston TX 77077
USA

If mail to the UK is easier, you may try getting to me through my parents, at:

Alun Jones (WFTP Daemon)
47 Sugden Road
Long Ditton
Surrey
KT7 0AD
England

Be sure to mark your mail so that my parents (who are not totally computer-literate) can recognise that it has something to do with this software, otherwise it'll sit until I visit them - which may be next Christmas, or Easter or Insurrection Day, or whenever.

Registrations are most quickly processed if you include the following items in your mail:

US$15 or 15 pounds sterling (mandatory, although purchase orders are accepted)
A fully filled out copy of the order form (in ORDER.TXT or ORDER.DOC)
Glowing praise of the software (optional)
An internet reachable e-mail address
Your name and postal address

The preferred method of distributing this software is through internet e-mail.  Some people also like to see me send the software through FTP. It's amazing how many times I recognise the program I connect to in order to upload it!  I would ideally like to upload the software

through a non-anonymous account, into an area where there is no public

access, for obvious reasons!

I keep a mailing list of all registered users who provide me with internet e-mail addresses, and these users will be kept aware of forthcoming releases, and will be shipped new copies whenever changes are made.

It often helps me if you can tell me how you use the software - I have found some New and Innovative Uses for an FTP daemon out there.  This will allow me to determine whether all the features of the software are useful, or whether they need to be rewritten.


How To Secure the system

Currently, since there is no concept of user rights, it is not possible to allow a user to only download, or only upload.  This means that you have to be careful that one user does not ruin it for the rest.  WFTPD is not a totally secure ftp server.

This is probably best achieved by providing each user with a separate directory, and restricting them to that directory and below.  All this can be achieved through the User/Password Security dialog.

If users persist in being naughty, you can deny them access to your machine through use of the Host/Net Security dialog.


How To Work With Log Files And Screen Logging
How To Work with Log Files and Screen Logging.

When you first fire up WFTPD, no log file will be defined, and all logging will be disabled.  You will probably want to use a Log File, so that you can find out what happened during your unattended hours, and so that you can have a record of what is going on in your system.

To create a log file, simply open it from the File Menu's Open Log option.  From now until you close the file, all log messages will be stored into this file.  If you close the software, it will re-open this file when it is restarted.

Logging to the screen is automatically enabled whenever logging is on. This is selected from the Logging Menu.  Through this menu, you can also select what actions are logged, and you can also clear the log on screen.


How To Fix What Broke in the Quick Setup

I'm not sure what you mean - nothing broke in the quick setup.


New and Innovative Uses for WFTPD

The following uses have been reported to me:

As a standard FTP daemon - this is obvious.

A print server - put a file into LPT1, and it goes out the port! (Actually, I seem to have broken this in the latest revisions - oops!)

For remote system administration - simply install it with the 'h' option, and run it on all of your systems - this allows you to update software, and retrieve configuration files for local editing, allowing you to remotely administer windows machines anywhere on your network.


The 'h' Option

If you run WFTPD with a command line argument of 'h' or 'H', then the program will run without an icon, and will not show up in the task switcher.  This means that WFTPD cannot be closed without exiting windows, and its options cannot be altered.  This is probably only useful for remote system administration, where (to quote an existing user) "you don't want bozos deciding they know how to rewire their systems".


Upload Announcement

WFTPD1_9.ZIP    Windows FTP daemon 1.9 for Winsock 1.1

Uploaded by the author.

WFTPD - the all round useful Windows FTP Daemon.

WFTPD has the following useful features:

o Support for the majority of FTP commands (it doesn't support the obscure ones for mail, etc.)
o Multiple logins and simultaneous transfers allowed
o Runs over most Winsock drivers (some people have reported occasional problems with PC-NFS Winsock, but this doesn't appear to be limited to WFTPD)
o Fast - with an option to make it go even faster (at the expense of your other Windows applications) - I get 120-200K per second on average over 8 bit ethernet
o Secured access by means of password authentication, address-based  host authentication, and the ability to restrict users to named subtrees of your directory structure
o Remote access to ALL drives on your system is possible
o Windows friendly - does not flash cursors while it is transferring, or hold up processing (unless greedy option is enabled)
o Can run 'invisible' - with no user access to the program
o Easy configuration of user/password lists, security features, logging to file.  All features adjustable through menus - no need to edit clumsy INI files.
o Logs logins, anonymous logins, gets, puts, commands - what's logged is configurable
o Logs to file that can be read by other applications, including session number, time and date stamp.  This information is also logged to the screen.
o Small - 140K
o Cute little icon

In addition, for the low price of $15, you get these features:

o Easily configurable greeting - the unregistered one tells people that you can't afford $15
o As many transfers per login as required - only 5 are allowed in the unregistered version before you have to re-login.  (Directory listings don't count towards this 5)
o Greater say in future features
o Peace of mind - can you sleep at nights knowing that your $15 may be the only thing standing between me and a residency visa?


Changes since version 1.8

(Minor version changes are at the bottom of this page)

The following features have been moved in this version:

o File|Security dialog is now under Security|User/Password
o Logging|Logfile dialog is now under File|Open Log
o File|Greeting dialog is now under Messages|Greeting

New items on the menu include:

o File|Close log - stops logging transactions to file, but carries on logging to screen.
o The Messages menu now contains Greeting (formerly under File), Farewell (for the logout message) and MESSAGE.FTP - when this toggle is turned on, any CWD operation will look for the file MESSAGE.FTP in the new directory, and if it exists, will display it to the user.
o The Security menu now contains User/Password (formerly File|Security), Host/Net (for restricting which hosts may log in to your server), and Rights (for assigning each user a different set of rights in each directory. Rights will be activated when I write the code to do it, probably in version 2.0.
o On-screen logging is now supported - this has been the most requested feature since the FTP daemon was first released!  Since my internet connection is often flaky, I figured I'd cut down on my incoming mail and actually put the feature in!
o RMD will not accept a parameter with ':', '\' or '/' in it - this way you have to CWD to a directory's parent in order to delete it.  This may seem cumbersome, but is a valuable security feature.  MKD has a similar restriction.
o CDUP and XCUP are supported, as is STOU, SYST, REIN.
o The title bar will display the log file when it is opened from the .INI file.
o If the backlog of stuff to send is bigger than the socket buffer, it's now expanded continually, and eventually when the information gets sent the buffer will reduce.  It'll do this in steps of 4K.
o I am still finding it difficult to open a file sharable by other processes, so the log file is still locked.

Minor version changes

1.9a - fixed a bug in the asynchronous message handling for trumpet users.
1.9b - fixed a really bad security bug that allowed unprotected access.
1.9c - fixed a tiny bug in the directory listing, that made it list times wrongly.  Also made the help file prettier!


Acknowledgements

I would like to acknowledge the following people for their help in producing this product. They are listed in more or less chronological order.

o The developers of the Winsock specification.
o The developers of QVTNet for producing an FTP server that was so awkward to configure, and which had so many bugs in, that I was prompted to write this program.
o Peter Tattam, for producing a damn good Winsock implementation.  The cheque is in the mail, Peter!
o Fred Whiteside (of Beame & Whiteside) for helping me find a version of the crypt function.
o Chip Sparling, and all at FTP Software for sending me a PC/TCP Developers Kit in such a short time.  Unfortunately, it reached me too late for me to work on fixes to WFTPD to work better with PC/TCP.  For the moment, just keep increasing those buffers!

o Steve McCarthy and everyone at SunSoft, for helping me find out how to deal with problems caused by old versions of PC-NFS.


What is FTP?

FTP is the Internet standard File Transfer Protocol.  The WFTPD program attempts to provide the most useful and most often used elements of the daemon (server) side of this protocol, as described in RFC # 959.


What is a daemon?

A Daemon, also referred to as a server, is a program which will run in the background carrying out certain tasks while the main work of the processor carries on in the foreground.  The daemon is connected to by a client program, usually on a different computer.

The term derives from a word meaning a 'helpful servant', and unlike "demon", has no intrinsic connection to either good or evil.


Frequently Asked Questions

Q. What do you offer in the way of site licences?

A. Generally I ask for $500 for each 100 users.  This does not include the cost of source code. If you want to buy source code, please send me email.

Q. How do I register?

A. Look at the How To Register section in this file.  Please be sure to use the order form provided in ORDER.DOC (WinWord 2.0 format) and ORDER.TXT (ASCII format).

Q. When I run your program, a dialog says I am missing PCTCPAPI.DLL - why?

You've fetched down the winsock.dll file from ftp.ftp.com, which only works alongside the full TCP/IP package produced by FTP Software, called PC/TCP.  This winsock is NOT free - either find one that is, or buy one of the commercial stacks that support winsock programs.

Q. My server only allows one connection, before I have to restart it - why?

A. You are using an old version of PC-NFS.  I believe that this is a problem with version 5.0, but it certainly is a problem with previous versions.  Please contact your dealer, and get the new version.

Q. Why can I only transfer about the first 32k of all files, or not transfer anything at all?

A. If you are using FTP Software's PC/TCP, this is something they are working on (as of 5/24/94), but they are extremely close to getting a good working version, so I hear.  You might want to check the ftp site ftp.ftp.com to see if a new version of winsock.dll is there that fixes your problem.  Note that this winsock.dll will only work with FTP Software's PC/TCP stack.

Q. Is my winsock stack faulty, since it won't work with your software?

A. Not necessarily - it's entirely possible, since the winsock specification is so new, it's likely that there may be some parts of the spec that I read in a different way from the people who developed your winsock stack.  As you may guess from the answers to the above two questions, winsock developers are working hard to make their stacks work with the most frequent of the disagreements, and I am also ready to change my program to work wherever it turns out I have a misconception.

Q. You say you require winsock version 1.1 compliance, but my stack is version 1.0.  Where can I get the updated version?

A. This is a common misconception - my program is designed to work with any winsock stack that is designed to implement version 1.1 of the winsock specification (version 2.0 of the specification is just entering its design phase).  Most winsock stacks on the market implement version 1.1 of the spec, but to differentiate between different versions of their own stack, they give different version numbers to each copy of the stack.  Hence, PC-NFS is at version 5.1, PC/TCP is at version 2.31, and Trumpet Winsock is at version 1.0 rev. A (or 1.0 B beta 6).  All of these stacks implement an interface that is compatible with version 1.1 of the winsock specification.

Q. I'm interested in learning winsock programming - can I get a copy of your source code?

A. Not likely, in the general case - I've made sales of the source code to a couple of companies, and each sale made about as much money as I have received in individual registrations so far.  It's a little unfair on these people if I offer the code free to anyone else, or if I sell it for significantly less.

Q. Why do you have such a rude message in the unregistered version?  My customers don't appreciate seeing this when they log in, and some of them are very influential people!

A. Two small points here - first, the unregistered version is generally designed for testing, before you register.  I'd feel very embarrassed if I was using an unregistered version of shareware to deal with customers, especially the influential ones - what kind of impression does it give to your customers when they find you are using them as a test case?  The second point is that you probably spent enough time complaining to me that you've already cost yourself (or your company) at least $15.

As another interesting point, I've had many people tell me that they registered specifically because they found the message amusing.

The message stays!

Q. Why doesn't NCSA Mosaic recognise your ftp program?

A. Up until very recently, this was a complete mystery to me - all that I knew was that Mosaic requires all ftp servers to which it connects, to recognise the PASV command.  This is a rarely-used command, that starts up transfers in a different manner than most normal ftp clients.  I was confused about why Mosaic was the only ftp client that mandated this command, and NCSA didn't reply to my email (although they are severely understaffed right now).  Finally, someone told me that PASV is especially useful for sites behind firewalls.  Maybe next version I'll be able to get PASV implemented.

Q. What's going to be in the next version?

A. The main purpose for the next version is the implementation of per-user protections on directories.  In addition, if I can get it in without delaying the release too much, I will try to implement PASV mode.

Q. When are you going to ship the next version?

A. Well, this is a tough one.  The company I work for, and who provide me with enough money to keep me alive and reasonably stocked with gadgets, has recently undertaken a mammoth development task.  As one of their main programmers, I've got a lot of work on my plate right now, so I don't know when I'll be able to start work on version 2.0.

Q. What winsock stacks do you know of that I might fetch?

A. I use the Trumpet winsock at home - this can be fetched from many public ftp sites.  It costs $20 to register, and seems to be pretty robust.

At work, I use the Microsoft VxD TCP/IP stack, which is available for free from the ftp site ftp.microsoft.com, in directory /peropsys/wfw/tcpip/vxdbeta - the file currently is MSTCPB2.EXE, a self-extracting archive.  This stack is in beta, but is coming along very nicely.  Keep watching it, since it promises to be the basis of TCP/IP support in future versions of Windows.  Currently, this VxD stack works only on Windows for Workgroups 3.11.

Also available is the PC/TCP stack, from FTP Software, PC-NFS from Sun, Chameleon from NetManage, and several others.  Check in computer magazines for more details - look under network software.  If the advert doesn't explicitly say that it's winsock compliant, call the company before buying it.  WFTPD will only work on winsock compliant stacks.


Look for these features soon...

Please note that none of these features have yet been written or designed, and some of them may not yet make it into wftpd.  Please tell me which features you'd like to see.

(The ordering is most definitely not indicative of preference)

Suggested Features:

o Access limited to small number of users

o Access limited at various times to different numbers of users

o Restrict uploads/downloads to specific directories/by specific users.

o Configurable message for too many users.

o Timeout on inactive connections.

o Individual user rights on directories

o Tidy up on-screen log handling

o Try to work out sharable file writing.

o View Current connection status (button?).

o MESSAGE.FTP's name should be changable, and it should not be PUTtable.

o Use the port address in the services file (if present), and allow option to change it.

Bugs (or misfeatures) to (try and) fix:

o Fix the ABORt command on a GET or NLST or LIST.

o Aborted transfers sometimes set the machine into a state where it can't be connected to.

o Leading spaces are stripped from messages stored in the INI file

o MESSAGE.FTP is not displayed on all logins.

o "GET *.EXE" (NOT MGET) produces "Internal Application Error".