PuppyLinux : UsingFTP

PuppyLinuxMainPage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

Using FTP


An Introduction to FTP


FTP, or File Transfer Protocol, is a method of transfering files between computers on the Internet. People often use FTP in the creation and maintenance of their Web sites, transferring files they've created on their personal computers to their web hosting accounts, and vice versa.

Do I need FTP?


Some HTML authoring tools handle the FTP process of transfering HTML and binary files to your hosting account for you. If you are not using this kind of software, you'll need to use FTP in any of the following situations:


FTP comes standared with every TCP/IP (Internet) protocol software package, and it's very easy to use.

What FTP can do


FTP allows you to: list files and directories; create new directories and delete old ones; upload and download files, as well as delete old ones; rename directories and files--in short, do everything you would normally do on your local machine, except create new files from scratch.

FTP also supports uploading and downloading large groups of files at one time. If you have a graphical FTP program, transferring files is as easy as pointing and clicking with your mouse.

An FTP file transfer tutorial

A step by step tutorial on uploading your HTML documents


Introduction:


The FTP (File Transfer Protocol) file transfer system is versatile as well as extremely useful. You can rename your files, upload, download, and manage most aspects of your files via FTP. If you are using a Web authoring software package that handles the uploading of files to the server, then the correct configuration may be somewhat different. The following instructions assume that you are dialed up to your Internet Service Provider as you normally are when browsing the Web.

Uploading


Different graphical FTP programs will vary somewhat in their interfaces and menu layouts, but are generally similar enough that the following instructions will apply. Every FTP client will have a place (a dialog box which automatically appears, or a menu selection which brings up such a box) where you enter information regarding which server on the Internet you want to hook up to. You may have to hit a buttin labeled "Connect" in order to get this box to come up. When you have found this box in your particular client, there are three crucial pieces of information needed to log you in to your account as the account owner. They are:

Host Name = ftp.domain.name.com
Username = your_userid
Password = your_password

Other settings to watch out for

"Anonymous Login" checkbox - Some FTP programs have a checkbox labeled "Anonymous Login", or something similar. You want to be sure that this box is unchecked. Having this box inadvertantly checked will cause your client to log in as an anonymous user instead of the account owner, even if you have entered your userid and password in the appropriate places.

Initial Directories - Sometimes having values in boxes which specify Initial Directories can cause your connection attempt to fail. It is best to leave these boxes blank, or delete any default values which you may find there.

Host Type - Generally "Auto-detect" is a safe value to have as the Host Type, but if it doesn't work use UNIX.

With these settings in place, click the Ok or Connect button to connect.

Changing to the www directory


Once you are logged in to the FTP server you will see a listing of all of the files and directories in your home directory, usually in a list box on the right. Next click on the www directory listed in the box with the other directories (most FTP clients have 4 lists boxes, these are usually the 2 top ones) and click on Change, or double click the directory.

Moving files back and forth


Now you should be in your www directory under your home directory. The next step is to locate your files on your computer in the left set of list boxes. Select the files you wish to upload in the local machine list boxes on the left portion of your screen. Next, click the Copy, Transfer or arrow button to upload your files.

The procedure for retrieving files from your account is the same as downloading, you just select the source and destinations in different list boxes.

Using a Graphical FTP Client


Differences Between Filenames on FTP Servers and on your Personal Computer


Most FTP Servers use Unix, the standard operating system for serving data on the Internet.

Unix is case sensitive. Under Unix, filename.GIF, filename.gif and FILENAME.GIF all refer to different files. This is not the case with some other operating systems (such as DOS/Windows).

There is no "undelete" under Unix. Once a file is gone, it is GONE. Forever. Period. Regular backups are highly recommended.

Moving Around and Listing Information about Files


If you are logging into your account you are automatically transferred to your home directory after logging on. The area displaying your files and directories will show the directory where you are located. This is your home directory: all files transferred to your account must be stored here, or in a sub-directory underneath it. Most servers will require you to transfer files to a specific directory if they are to be available to web visitors.

Several directories and files should be listed. These are created when your account is initially set up. Your provider will have more information describing your directory structure.

Find the menu item or button which provides detailed information about your files and directories. Highlight the "www" directory and select the button or menu item.

Your client should show the last time the "www" directory was modified, and a string of letters similar to "rwxr-xr-x" (these are file access permissions, which control who can access your files).

Highlight and doubleclick on "www". This will change the directory displayed to "www". The file listing will now show files located in the "www" directory. The area displaying your current directory will show "/pub/[youruserid]/www".

The "www" directory is where the files and directories you wish to be accessible through the World Wide Web must be placed or created. If you are accessing your account before having placed any files in this directory, only one file will be listed: "welcome.html" (this file was placed in your "www" directory when your account was set up). Use the "Info" button or menu option to view the detailed information about the file as you did with the "www" directory.

Transferring Files


Before transferring any files, make sure your FTP client is using "Binary" mode to transfer files. There should be an button or menu item controlling this. The program used while creating this tutorial has two buttons, right under the menu bar, which turn this on and off. Many FTP clients default to the alternate mode, "ASCII", which damages non-plain text files during transfer.

Transferring a file to your account should be as simple as highlighting the file, and clicking "Copy" (as in the program we used) or "dragging" the file from a directory on your machine, and "dropping" it into a directory on the destination server. If it is not immediately obvious, the "help" menu of your FTP client should explain how to do this.

Your client should provide information about the progress of the transfer as it occurs. Once the transfer is finished, the file should be listed in the "www" directory of your account. You may have to "refresh" the listing by clicking on the "www" directory again to see it.

The next step is to alter the permissions of your file, to make sure that people can or can not access it, as you choose.

Using a Command Line Interface


Unix is case sensitive. Under Unix, filename.GIF, filename.gif and FILENAME.GIF all refer to different files. This is not the case with some other operating systems (such as DOS/Windows).

There is no "undelete" under Unix. Once a file is gone, it is GONE. Forever. Period. Regular backups are highly recommended.

Unix paths use the forward slash "/welcome.html". DOS users used to referring to files with the backslash should keep this in mind. The equivalent of "c:\upload\myfile" under UNIX is "/upload/myfile".

Moving Around and Listing Files


Immediately after you have logged on, type "pwd" (present working directory) at the prompt. You will see "/pub/[youruserid]". This is your home directory. Any files you transfer at this time will either go to or come from this directory.

Type "ls" to get a list of all the files and sub-directories. A directory can be distinguished from a regular file by the "d" at the beginning of the first column of a file listing. A listing with "drwxr-xr-x" (for example) in the first column is a directory. The leading character, "d", indicates that the listing is a directory.

If this is your first time logging on, then only a few files and directories will be listed.

Type "cd www" to change your directory to "www". "cd" is the command you use to change the directory you are located in. Type "pwd" after you have moved to the "www" directory, and the your client will show "/pub/[youruserid]/www".

The "www" directory is where the files and directories you wish to be accessible through the World Wide Web must be placed or created. If you are accessing your account before having placed any files in this directory, there may not be any files - this depends on your provider.

Transferring Files to your account


Now we are ready to transfer a file to your account. Make sure the file you have selected is a small one--10 kilobytes or less--so the transfer time is short. (The size of a file can determined by listing it on your computer. One of the entries should display a number. If the number produced is under "10,000" or "10k", then you are safe.)

Enter "binary" at the prompt. Many FTP clients start out in "ASCII" mode. This will result in damage to any non-plain text file during transfer, such as a graphic image. Remember to do this every time you log on, if your client does not have a setting to permanently alter this.

The "lcd" command allows you to change the "working" directory on your local machine. "lcd" alone will transfer you to the directory you were located in when the FTP client was launched.

Transfer to the directory where the test file you selected at the beginning of the tutorial is located. "lcd path/to/file" in Unix, or "lcd c:\path\to\file" in DOS (or the equivalent on your system).

The command to upload a file is "put [filename]" where [filename] is the name of the file on your local system.

Your client will provide information about the progress of the transfer. Once it is finished, type "dir". The file will be listed in the "www" directory of your WebCom account.

The next step is to alter the permissions of your file, to make sure that people can or can not access it, as you choose.



This is my first pass at a FTP tutorial - I will continue later with moving more than one file at a time


CategoryDocumentation

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.0
Page was generated in 0.0856 seconds