MBA 683 E-Business Technology --

Ref: FTP
Home    Site Map    Search    EhrlichOrg.com

Syllabus  Classes  References  Examples  Assignments  Students  Guest  Info

 

FTP Reference

File Transfer Protocol (FTP) and be used to copy files between computers.  For this class we will be using FTP to transfer information between your computer and the server.  

Copying files from your computer to the server is called uploading or publishing.  This makes files available on the Web or to other users who can access the server.
Copying files from the server to your computer is called downloading.  This allows you to view and edit files on your computer.

Please follow the File Name Rules given below to avoid problems.

Some Web development tools will do FTP transfers for you.  You should have FTP software for troubleshooting and monitoring server files, even if you are using a tool that does automatic publishing. Our experience has been:

Dreamweaver and UltraEdit can publish to our server via FTP if you select the Passive FTP option.
Front Page publish via FTP does not work with these accounts.  Use WS_FTP or other FTP software to transfer files as explained below.

Be sure that your Windows system is set to display file extensions. 

In Windows 98: Open Windows Explorer, on the top menu bar select View, then Customize This Folder, select the View tab, clear the check box in front of "Hide file extensions for known file types" and click Apply.
In Windows 2000: Open Windows Explorer, on the top menu select Tools, then Folder Options, select the View tab, clear the check box in front of "Hide file extensions for known file types" and click Apply.

File Name Rules

Follow these file naming rules to avoid problems:

Filenames should include letters (lower case only), numbers, hyphens, and one period before the file extension.  Do not use other characters such as space, underscore (_), slash (/ or \), period, colon, tilde (~), etc. as their meaning and effect varies between systems.
Limit filenames to 8 characters plus a 3 character extension.  Although most systems allow longer file names, there are still programs that shorten long filenames.
Use only lower case letters.  In some systems, including Linux or UNIX, names are case sensitive, other systems, like Windows, are not case sensitive.  Some programs will convert the case used in file names.  The safest solution is to use only lower case letters.
HTML files should use the .htm extension, instead of .html.  This also helps avoid compatibility problems between Windows and Linux.

FTP Software

The ws_ftp95 le program is free and will do FTP transfers from Windows machines.  This program is on many machines at USF or can be downloaded from Ipswitch.com.  The LE version is free and adequate for your needs, the Pro version is $40.

Absolute FTP from Van Dyke is an inexpensive alternative that is much more reliable and easier to use (it looks like Windows Explorer). 

Internet Explore can be used for FTP, see the instructions below.

FTP using Internet Explorer

These instructions have been tested for Windows 2000 (W2K) and Windows XP (WXP) using IE 6.

  1. One time only: open IE and select Tools/Internet Options and the Advanced tab. Find the option for Use Passive FTP and check the box if it is not checked, Apply the change, close and restart IE.
  2. Enter the following address substituting your account for account
    ftp://account@ehrlich.he.net/public_html/ 
  3. Under WXP you will be prompted for your password; under W2K select File/Login As and enter your password. You should see a list of your files on the lab server.
  4. Using this window you can copy files to your local disk, edit them locally using WordPad or FrontPage (not Notepad), and then copy them back to the server. To copy either right click and copy, drag and drop, or select File/Copy to Folder. 
  5. If you are on a lab machine, when you finish select File/Login As, and delete your password so its not saved.

Notes: 

Although you can open files from IE/FTP in Notepad and WordPad, you can't save them back to the lab server from either of these programs. You must save them on your PC and copy them to the IE/FTP window.
IE/FTP does not convert line endings in ASCII files. This is OK for HTML and PHP files but will cause problems in command files for Linux utilities.

Updating your personal Web site using WS-FTP

Start ws_ftp or click the Connect button and you will get a Session Properties window.  Enter the following values:

Profile name: your choice of name
Host name/address: ehrlich.he.net
Host type: automatic
User ID: enter the Account id you were given in class
Anonymous: clear the check box
Password: use the password you were given in class (you may be prompted for the password again)
Save Pwd: clear this check box if you are using a lab machine or other shared computer
Account: leave this field empty

Click OK, and the program should connect to the server (you may be prompted for your password).  Once you have connected, you will see two windows:

  1. Left: your local Windows machine.
  2. Right: your directory on the Server.  The directory name will be /home/your-account.

Each Window has buttons for Change Directory (ChgDir), Make Directory (MkDir), etc. that control the directory used for transfers.

To upload files to the server, select one or more files in the window on the left and click the right arrow button (-->) to copy the files to the server.

To download files from the server, select one or more files in the window on the right and click the left arrow button (<--) to copy the files to your local system.

Initially your server directory will be empty except for some system files with names beginning with period (please don't change or erase them) and three directories (cgi-bin, public_html, and secure_html). The files for your Web pages go in the public_html directory. Initially this directory will contain an index.html file created by Hurricane Electric, you may change or replace this file.

File Directories

Files for your Web pages go into the public_html directory of your account or in subdirectories of this directory. You probably want to put images in a separate subdirectory. In WS_FTP, click the MkDir button on the right to create a directory.

WS_FTP can access multiple server directories, but only one server directory at a time.  Instead of copying files between directories on the server, copy them to your PC and back to the server.

There are two ways to change directories in WS_FTP:

  1. Double-click on a directory name to open the directory, or 

  2. Click the Change Directory button (ChgDir) on the right side and enter the new directory name or path.

File Transfer Modes

When publishing files to the server with WS_FTP, be sure to use ASCII mode for transferring text files (.htm, .html, .php, .sql, .txt) and Binary mode for all other file types.  Use the check boxes under the file windows to specify the type of transfer.

To have ASCII mode used automatically:

  1. Start WS_FTP and connect to the server

  2. On the main window click the Options button

  3. Select the Extensions Tab

  4. Add .htm, .html, and .php to the list of ASCII file extensions.  

  5. Click OK.

  6. Click the Auto check box on the main window.

Corrupted files may result if you upload a text file in Binary mode and download it using ASCII mode.  This will put extra control characters (Carriage Returns) in the file and cause problems.  To check, open the file in Word, select the option to View Paragraph Marks (Tools, Options, View) and check for two paragraph markers (¶) at the end of each line.  Fix your file using the Word Find and Replace command to find ^p^p and replace with ^p. 

 

 

© 2002  by Chuck Ehrlich, all rights reserved.  Comments to webmaster.  Updated on October 01, 2002.