To send files to a web server we use file transfer programs. It used to be common to use FTP programs, but they are not safe. They make it easy to see passwords and all the information that you send, even if you want it to be private. In this class you will use a secure copy program to transfer files from your PC to your Hyperion computer account for Internet display.
There are a lot of instructions to read here, but before you read on please read this:
Initially, you will be pleased when you have learned sufficient skills to use the various applications encountered in CS100. However, there are two levels of learning and understanding involved. The first level is the syntactic level where you learn how to move files around with the SCP program and machines provided in this class. However, there is a deeper level of understanding, the semantic level if you will, where you come to realize that the SCP program on the machines in CL115 is simply one version of a file transfer tool that will allow you to move files between any two machines around the world to which you have access. For example, you might have an account with an Internet Service Provider (ISP) that gives you some disk space for building Web pages. The SCP process being described here would be the same for transferring files between your home computer and the ISP's machine. The machine addresses will be different, but the process will be similar, if not identical.
For Windows users the UofR provides WinSCP on the Computing Services Windows
Downloads Webpage. It is preconfigured to know how to contact Hyperion.
Click here to
download WinSCP at home.
WinSCP is just one of many secure copy programs (SCP),
and it is only available for Windows computers.
For Mac users who wish to use SCP, you may instead use either the program Fugu or CyberDuck.
In the CS100 lab just click the Start Menu and click on WinSCP at the top of the menu that pops up, or use the link on the Desktop.
Everywhere else, go to the Start menu and then to All Programs and then the WinSCP folder. Click on the WinSCP entry.
Next, click on the uregina.ca entry and then click the Login button.
Be patient while WinSCP connects to Hyperion.
In a moment you will be asked to enter your Username. Enter your user name and Click OK or press enter.
Then enter your password and click OK or press enter. As you type your password, the letters will show up as dots. This helps ensure your password's security.
Be patient again, as it takes a bit of time for the connection
to be established.
Your username and password must be transmitted in a secure manner
and then verified.
The first time you connect you may get a warning similar to the following.
Just click on the Yes button to continue.
If you want to display the files in your Hyperion account
on the Internet - i.e. Web Pages, you must place them
inside the folder called public_html.
Simply double click on that folder in the right side of the screen to open it up.
Let's assume that you wanted to copy the file called "index.html" from My Documents on your PC to Hyperion.
Just click once on the line containing index.html,
the name of the file that you want to copy.
This just highlights that file.
Now click on the F5 Copy button at the bottom of the screen.
You need to give permission to see the files you put on the web. After you send a file to Hyperion, look in the Rights column of the Hyperion side of the WinSCP window. A file should be visible if its rights look like this: rw-r--r--. If you see this: rw-------, the file will be invisible on the internet. If it is a web page people will get a 403 Permission Denied error. If it is a picture, it will show up as a broken picture icon, or it won't show up at all.
In the picture below:
To give people permission to see a file on Hyperion, click on the file, then click on Properties as shown in this picture:
In the window that pops up make the permissions for your file match this picture:
Take a close look at the permissions in the picture. Notice everyone can Read the file, but only you, the Owner, can Write to it. It only makes sense for you to have both Read and Write permissions, but for everyone else - Group and Others - only Read access is necessary to see the file on the web.
Then click on the F5 Copy button at the bottom of the screen. You will see an image similar to what you saw before. Once the file is copied to your PC there is no need to set Permissions. This is logical, since your PC is not set up as a web server, unlike Hyperion.
The instructions we gave for copying to Hyperion were a bit simplified. If you really want to get the copy process right for every type of file you now need to specify what kind of file you are copying.
To do this you would need to click on Transfer Settings... and select Custom...
"index.html" is a plain text file.
So click on the Text radio button as shown below.
You can also set the file permissions in the drop down window as shown
below.
When you have set the Transfer Mode to Text,
and have set the Permissions, click on the Copy button at the bottom of
the window.
Here is a screen shot showing the settings you would need to place
a picture file like smile.gif in your Hyperion web space.
Notice that you set the File permissions the same way you did for
a Text file.
It is just the Transfer Mode that is different, i.e. Binary
rather than Text.
You can make any custom transfer setting into your default setting by selecting "Set as default" from the transfer settings menu. In this case, it is best to leave the file transfer mode as its default: Automatic. It usually does a great job of figuring out whether a file should be sent as binary or text. If it doesn't know a file type, automatic mode sends the file in binary mode which is always safe, if not necessarily ideal.
| TEXT | BINARY | File Content |
| .WPS | Works word processor file. | |
| .WDB | Works database file. | |
| .WKS | Works spreadsheet file. | |
| .XLR | Works spreadsheet file (newer Works version) | .XLS | Excel file. |
| .GIF | Compressed image file. | |
| .JPG | Compressed picture file. | |
| .BMP | Image file. | |
| .TXT | Plain text file. | |
| .HTM | HTML text file. | |
| .HTML | HTML text file. |
The settings for directories is slightly different than the permissions for files.
For a directory, you also need to set the eXecute permissions for everyone.
Your "public_html" directory should already be set up correctly for you,
but if you want to reset the permissions, click just once on the
directory name to select it, and then click on the
F9 Properties button as shown below.
Then set the permissions as shown and click on OK.
Any directory in your Web Space should
have permissions as shown here.