Using Cyberduck to Transfer Files

Last updated October 21, 2005


NC State | Workshops | LTRC

The goal of this tutorial is to provide step-by-step instructions for transferring files from your Mac computer to NCSU's Servers to be viewed on the Internet.


Before you begin...

  • Print out this tutorial
  • Download and install Cyberduck2.5 from Apple's Web site
  • Verify that you have a valid unity login
  • Be sure you know the location (AFS pathname/directory) of where you want to transfer the file


Getting Started

Now that you have created your Web page(s), you must take some additional steps to make them available to the world via the Web. You must put them on a Web server so that people with access to the Internet may see your work.

For anyone with a Unity/Eos account on campus, putting your files in the Unity/Eos realm (whether in your own home directory or in a Unity locker) makes the files accessible to the Web server here at NC State. This document will guide you through the steps needed for setting up your individual Web site, including

  • creating a directory for your web files (HTML and images files)
  • transferring your files to the directory you created
  • setting access to the files and directory so the world can view the files

Cyberduck is a shareware program that is free to download from Apple's Web site. After you download the program, click on theicon to unzip. A new icon will appear: . Double click on this icon and a new window will open. Drag the duck icon into the application folder to install.


Open Cyberduck

Now is the time to open Cyberduck. From the Applications Folder, double click on the Duck icon to open the application. The window that appears is called the browser (Figure 1).

Cyberduck Browser Window
Figure 1. Example of Cyberduck's browser window.


Set Preferences

In the top menu click on Cyberduck and select Preferences (Figure 2) . The Preferences window will open (Figure 3).

Opening Cyberduck Preferences
Figure 2. Opening Cyberduck Preferences.

Click the General button (Figure 3), choose SFTP (secure file transfer protocol) from the drop-down menu for the Default Protocol. Use your unityid for the Default login name. The remaining settings on your computer should match those below. After establishing these preferences, click on the Transfers button.

Preferences: General tab
Figure 3. Preferences: Browser tab.

Under the Transfers window (Figure 4), click Choose... to select a Download Path. The default path is Desktop (Figure 5). Make sure everything else on your window looks like Figure 4 below.

Preferences:  Queue tab
Figure 4. Preferences: Queue tab

Now choose the SFTP tab (Figure 5). Find Client to Server and Server to Client in the Encryption section and select 3des-cbc for each item from the drop-down menus. Now you can close the Preferences window.

Preferences: SFTP tab
Figure 5. Preferences: SFTP tab.

Establish a Connection

Now that you have set the preferences for Cyberduck, click on the New Connection button (Figure 6). If you have not taken the time to set the software's Preferences, please take the time to do so now.


Figure 6. New Connection button.

After clicking on New Connection, a new window will open that resembles the one below (Figure 7). The first thing you should notice towards the top of the window is a drop-down menu with SFTP (SSH Secure File Transfer) already selected. Leave this setting as is. If it is not selected, please select it from the menu. Next, beside Server: type in ssh.ncsu.edu, and leave the Port: set to 22. In the field beside Path: you need to type in the AFS pathname (or directory) for either your project or course's locker (NOTE: This is given to you when your request for a project locker is processed.) This tutorial will use /afs/unity.ncsu.edu/lockers/project/your_project_folder/ as the example. If you do not enter a pathname in this field, then by default you will be directed to your personal locker space on the university's server. An example of a pathname for someone's personal locker space is /afs/unity.ncsu.edu/users/m/mjjordan, where m and mjjordan will be replaced with YOUR first initial and unityid, respectively. For the Username: and Password enter your unityid and the password for your unityid, respectively. Click Connect.

Create connection
Figure 7. Create connection.


The first time you use Cyberduck and attempt to log onto the university's system, the following window should appear (Figure 8). If you click Allow, you will receive the same prompt every time you log onto the system and every time you attempt to upload/download a file. Clicking Always (which is preferred) will save this "fingerprint" to your system. As a result, you should not receive this prompt again. However, if you click Deny, you will not be allowed to access the university's server.

Unknown host key
Figure 8. Unknown host key.


If you receive the error messages below (Figures 9 and 10), verify that you have an active Internet connection or that you have entered the AFS pathname (mentioned above) correctly.

Error: Hostname cannot be resolved
Figure 9. Error: Hostname cannot be resolved.


Error: No such file
Figure 10. Error: No such file.


If you clicked Always or Allow above (Figure 8) and did not receive the error messages as shown in Figures 9 and 10, then your files will appear in the browser window (if any files are present) (Figure 11).

Files as they appear in Cyberduck's browser
Figure 11. Files as they appear in Cyberduck's browser.


If you are looking for a particular file (or folder), type in the first few letters of the filename in the search window: File search window. Each letter that you enter eliminates the files that do not begin with that letter combination.


Bookmarks

Cyberduck will allow you to save or "bookmark" connections that you use regularly, and now that you have successfully connected to the university's server, it is time to save the settings for this connection. By book marking this connection, you will not have to enter the settings every time you log in. This will be explained in more detail at the end of the tutorial.


Open Bookmark Drawer

To bookmark a connection, open the View menu from the top menu bar and choose Toggle Bookmark Drawer. Another way to open and/or close the "bookmark drawer" is by clicking on the Toggle Bookmark Drawer button button.


Bookmark Drawer
Figure 12. Bookmark Drawer.


Add, Delete, & Edit Bookmarks

Notice that when you first open the bookmark drawer, it is empty (Figure 12). To bookmark the connection that you have just created, click on the button. You will see the connection that you just created and are currently using appear in the bookmarks window. To delete a bookmark, click on it to select it and then click on the button.


By default Cyberduck uses the Server name as the name of the saved bookmark (e.g., ssh.ncsu.edu). So far you have only saved one bookmark, so the name of the bookmark is not a problem. However, if you are working on multiple projects with different pathnames and create a bookmark for each project, then naming the bookmarks becomes an important. Because every one of these bookmarks is connecting to the university's server, every bookmark will be saved with the name ssh.ncsu.edu. To rename a bookmark (or to edit the Path or Username), click on the Edit Bookmark button. A window will pop up allowing you to edit the certain properties of the bookmark (Figure 13). When you have made the desired changes, click on the far left button in the top left corner of the window to close the window. The button should turn red when the mouse's pointer is placed over it. Look at the bookmark drawer again, and you will notice that the new nickname in entered in Figure 17 now appears in bold type as the name of the bookmark (Figure 14).


Figure 13. Edit bookmark.


Bookmark with new nickname
Figure 14. Bookmark with new nickname.


Copy (i.e., Upload/Download) Files and Folders

Before uploading or downloading a file or folder, let's briefly describe the concepts of uploading and downloading. To upload a file means to take a file from your computer (i.e., the local system) and place it on the university's server (i.e., the remote site) via an Internet connection. The university's server is accessed through the Cyberduck browser. Any other window that you have open is part of the local system and cannot be seen by the university's server until you physically move it there. Downloading involves taking a file from the university's server and placing it on your computer.

NOTE: You will not be able to upload to and/or edit files on the university's server if you have not been granted the appropriate access rights for the directories in which you are working. You will automatically have access rights for your personal locker space or project locker if you are the owner of the locker. If you do not have access rights to the locker but have been contracted to do work requiring access to it, please talk to the locker's owner about giving you the required access rights to work in their locker space. Figure 19 shows an example of the error message you may receive if you do not have access rights.

Take the time now to make sure you have opened the folder on your computer where you will either upload files from or download files to the university's server; make sure that you are in the correct folder on the server as well. Both folders should show the details (e.g., file name, file size, date the file was last modified) of the files that are in them. If not, please change to this List view on your computer before continuing.

Figure 15 shows the Icons folder view on the Mac. To change views, you have to be in the folder. Then click on View from the menu bar at the top of the screen. Find as List in this menu and select it (Figure 16). The way files are listed in this new view should resemble the files listed in Cyberduck's browser window. Navigating folders on Cyberduck is just like navigating folders on your computer: double-click to open folders and hit the Move up one folder button to move up one folder or hit the Back button to go back to the folder you were just in previously.


Figure 15. Icons view of files in folder.



Figure 16. Change to List view of files in folder.


Upload and Download Files

To upload a file to the university's server, find and click on the file on the folder on your computer. Drag it to the open destination folder in the browser window, and drop it. Observe the arrow as you drag the file to the browser. The arrow is accompanied by a plus sign to let you know that you are copying the file (Figure 17). This symbol does not appear if you are downloading a file from the university's server to your computer.

After you drop the file in the Cyberduck browser (upload) or in a folder on your computer (download), a Transfer Queue window will appear. This window shows the status of the transfer (e.g., percentage transferred, time elapsed, and connection speed). If you successfully uploaded the file to the server, that file will appear in the browser with the other files (Figure 18). The file should still be in its original location, too.

NOTE: In some instances you may receive a File Exists prompt or an error message when you attempt to upload a file. This is addressed below.

Copy a file via drag and drop
Figure 17. Copy a file via drag and drop.



Figure 18. Copied file now appears in Cyberduck's browser.


When you copy files, you may encounter windows that differ from the ones above. If you copy a file to a folder that already contains a file with the same name, you will be prompted to replace the existing file. Before clicking Overwrite, check the dates on both files. If you made changes to the file and are trying to upload it, then the date on the file should be more recent than the date on the file you are replacing. If not, double-check to make sure you are uploading the correct file. If the dates and times match, then click Cancel to abort the upload.

NOTE: "index.html" is a common filename. Because of this, it is important that you are uploading/downloading files to the right folder to avoid writing over the wrong file. A suggestion is to rename the old file before you upload/download a newer file [e.g., change 'index.html' to 'index_old.html']. Also, if you are making changes to a file from a version that already exists on your computer, make sure that you indeed have the current version of that file. The kind folks at the LTRC Studio or another individual that has permission to work inside your locker space may have made subtle changes to the file unbeknownst to you. A good habit to develop is to download [or at least check the date of] the file you wish to edit each time you want to make changes.


Another window you may encounter informs you that you do not have the necessary access rights to make changes (i.e., upload and rename files) to the folder or its contents (Figure 19). If you are not the locker's owner, then you will need to ask the owner to give you the required permissions to work in their locker space. If you are the owner and receive this error, you will need to contact the help desk located in the Hillsborough Building and inform them of the problem.


Figure 19. Error: Permission Denied.


Delete File

Assuming you are already connected to the server, to delete a file that is presently on the server, click on the file once to highlight it. With the file highlighted, click File on the menu at the top of the screen, and select Delete (Figure 20). You will receive a prompt asking if you really want to delete the selected file (Figure 21). Click Delete if you are certain you want to delete the file.

<Delete file
Figure 20. Delete file.


Confirm file deletion
Figure 21. Confirm file deletion.


Create a Folder (aka - Directory)

You can easily create new directories on your computer by creating new folders, but you can also create new directories on the server if you have the necessary permissions. If you do not have the permissions necessary, visit or direct the owner of the locker to the following page: http://ced.ncsu.edu/ltrc/studio/workshops/accessrights/. Before you create a new directory, make sure you are working in the right place (i.e., your computer vs. the server) and are in the correct folder. To create a new directory in Cyberduck, click File and select New Folder from the menu. A new window will pop up (Figure 22). Type the name of the new folder in the window and click OK. The new directory will be created and will be displayed in the directory listing.


Name the new folder
Figure 22. Name the new folder.

You are now ready to upload your files. But first there are a few things to note about naming and renaming folders and files.


File Names for Web Folders and Files

There are a few things you must consider before actually uploading your files to the university's server. These are file format and the naming of your files. The NC State Web server is a Unix server which means it is case sensitive. However, Windows and Macintosh machines are not. Therefore it is very important that you follow the naming conventions for the system to which you are transferring your files.

Here are the main rules for Unix file names:

  • Filenames are case-sensitive
    • INDEX.html is distinct from index.html - If a file is saved with uppercase letters, the URL to locate that file on the Web must also contain uppercase letters. This can be confusing to unsuspecting users.
      (e.g., http://www.ncsu.edu/lockers/project/your_project_folder/INDEX.html).
  • Absolutely no blank spaces in file names
    • Use index_old.html instead of index old.html - A space in a file name results in the addition of a '%20' in the URL. You may have noticed in these in some URL's on the Web. These make it difficult for people to locate your file(s) on the Internet.
  • Do not use non-alphanumeric symbols such as &, *, @, $, #, /, etc.

In addition to those rules, follow these for HTML and image files:

  • All HTML files must include the .html or .htm extension
  • All GIF files must include the .gif extension
  • All JPEG files must include the .jpg suffix (note that there is no “e” in the extension)


Get File Information and Rename Files

To get information about (or properties of) a file (e.g., file size, file location, file type, etc.), highlight the file and click the Action down arrow (Figure 23) and select 'Info' from the menu. A new window will open that displays the file's (or folder's) current information (Figure 24).

If you want to rename a file because it does not meet the above rules or just for the sake of renaming it, you can do it in the Info window. In the field showing the name of the folder or file, type in the new name of the folder or file, but be sure to leave the file's extension (e.g., .html, .htm, .jpg, .gif, .pdf, etc.) intact (Figure 25). Folders do not have extensions. Also, remember to use the naming conventions above for both files and folders.

Once the name has been changed, hit Apply for the change to take effect, and click on the far left button in the top left corner of the window to close the window. As mentioned before, the button should turn red when the mouse's pointer is placed over it. Once you are back to the browser, look to see that the file was indeed renamed.

Get Info button
Figure 23. Action menu.


Rename a folder
Figure 24. Folder information.
Rename a file Figure 25. Rename a file (with extension).


Setting Access for Your Web Pages on Unity/Eos

For security purposes, your Unity/Eos account is set so that you and the people who run the system are the only ones who can look at your files. This level of security protects your files, but it also interferes with a Web browser’s ability to display the Web pages that you have put into your Unity/Eos account. To make your files in your personal locker space are viewable while keeping the rest of your Unity files secure, you will need to click here, login, and follow the on-screen directions.


Your URL

If you have followed these directions and put your Web pages in a directory named www that is in your personal locker space, your URL will be

http://www4.ncsu.edu/~unityid/file.html

where

unityid would be replaced with your username, and
file.html would be replaced with the webpage’s file name if it is not index.html

For example,

http://www4.ncsu.edu/~mjjordan/

would be the URL for the following file:

/afs/unity or eos/users/m/mjjordan/www/index.html


Cyberduck Help

For more information about Cyberduck, go the Help menu on the top bar and click on Cyberduck FAQ.


Close Cyberduck

At the end of the session exit out of the program is to click on the Disconnect button (Figure 26). You will be prompted to confirm whether or not you actually want to disconnect (Figure 27). Click Disconnect.


Disconnect button
Figure 26. Disconnect button.


Prompt to confirm your request to disconnect
Figure 27. Prompt to confirm your request to disconnect.


Use QuickConnect to Sign-in

Remember when you bookmarked your connection settings earlier? Cyberduck stored the Server name (e.g., ssh.ncsu.edu). To establish this connection again, locate the stored Server name to which you want to connect in the QuickConnect drop-down menu (Figure 28). Click on it, and Cyberduck will log you into that server with the settings and preferences you saved. You may be prompted for you password. If so, use your unityid password.

Use Quick Connect to log into a saved directory
Figure 28. Use Quick Connect to log into a saved directory.


URL: http://ced.ncsu.edu/ltrc/studio/workshops/ftp/cyberduck/
Page maintained by the Learning Technologies Resource Center.
Updated October 21, 2005
NC State University, College of Education. All Rights Reserved © 2005
Best if viewed with IE 6.0 or Safari 2.0