FTPing: transferring files to Hercules


Assuming that you have created the public_html and images directories described in the previous document, from this point you only need to transfer your HTML and GIF files to Hercules as you add to your server collection. Thus, we'll assume you have two new files, "diary.html" and "picture.gif", to be transferred to public_html and images, respectively. If you haven't already created your home page, index.html, the process to transfer it is the same as the process followed below for diary.html. Be sure to read the example about setting the correct file permissions that follows the file transfer information. If Netscape gives an error saying you cannot access files that you know are in your account, then you probably have the wrong permission settings.


Make sure you enter the correct settings in FTP to access your account. You need to do this whenever you transfer a file to your account for the first time. When you "upload" a new copy of the file to Hercules and rename it to add the ".html" extension, the file will take on the permissions of the original.
When you start FTP from the Telecom group on the machines in CL115, the default is to attempt to connect to the CS Department's FTP server. This server is used to distribute files to many of our classes. However, you want to connect to your own account. Notice that your account functions like an FTP server just like it functions as a Web server for Netscape. Change the host information so that it reads as shown in this image.

Replace the default entry for User ID by your username on Hercules.

Replace the default entry for Password by your password on Hercules.

The Remote Host directory may be set to the directory on your Hercules account that you want to use. In this image, it is set to a subdirectory of public_html called images. The Local PC directory can be set to the directory where the files on your PC are located that you wish to transfer to Hercules. This example assumes these files are on the floppy diskette in a directory named "images".


ASCII versus Binary transfers:

Always use the ASCII settings for transferring your HTML files. Always use the Binary settings for transferring your GIF files. ASCII files are text files, that is, they are files containing material entered from a keyboard. Binary files are the image files you created with Paint Shop Pro. There are other types of binary files such as the .ZIP format files you will find on the Internet. It is important that you use the correct transfer settings. For example, we set out to transfer "diary.htm" to the "public_html" directory and "picture.gif" to the "images" directory inside "public_html".

The settings on the left side of the FTP screen reflect the directories and files on your PC. This example assumes we are transferring from drive A to "public_html" on Hercules. The information preceding "public_html" will be different for your account.

Select the file "diary.htm" and make sure that the ASCII setting is used.

For the graphic, "picture.gif", ensure that the Binary setting is used. Finally, click on the arrow button to cause the file transfer to happen. When transferring ".HTM" files from a Windows machine to your Hercules account, remember to rename the ".htm" file in order to add an "l" so that the file extension is ".html". In this picture, the file "ftp.htm" is selected and the "Rename" button would be pushed to start a rename dialogue process. HTML files in the Hercules world and, more generally, on the Internet, have a four letter extension of "HTML" which means we have to rename any file created on Windows where the extension is limited to three characters.


Note that after files have been transferred to public_html or images, the permissions need to be set. A session showing how to set the correct permissions for all HTML files in public_html and all GIF files in images follows.

NOTE: we start this session from the point where the user 
has just logged into Hercules.

hercules[2]% cd public_html

*** You are now positioned inside your public_html directory.

hercules[2]% chmod 644 *.html

*** Permissions on all files in the directory ending in ".html"
are thus set to mode 644, allowing Netscape to read the files.

hercules[3]% cd images

*** You are now positioned inside your images directory.


hercules[4]% chmod 644 *.gif

*** Permissions on all files in the directory ending in ".gif"
are thus set to mode 644, allowing Netscape to read the files.

hercules[5]% logout

CS490 Tutorials Back Continue
FTP introduction setting up your Hercules account transfer files to Hercules transfer files from Hercules