Using the Web Publishing Service

Contents

Note: this is generated by the validator link at the bottom.

  • Introduction
  • Pre-requisites
    • Required Software
      • Other Software
  • Logging into the UNIX service
  • Transferring Files
  • Setting Permissions
  • Notes
    • Note 1 - Creating folders
    • Note 2 - The 'Execute' Permission

Introduction

This guide will explain how to transfer files from your desktop computer to the UNIX service and how to set appropriate permissions on those files so that they may be accessed over the web.

Pre-requisites

In order to follow this guide you must have already done the following:

Required Software

This guide will explain how to use the Secure File Transfer Client, as found on the Common Desktop.

Other Software

If you are wishing to publish files on the web from a machine which doesn't have the Secure File Transfer Client, there are alternative programs.

It is recommended that you work through this guide firstly on a Common Desktop computer using the Secure File Transfer Client so that you understand the principles before attempting to use another piece of software.

Alternative Software

Windows
WinSCP - http://winscp.sf.net/
Mac OS X
Fugu - http://rsug.itd.umich.edu/software/fugu/

Logging into the UNIX service

Select Secure File Transfer Client From 'Communications and Internet' on the Start Menu (see Image 1).

The location of 'Secure File Transfer Client' is
                Start Menu -> Communications and Internet

Image 1
click to enlarge

Enter the host-name unix.ncl.ac.uk and your UNIX username in the pop-up box labelled 'Connect to Remote Host' (see Image 2) and click 'Connect'.

a picture

Image 2
click to enlarge

You may be asked whether or not you want to save the new host key to the local database, as in The following image: A dialog entitled 'Host Identification'
Click 'Yes'.

You are now presented with the main program window. The left-hand pane represents the files on the local computer, whilst the right-hand pane represents those on the remote machine.

If there is a small floating window entitled 'Add Profile', you can dismiss it using the 'X' button in the top-right corner.

Transferring Files

To transfer files from one machine to the other, drag them across from one pane to the other.

On the remote machine there should be a folder called public_html. This was created when you registered for the Web Publishing service. If it is not there, you can create it yourself (see Note 1).

The files within this folder are accessible to the world via the world-wide-web.

example a file ~/public_html/hello-world.txt within the home directory of student Joe Bloggs would be accessible at http://www.students.ncl.ac.uk/joe.bloggs/hello-world.txt

Setting Permissions

Files on UNIX have associated permissions, which dictate how the files can be accessed. It is important that your files have the correct permissions, so they can only be read and written to by those you intend.

A file's permissions are divided into three sets:

User
The owner of the file (i.e. You)
Group
Users' within the same group as you
Other
Other people

Each of these three sets can have three types of permission:

read
The file may be read.
write
The file my be written to.
execute
The directory may be traversed (See Note 2).

In normal circumstances, the web server who reads your files will be considered as Other. Thus, you would desire that this group would have read permissions for your files, and execute permissions for your directories.

You would definitely not want anyone other than yourself, User, to have write access to your files or directories. This is a common mistake that people make and it allows malicious users to `hack' other web pages.

Read access to a directory means the contents can be read. On the web, this typically means viewing the directory results in a 'Index Of...'-style page. If you do not want people to be able to look at the contents of your web folders, do not grant read permissions on your directories to anyone but User.

Notes

Note 1 - Creating folders
Note 2 - The 'Execute' Permission