What is FTP?
FTP stands for 'File Transfer Protocol' and is a method
used for transferring data over networks including the internet. Common uses
for PSU users include transferring HTML files to personal web space on
www.personal.psu.edu, copying files to the U-Drive, downloading programs from
the ITS Open Source mirror at ftp://mirror.aset.psu.edu etc.
Like most Internet applications, FTP is based on a
strategy called client-server systems. This means that the user must run a
program called an FTP client. The FTP client provides the user with various
commands to manage the file transfer. If the users computer does not already
have an FTP client, they may acquire free FTP clients from a number of sources.
The user runs an FTP client on their local computer to
connect to another computer program, an FTP server that is located on the
remote computer. Once this connection has been made, the user may download
files (copy them from the remote computer to the local computer), or they may
upload files (copy them from the local computer to the remote computer).
FTP Clients
FTP clients are available for most kinds of computer.
Some computers, such as those running a version of the unix operating system,
come with FTP clients already installed. However, some FTP clients are easier
to use than others -- the choice of FTP client depends on the users skill level
and what they want to do.
Popular FTP clients in use at Penn State include WS-FTP
for computers running Microsoft Windows and Fetch for the Macintosh. WS-FTP
comes in two flavors, 16-bit and 32-bit. Users running Windows 3.1 or those
using Trumpet Winsock to connect to the Penn State network should use the
16-bit version. Users running Windows 95 or Windows NT who are using the
Dial-In connection to connect to the Penn State network should use the 32-but
version for better performance.
These clients may be obtained from the ITS Help Desks and
from most freeware libraries.
ITS documents have been developed to provide simple
instructions for students, faculty and staff to use WS-FTP or Fetch to copy
files to their web space on www.personal.psu.edu. These documents are available
at
http://cac.psu.edu/training/web/ftp.html (WS-FTP) and at
http://cac.psu.edu/training/web/fetch.html (Fetch).
FTP procedure
Although FTP clients come in various types, all FTP
sessions involve the same steps. The first step is launching the FTP client and
connecting to the FTP server. This requires the user to know the name of the
FTP server. An example server name is ftp.personal.psu.edu -- the FTP
server for Penn States web server www.personal.psu.edu.
The second step is logging into the server. This
typically requires the user to enter a valid userid and password. A special
case is connecting to a public file library, which will be described later in
this article. (Note that some FTP clients combine these first two steps into
one.)
The third step is navigating the directory structure on
the remote computer, and possibly also on the local computer. Before any files
can be copied the source directory (directory containing the files to be
copied) and destination directory (directory to contain the copies) must be
specified. All FTP clients provide commands to move from directory to directory
until correct directories have been identified.
The fourth step is to set up the file transfer. This
involves telling your client program if the file to be copied is in text-only
form (ASCII) or any other form (BINARY). This is necessary because different
types of computer may encode text files differently. If the transfer is not set
up correctly, the copied files may be unusable.
As an example, all HTML files must be copied using ASCII
mode, while all picture, sound and movie files must be copied using BINARY
mode.
Macintosh computers provide a special case in that they
provide an additional transfer type - macbinary. This is a little used format
that only Macintosh FTP clients can use. Instead, most FTP public file
libraries encode Macintosh programs using the binhex utility and then copy them
using ASCII format. (Note that the Fetch program calls ASCII mode 'text only'
and BINARY mode 'raw data.'
The fifth step is to actually transfer the files. If the
FTP client being used is a command-line client, the commands get and mget are
used to download files while the commands put and mput are used to upload
files. Many FTP clients (such as WS-FTP and Fetch) provide graphical user
interfaces in which the user simply selects one or more files (or directories)
and clicks on the download or upload commands to copy the files.
If the user is downloading files from an FTP public file
library, there is a very important sixth step -- scan the files with an
anti-virus program. This is very important because FTP is one of the most
common ways that computer viruses are acquired. More will be said about virus
checking later in this article.
Anonymous FTP
The files in public file libraries are accessed through
FTP by supplying a userid of 'anonymous' and a password that is the users
electronic mail address. As a result this type of FTP connection is called
'anonymous FTP.' It is one way that people share information and computer
programs through the Internet. The ITS anonymous FTP site is
ftp.cac.psu.edu and public files are
located in the subdirectories under the /pub directory. Files on this FTP
server include client programs for access to the Penn State network and system
utilities..
Many people prefer using a web browser for accessing
anonymous FTP sites. Most web browsers include simple FTP clients in their
program code, so web page hyperlinks can be used to connect to anonymous FTP
sites. Users can then bookmark these sites for later use.
Some anonymous FTP sites are general in scope and others
are fairly specific. Information about these sites, such as the server name and
its contents, may be found through professional and trade journals, online
listings, and online databases such as TileNet, located at
http://tile.net/listserv/.
Common File Formats
When a file has been successfully downloaded from an
anonymous FTP site it may require additional processing before it is usable.
Many files and programs are processed into compact forms before they are placed
on anonymous FTP sites. For example, many programs for use on computers running
DOS or Windows will be processed into zip files. These files are identified by
the file suffix .zip and must be downloaded in binary format. A zip file might
contain multiple files to make things easier for the user, who only has to
download a single file. A zip file might also be compressed, resulting in fewer
bytes to be copied through the FTP connection.
After downloading a zip file, the user must run a special
program, such as WinZip, to convert the zip file back into the original
component files. The key piece of information for the user is provided by the
suffix of the files name. A suffix of .zip identifies a zip file while a suffix
of .hqx identifies a file in Binhex format and requiring processing by the
Binhex program. An excellent reference source is the Common File Formats web
page located at
http://www.matisse.net/files/formats.html
To Virus Check or Not to Virus Check
After a user has downloaded and processed files to their
original form it is very important that they now be checked for viruses. Sadly,
many viruses escape detection at anonymous FTP sites and can be downloaded into
the unsuspecting users computer system. Failure to detect a computer virus
could result in loss of data and programs.
The good news is that there are some simple steps a user
can take to protect themselves from computer viruses. The first step is to make
and maintain backup copies of your programs and data files. This will protect
you in the event of hardware failure or loss of files due to a computer virus.
The second step is to acquire and install current commercial anti-virus
software. A list of recommended anti-virus vendors may be found on the Penn
State Anti-Virus web page at http://its.psu.edu/virus.html
The third step is to be sure to download all files to a
single subdirectory on your computer. That will make it easier to check the
files for possible viruses. After processing the downloaded files to their
original form the anti-virus program can be run to scan all files in the
download subdirectory for viruses. If the files scan clean they may then be
used safely.
For More Information
FTP is a powerful tool for the Internet-savvy user. It
can open doors to information and services in many areas. Each semester, ITS
offers seminars on FTP and computer viruses. Seminar offerings may be found on
the ITS Training Group web page at
http://its.psu.edu/training/. Users experiencing problems with FTP or
acquiring FTP clients should contact the ITS Help Desks at
helpdesk@psu.edu.