Putting Files on the NC State
Web Server with WinSCP
for Windows 95/98/2000/ME/XP/NT ™

Last updated February 17, 2005


NC State | Workshops | LTRC

Before you begin...

  • Print a copy of this tutorial to have a reference guide
  • Bookmark this page for your convenience
  • 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

WinSCP is a shareware program that is free to NC State faculty, staff, and students with valid Unity ID's. This software can be downloaded at the following Web site: http://download.eos.ncsu.edu/winscp/. Simply go to this site, and click on Download WinSCP 3.6. You will be required to enter your Unity ID and password before downloading the software. When prompted, save the file to a location on your computer where you can access it easily later.

After downloading and launching the software, you will need to configure it so that you can access NC State's servers. Click here to learn how to configure the software. Although this page gives you the option of automatic or manual configuration, we recommend that you configure your software manually. Follow the manual configuration instructions with the following exception: instead of entering remote.eos.ncsu.edu for the Host name:, you should enter ssh.ncsu.edu. This host name will become your session name, also.


Connect to Unity to Transfer Files

When you first start WinSCP, you will see the following window (Figure 1). Unless you created other sessions, you will only see ssh.ncsu.edu in this window. It should already be highlighted, but in case it is not, click on it once to hightlight it. Then click Login at the bottom of the window.

WinSCP Login
Figure 1. WinSCP Login.


If for some reason you get the following error message (Figure 2), please check to make sure that you have an active Internet connection and that you configured the software properly.

Error: Host does not exist
Figure 2. Error: Host does not exist.


After you log in, you will be presented with one of two versions of the software's interface. Norton Commander (Figure 3) is the default interface, but the Explorer-like interface (Figure 4) is easier to use. The Norton Commander interface is similar to the WS_FTP interface with two adjacent panels showing your local system (i.e., your computer) and the remote site (i.e., server).

Example of Norton Commander interface
Figure 3. Example of Norton Commander interface.


However, the Explorer-like interface is more intuitive because it emulates Windows® Explorer.

Example of Explorer-like interface
Figure 4. Example of Explorer-like interface.


Because of its ease-of-use, this tutorial will focus on the Explorer-like interface. If you are more familiar with and/or more comfortable with WS_FTP, directions for using the Norton Commander interface will be coming soon.


Set Preferences

Environment

To open the Preferences window, click on the Preferences button button. (NOTE: If you are unsure of what a particular button is or does, hover the mouse's arrow over the button; the name of the button will appear after a second or two.) With Environment highlighted, make sure your boxes under Confirmations are checked like those in Figure 5. Checking these boxes means WinSCP will ask you to confirm any of theses actions when you request it. Although this requires an extra step to perform the checked actions, it is better to confirm each action than to risk accidentally deleting or overwriting files and folders. You may even want to check "Exiting application" to prevent you from closing the program accidentally in the event you confuse the program's window with other windows you may have open. (NOTE: Your Random seed file has a default setting and will differ from what is shown below. You DO NOT need to alter this setting.) After setting these preferences, you will want to set the preferences for Drag & Drop (see below).

Environment Preferences
Figure 5. Preferences: Environment.


Drag & Drop

If the Preferences window is not already open, click on Preferences button to open it. Once open, find Drag & Drop under Environment and click on it, and make sure that your settings match those in Figure 6.

Drag and Drop Preferences
Figure 6. Preferences: Drag & Drop.


Choose Interface

If you are uncertain which interface appears when you log in or need to change from the Norton Commander interface to the Explorer-like interface, click on the "Preferences" button Preferences button. Under Environment, click on Interface to highlight it (Figure 7). The following screen will appear. If you do not see Interface under Environment, expand the options for Environment by clicking on the Expand button.

Preferences
Figure 7. Preferences: Interface.


Verify that you are using (or check the button to select) the Explorer-like interface, and click OK. If Norton Commander was initially selected and you changed it, you will have to close the program, re-open it, and log in again. Only then will your preference changes take effect. This is true anytime you change the user-interface.


Change Appearance of the Interface

Now that you have opened WinSCP with the Explorer-like interface, you will need to determine which view of the window you have. The window can display folders and files as either Large Icons, Small Icons, List, or Details. The same is true for folders that you open in MS Windows. For the purpose of uploading and downloading files, it is highly recommended that you use the Details view because this view will show you the names of files, file sizes, and the dates that the files were last modified. This is very helpful if you are trying to replace a file with an identical name because it will allow you to determine which file is newer and prevent you from writing over the wrong file. From personal experience, it is a low feeling when you write over the wrong file and have to redo your work.

Below is an example of a window with Large Icons (Figure 8). Notice how similar it is to a typical window on a computer running a Windows® operating system. To see the view options and choose one, click on View at the top of the window. A drop down menu will appear (Figure 9). Click on Details. You will notice that your window now resembles Figure 10 below. Although the examples below are from WinSCP, you can apply these directions to folders in Windows® Explorer. However, in Windows® Explorer the details provided will vary from those seen in the examples but will still show the file name, file size, and date the file was last modified.

Example of window with Large Icons
Figure 8. Example of window with Large Icons.


Example of drop-down window
Figure 9. Drop-down menu under View.


Example of window with Details view
Figure 10. Example of window with Details view.


It is easy to organize your files by name, last date modified (perfect for finding files you have altered recently), or any other detail. To do this, simply click on the column heading. Clicking on a column heading multiple times will toggle between ascending and descending orders.


Open a Directory & Create a Bookmark

Now that our preferences have been set, we are ready to begin the real work.(NOTE: If you have not set your preferences as instructed above, please do so before continuing to avoid complications.) When you login, the software will take you to your personal locker space by default. The AFS pathname (or directory) will appear in the Address window in the following form: /afs/unity.ncsu.edu/users/m/mjjordan, where m and mjjordan will be replaced with YOUR first initial and unityid, respectively. If this is the directory where you want to upload or download files, then you may skip to the next section on copying files; if you want to give the general public permission to view these files on the Web, please visit the section below on setting access rights for your locker space. If you wish to work with another directory, then you need to open a directory by clicking on the Open Directory Button button. A new window will appear (Figure 11), and in this window under Open directory:, you need to type in the directory for your project'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. At this point, you can either click OK to continue to the specified directory, or you can click on Add to save the directory for future use.

Open Directory
Figure 11. Open directory.


Clicking Add will "bookmark" the directory so you will not have to enter the entire pathname again. To access this directory in the future, simply click on the Open Directory Button button, highlight the directory under Select bookmark: by clicking on it once, and click OK (Figure 12). Other bookmarks may be added and/or removed at any time.

Select and Open a Bookmark
Figure 12. Open a saved directory.


If you receive an error message that resembles the one below (Figure 13), check to make sure that you have entered the pathname correctly.

Error changing directory
Figure 13. Error changing directory.


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 WinSCP's window. 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 a file involves taking a file from the university's server and placing it on your computer.

(NOTE: You will not be able to upload 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 17 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 that contains the files you want to copy; 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 view before continuing. If you need assistance, visit the section of this tutorial titled "Change Appearance of the Interface". Navigating folders on WinSCP is just like navigating folders on your computer: double-click to open folders and hit the Go up one directory button to move up one folder (or back out of your current folder).


Download Files and Folders

To download a file, highlight it in WinSCP and drag it to the folder on your computer where you want to save the file and drop it. There is a distinction between copying a file and moving a file that needs to be addressed. Copying a file leaves it in its original location whereas moving a file removes it from its original location. Be careful not to "move" a file, or it will no longer be available for others to access or view online. Observe the arrow as you drag the file from one location to another. If the arrow is accompanied by a plus sign Plus, then you know you are copying the file (Figure 14). If a plus sign is not present, then you are moving the file and need to cancel the action or click No when prompted. If a plus sign is present, click OK when asked to confirm the copying of the file (Figure 15). Please note the following exception below.

Drag and drop to copy  a file or folder
Figure 14. Drag and drop to copy a file or folder.


Copy file to drop target confirmation
Figure 15. Copy file to drop target confirmation.


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 (Figure 16). Before clicking Yes, check the dates on both files. If you made changes to the file and are trying to upload it, then the date on the second file should be more recent than the date on the first file. If not, double-check to make sure you are uploading the correct file. (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 new/newer file [e.g., change 'index.html' to 'index_old.html'].) 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 17). 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, you will need to contact the help desk located in the Hillsborough Building and inform them of the problem.

Confirm file replace window
Figure 16. Confirm file replace window.


Permission denied
Figure 17. Permission denied window appears when you do not have access rights to a folder.


After clicking OK to copy the file, a window will pop up to show you the file's progress (Figure 18). Your connection speed and the size of the file will determine how long it takes to copy the file.

Copy in progress
Figure 18. Copy in progress.


There will be times when you want to copy multiple files from your computer to the server and vice versa. One way to do this is to select individual files by holding down the [Ctrl] key and clicking on each one (Figure 19). Another way of doing this will select a range of files. To do this, click on the first file in the range of files you want to copy. Then hold down the [Shift] key while clicking on the last file in the range. Notice that all the files between them have been selected as well (Figure 20). To copy all of them simultaneously, simply click on one to grab it, drag it to the destination folder, and drop it. All the files you selected will be copied. It is also possible to copy an entire folder, but you cannot be inside the folder you want to copy. If you are, click on the button to back out of the folder. Then drag and drop the folder to the location where you want it copied.

Example of selecting individual files using the CTRL key
Figure 19. Example of selecting individual files using the [Ctrl] key.


Selecting a range of files using the SHIFT key
Figure 20. Selecting a range of files using the [Shift] key.


Upload Files and Folders

The preceding instructions for downloading files can be applied to uploading files with the following exception: To upload a file, locate and highlight it in on your computer. Then drag it to the WinSCP window (which should have the correct destination directory/folder open) and drop it.


Create a Directory (aka - Folder)

It is possible to create directories on your computer and 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 WinSCP, click on the Create directory button. A new window will pop up (Figure 21). Type in the name of the new folder and click OK. The new directory will be created and will be displayed in the directory listing. You are now ready to upload your files. There are a few things to note about naming and renaming folders and files. This is addressed below.

Create folder/directory
Figure 21. Create folder/directory.


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 old_index.html instead of old index.html - A space in a file name results in 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)

To rename your files in WinSCP if they do not meet the above rules, highlight the file and click the Rename button. This will place a black rectangle around the filename. You will also notice that a flashing cursor has been placed at the end of the filename. Now you can rename the file, but be sure to leave the file's extension (e.g., .html, .htm, .jpg, .gif, .pdf, etc.) intact. Once the file has been renamed, either press [Enter] or use your mouse to click off the file.


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


NC State | Workshops | LTRC

URL: http://ced.ncsu.edu/ltrc/studio/workshops/ftp/winscp/
Last updated:
February 17, 2005
Page maintained by Learning Technologies Resource Center
best viewed with Netscape 4.7 or Internet Explorer 5.0