The Internet Project


by Karl Auer

This month we'll start discussing some of the other tools that come in the Internet Project "kits" (or that you may find "out there" on the 'Net). This month it's ftp. But first, a plea...

--------------------------------------------------
Quick Reference

--------------------------------------------------

Use the help@pcug.org.au alias!

Partly because my personal email address is in quite a few places, I am still getting a lot of email messages asking for help with this or that problem. While I can often help, it puts a real strain on me, plus there are many questions I cannot answer.

So please, send all requests for help to help@pcug.org.au. That's what it's there for.

FTP - File Transfer Protocol

Despite its unprepossessing name, FTP (usually spelled in lower case, as I will do from now on) is one of the most phenomenally useful things around. Although the name describes a protocol, it is often used to mean programs rather than the protocol itself.

One of the most popular ftp programs is WS_ftp, which is the program that comes with the Internet Project kit. This is a Windows-based "point and click" style program - which makes it heaps easier to use than the older command-line style programs. It is also able to be used in conjunction with WS-Archie (described below) to semi-automate the retrieval of files.

Retrieval of files is what ftp is all about. Virtually every Internet site in the world supports an ftp archive of some sort. That is, a collection of data (files, programs, whatever) which is made available for people to obtain. Some sites restrict access to known users, but most have some files available for "anonymous ftp" - that is, anyone can access them. Many sites are set up specifically for the distribution of material, and ftp sites around the world form an incredibly rich source of new (or old) software. Certainly all the best shareware, freeware and public domain stuff hits the Internet first.

Ftp can also be used to send files, obviously, but most people will retrieve far more than they send. With WS_ftp, it's pretty easy both ways.

The WS_ftp window

When you start WS_ftp, you'll see quite a few buttons, and a smaller window will also pop up asking for connection details (see diagram 1).

Picture unavailable

Diagram 1

This smaller window allows you to set up lots of different configurations for contacting various ftp sites around the world. The information is slightly different (and is presented slightly differently) depending on what version of the software you have, so be aware that the details may differ a bit from what I'm about to describe. The gist of it is straightforward - you should be able to adapt this information easily to whatever version you are using (and for that matter to other ftp clients).

To set up a connection the software needs to know several things, which it collects under a name for the configuration. That's the topmost box. You can use one of the entries already there, or you can create your own new entries.

Using an existing entry

To locate an entry, click the down-arrow to the right of the entry being displayed. A list box of existing entries will be shown and you can select the one you want by clicking on it.

Creating a new entry

You can call new configurations anything you like. Just type over whatever is there and a new entry will be created with the new name. You only need to modify as much of the new entry as you wish.

Next WS_ftp needs to know the name of the host you will be contacting (host is Unix tech talk for computer). Put in the FULL name, such as "supreme.pcug.org.au". This field is required - you can't leave it blank.

WS_ftp also needs to know the name you will be using to log in. If you will be connecting anonymously (as is almost always the case), click the "anonymous login" box and the user ID and password will be filled in automatically. By convention, your "password" when connecting anonymously is your full email address. This lets the administrators of the remote system contact you by email if there are any problems. You can configure this "password" using the "Options" button.

Important: Don't ever configure your real password here!

Why? Because every time you connect to an anonymous site you will be giving your password to the local system administrator.

If you are not connecting anonymously, type in your user ID and password where indicated. If you leave the password field blank, you'll be prompted for it later on. This is the recommended way to do it - although WS_ftp allows you to save passwords in these configurations, we STRONGLY recommend that you do not.

WS_ftp also lets you specify an initial directory on both the remote and local systems. As soon as it connects, it will try to set these directories. This is very useful if you know where the interesting files are on the remote system are, or if you always download things into a particular directory on your system. Remember that the remote system's directories must be specified as the remote system expects them - so for Unix systems, make sure you use forward slashes, not backslashes in directory names, and make sure you get the case right!

Things like "type", "timeout", "firewall" etc are for special cases, and we won't go into them here. For more information, you should read the help that comes with the program.

Once you have all this information correct, you can press "Save" if you want to keep it for later. "Delete" does exactly what you might expect it to do - removes the entry completely. After saving the entry, press "OK" to use it.

Connecting

When you press "OK", the system will attempt to connect to the specified host and log in using the details you provided. There are lots of ways it can fail, so watch the little scroll box at the bottom of the window for a running status report. You can move up and down in that little box using the scroll arrows at the right hand end of it.

So now you're connected...

Once connected (assuming all goes well), the left-hand "pane" in the WS_ftp window will be filled up with directory and file information from your local computer, while the right-hand pane will show files and directories on the remote computer. The directories will be in the top half of each pane, with the files in the current directory shown in the bottom half. You can highlight things in these panes by clicking on them. See Diagram 2 for a screen dump - I use quite an old version, so yours may look somewhat different.

Picture unavailable

Diagram 2

Note the identical sets of buttons just to the right of each pane. You use these buttons to move around in the directory structures of the two machines (yours and the remote one). The left hand set works on your computer, the right hand set works on the remote computer.

"ChgDir" lets you type in a directory name to change to - useful, but it is often easier to double-click on the directories shown in the upper half of either pane.

Remember that ".." means "the directory above this one"!

"MkDir" and "RmDir" make and delete directories respectively. They'll work on your local computer, but are will only work on the remote computer if you are allowed to change things on it - unlikely unless you logged in non-anonymously.

"Display" will show you the contents of the currently highlighted file - which means it will retrieve it for you first, so don't use this except on small files! WS_ftp uses NotePad to display things, so you are limited to about 60K files. You can configure an alternative viewer via the "Options" button.

"Rename" and "Delete" do what you would expect them to do. "Exec" is dangerous; don't use it.

"DirInfo" (on my older version, a button at the bottom of the window called "LongDir" does the same thing) will show you the full directory information for the files in the current directory. This is useful for finding out things like the file size before you decide to download something.

Disconnecting and Reconnecting

You can disconnect from a remote system by pressing the "Close" button. Pressing the "Connect" button will reconnect you to the most recently used or selected system.

Many systems - especially the big ones - are very busy, and some implement a "maximum number of simultaneous users" limit. You can do your bit as a good netizen by not staying connected unless you need to be. It's not like a phone call - connecting again later on doesn't cost more. So use that "Close" button and reconnect again later if you need to.

Moving files

The buttons that will get the most work are the two in the middle - between the panes. The one pointing to the left will move the highlighted files from the remote computer to your computer. The one pointing to the right will move the highlighted files from your computer to the remote computer.

It really is that simple, with one important gotcha: If you are moving binary files (programs, data files, etc) make sure you check the "Binary" radio button below the file lists! If you are moving text files, check "ASCII" instead. This setting controls whether or not the program should translate end-of-line markers from the remote system.

Unix uses linefeeds to denote the ends of lines in a text file. MSDOS uses carriage-return/linefeed pairs. QNX uses EOR characters. Various other kinds of computers use other kinds of markers. The "ASCII" setting lets you forget this, and converts the files on the fly for you. The "Binary" setting transfers the files exactly as they are. In general, you will almost always use the "Binary" setting, and this should be your default. You can set this default using the "Options" button.

Some lore...

Here are some tips for making better sense of the gigabytes of data out there.

Tip #1: A "mirror" site is a system that maintains a copy of the files on some other system. Many large sites will have a list of their mirror sites in the top directory - look for files called "Mirrors" or similar and check them out. Use local (Australian) sites wherever you can. The speed of transfer is usually far higher, plus you aren't using up scarce international bandwidth. Most of the larger sites - Simtel, Oak, CICA and so on - are "mirrored" somewhere in Australia. A good first place to "cruise" is the Australian Archie site, "archie.au".

Tip #2: Read the indexes. There are usually files called things like "INDEX" or "00INDEX" (the "00" is to make sure it's at the top of any file lists). You may also see files with names like "ls-lR" - these are straight directory listings, whereas "INDEX" files usually contain some descriptions too. If the site is large, or full of good stuff, the time required to download these indexes is often well-spent, as they will save you heaps of time later.

Tip #3: Don't print out directories and indexes. Look at them with an editor. This saves paper, and you can search in them for particular items.

Tip #4: Most systems are Unix, which means they are case sensitive. On such systems, a directory called "Windows" is NOT the same as "windows" or "WINDOWS". The same is true for files.

This is a real trap for new players, who will despairingly type the same (wrong-case) name in a hundred times, wondering why it "doesn't work"!

Tip #5: Use configuration entries. You have to type it all in anyway - so save the entries you make. You can always delete them later, but it's amazing how often you want to go back to a system you were "only going to look at once"...

Tip #6: Give your configuration entries useful names! Sounds obvious, but "temp" isn't much help in a list of 100 entries. Be descriptive - you'll thank yourself for it later on. Because the entries are stored alphabetically, you can implement a primitive priority system - put a "1" in front of your favourite entries to keep them at the top of the list.

Next month...

If there is something in particular that you would like to see covered, get in touch - my email address is kauer@pcug.org.au.

Copyright Notice

--------------------------------------------------

Go to PCUG Home Page
Go to SIXTEEN BITS August 95 Contents