Table of Contents
FTP is an acronym that stands for File Transfer Protocol. FTP applications are client/server applications that allow the transfer of files between two computers. The basic idea is that you use an FTP client application to connect to an FTP host, then you can transfer files from your computer to the host, or get files from the host to your computer.
-
client: an application that lets your computer (the one that is making the FTP connection) connect via FTP to another computer
-
server/host: the computer that is accepting the connection
-
host address: a way of identifying the host computer, usually something like computer.domain.com
The FTP application installed on the Lab Windows machines is WS_FTP. As a GUI-based FTP client (graphic user interface, as opposed to command line), it allows for easy client/server interaction. SILS students can download this application from [ http://www.ils.unc.edu/downloads/ ] the SILS site.
The Ruby and Isis servers can not be reached using WS_FTP. See [ http://sils.unc.edu/itrc/its/faq.php?id=4681 ] the SILS FAQ page on how to SSH.
Users can FTP to the SILS Duck server. To FTP using WS_FTP, first double click the WS_FTP program icon, which looks like this:
(The icon can be found on the Lab computers by going to the Start menu --> All Programs --> Internet Accessories.)
After you start WS-FTP, the following window will appear:
In the Host Name/Address box type the address of the server to which you wish to connect. In this example, the host is duck.ils.unc.edu. Be sure Host Type is set to "Automatic Detect." Enter your User ID and password for that server (duck.ils.unc.edu is ad\onyen).
After WS-FTP has connected to the sever you specified, you will see a window like this one:
The left window partition represents the Local System , or the computer that you are using. The right window partition represents the Remote Site , or, in this example, Duck.
After connecting to the remote site, you should be in your own folder on that server. If not, click the ChgDir button in the right window partition to change directories on the remote system. A window will appear in which you can type the directory to which you want to connect. For example:
would connect you to the directory of users, where you can scroll down and find your username. You can open subdirectories (they look like folders) by double-clicking on them, and you can go up a directory by double-clicking on the green arrow in the top of the list.
To get a file from a remote location to your local computer:
-
Move through the directories of the remote server to identify the file you wish to get.
-
On your local system, move to the directory where you want to put that file.
-
Highlight the file on the remote system by clicking on it once with the mouse.
-
With the file highlighted, click the arrow pointing from right to left (from the remote to local computer).
To copy files from your local computer to the remote server, follow the same procedure, but highlight the file on your local system and click the arrow pointing to the remote computer.
After moving a file to a new location, you may need to change its access permissions. To do so, right-click on the file and choose CHMOD . A new window will appear, containing access levels and check boxes. Set permissions by clicking the check boxes on or off.
Fetch is a GUI-based FTP client for Macs. Students can download it from [ https://shareware.unc.edu/ ] the UNC Shareware site.
Open Fetch by double clicking the Icon in the Applications folder. Upon opening, the following screen will appear, if it does not, select File and then New Connection... .
In the Hostname: field, put the name of the server you are connecting to. In this example, the server is duck.ils.unc.edu. Enter the appropriate username and password for the server (isis.unc.edu is your onyen, ruby.ils.unc.edu is your Lab username, duck.ils.unc.edu is ad\onyen). In Fetch, you have to know how you are connecting to the server: Duck connects using FTP, Ruby and Isis connect using SFTP. Change the Connect using: field correspondingly. Once you have completed these fields, select Connect .
Following is a picture of how the Fetch interface looks.
You will open into the folder you last used on that server via Fetch. To navigate up, use the Path button to select a folder. To navigate into folders you can see, just double click on them. Double clicking a file will download it to your desktop. You can also drag-and-drop files between Fetch and your computer.
Initiating a Session
Initiate an FTP session by getting to the Unix command line. At the command line prompt, navigate to the folder on your computer that you wish to send files from or receive files to by using the cd command. Type ftp once you are in the desired folder. The prompt will change to ftp> instead of your normal shell prompt. Type open then the host address of the computer you want to connect to. For example, if you were connecting to Duck, you would type duck.ils.unc.edu. If you have an account on the host computer, you can login to duck with ad\onyen and lab password. You will have to SSH to Ruby or Isis, see [ http://sils.unc.edu/itrc/its/faq.php?id=5656 ] the SILS FAQ page for details.
An example FTP session, with client commands emboldened, is shown:
~ $ ftp
ftp> open duck.ils.unc.edu
Connected to duck.ils.unc.edu.
220 duck FTP server (NetApp Release 7.1.1: Sun Jun 25 03:57:55 PDT 2006) ready
Name (duck.ils.unc.edu:): ad\onyen
331 Password required for ad\onyen.
Password: *******
230 User ad\onyen logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
Basic Commands
Here are some of the basic commands that are used to establish and use an FTP session:
-
open initiates the session between the client and the server
-
nlist, dir, ls list the heirarchical organization of files on the remote server
-
cd allows you to change directories on the remote computer either up or down
-
pwd gives the client a chance to view the current directory and pathway on the remote host
-
lls, lcd, lpwd are the ways in which you can do the above for managing your local files
-
get allows you to retrieve a file from the server down to your local client computer.
-
put allows you to place a file from your client up to the remote server computer.
-
mput/mget are the same as above but allow for multiple files to be manipulated with a single command
-
prompt sets interactive prompting; "on" is a safety feature prompting you for verification of each step of the multiple commands, "off" allows the commands to act unimpeded
-
ascii/binary allows to specify the type of file to be transferred
-
quit ends the connection and ends the session.
To see the full array of commands, type help or ? at the ftp> prompt; the above list is not exhaustive but does give the most commonly used commands.