Student project server documentation
You may not be using all of the following options for your course. These instructions are listed for any courses requiring them.
Videos
- use PuTTY (Windows)
- use Terminal (Mac)
- use Cyberduck (Windows/Mac)
- use WinSCP (Windows)
- use MySQL (Windows/Mac)
Linux help
The Linux Operating System can be used in many different ways. However, as a student at Athabasca University there are certain commands that you should get to know. These commands will help you organize your personal directory, and make doing things more efficient.
The following section will walk you through a simple tutorial based on the commands that you will most frequently use as a student. Keep in mind that Linux offers hundreds of different commands not outlined.
- This documentation is for all students doing course projects on the student.athabascau.ca server.
- You must use ssh to log in at
student.athabascau.ca.
If you don't have a login name and password, please contact SCIS technical team. The IO server uses a Linux platform. (Linux is a version of UNIX.)
- You must use ssh to log in at
- You may also use an SCP program to transfer your files to your home directory on the student.athabascau.ca server. (Download WinSCP)
- Once you are logged in, you will be in your home directory. The path to this directory is
/home/login
. Note: In place oflogin
, enter your own login name. - You will place any HTML documents in a subdirectory of your home directory called
public_html
(/home/login/public_html
). To access these from the Web, the URL will behttp://student.athabascau.ca/~login/filename
. Note: Enter your login name and the filename you wish to access. - Your permissions are set to your home directory so that HTML files can be viewed from the Web, but other users on the server will not be able to change to your directory and read or write to your files. Do not copy from other students' directories! All student access is monitored and logged.
- You may use the command line editors such as vi or pico to edit both your HTML and source code documents. If you edit documents on your windows machine and transfer them to the server, you need to ensure that your Windows editor has not added extra Windows return characters to your source code, as this will interfere with executing your files on the server. You can use Notepad++ (Windows) or TextWrangler (Mac) to edit or create your HTML files or source code.
Student project accounts are available on Athabasca University's student server to upload course projects on the Student Server. Therefore, it is important to learn how to manage your student account, so that you can better utilize it to meet your needs. Most importantly, you have to remember that Linux is CASE SENSITIVE. This means, that you have to type in the commands exactly as they appear. If you receive an error message, please ensure that you have not reverted to upper or lower cases. Finally, your Linux prompt will reflect your home directory. For example, if your login_id to the Unix system was jmontana, your home directory would be:
/home/jmontana/
Your command line prompt might have the following format:
[jmontana@student jmontana]$
OR
-bash-3.2$
Great, so you now have your very own Linux account. But what is next? Well for starters, you have to be able to see what is currently on your account. To do that, you will use the ls command. This command will display the contents of your current directory. Generally speaking, most student accounts will have a prompt similar to this: [jmontana@io jmontana]$ on the student.athabascau.ca server. (For simplicity purposes we will display the student directory system in the examples). This indicates the level of depth for your personal directory. If you wanted to see the contents of student:/home/login_id$ you would type ls. This would produce a list of all the files and directories in the directory login_id. Directories are distinguishable from files because they have a "/" at the end of them. Directories can be thought of as the drawers in a filing cabinet. You utilize directories to organize and sort related information. For example, you might have a project directory whereby, all of your project course work is stored. Not only does this make it very convenient for you to store your information, it also saves you the time and energy searching for specific materials.
The command ls -l, gives you a more in-depth listing than just ls on its own. The results displayed indicate the permissions on a particular file or directory. Permissions can be thought of as access rights to a file or directory. For example, you might find the following on your particular account when you execute the 'ls -l' command.
drwx--x--- 2 login_id STUDENT 512 Dec 12 14:33 Mail/
- The d indicates that the specified file is a directory. Mail/ is a directory because it is signified with a "/".
- The r indicates that the directory is readable by others.
- The w indicates that the directory is writable by others.
- The x indicates that the directory is executable by others.
The other "-"'s(dashes) indicate the same functions as previously mentioned: read/write/executable. However, they apply to different levels of users. For a more in-depth analysis of Unix commands, refer to the man pages.
Just for fun, try typing ls -a. You will notice that there may be a lot more files in your directory than you originally thought. You might see something similar to: .profile. The . indicates that the file is "hidden". So if you w ere to do just a plain ls from the Unix prompt, you would not be able to see the listing of the file.
Creating your own directories
So you want to create your own directories on your account so that you can organize your files in a more efficient and organized manner? Well, the process is quite simple. Simply type: mkdir directory_name. For example, if you want to create a directory called "Projects", type: mkdir Projects. If you were to type in the ls command, you would now see that a new directory named "Projects" has been created. You can directories to suite your needs by following the above procedure.
Navigating your directories
It is great that you now have created directories in your home directory. But what good are they if you can't navigate amongst them? By navigating, we are referring to the ability of going into the directories at will to see what contents they hold. This is where the cd (change directory) command comes into play. Assuming that you are in your home directory: student:/home/login_id$ type: cd Projects. You will now notice that your Unix prompt has changed to student:/home/login_id/Projects$. Now you could type ls to see the contents of that directory.
To return back to your home directory, you have one of two choices: either type: cd .. or type: cd and press return. The first example will take you back one level, in this case back to student:/home/login_id$, if you were to type: cd.. again, it would take you down one more level, to student:/home$. The second example will return you to your home directory no matter how deeply nested you are in directories (this is always good to know when you are first learning how to navigate through your account).
Copying/moving files to your newly created directory
Let us assume that you have the following files (duedates.doc, phil371.mid, and engl255.doc) in your home directory: student:/home/login_id$. "duedates.doc" contains all the due dates for your courses. You definitely don't want to lose this, so you decide to put a copy in the newly created "Projects" directory that you created in 2. above. To do this, simply type: cp filename destination. So in our case, we would type: cp duedates.doc Projects. Now there is a copy of the "due dates.doc" in your Projects directory. Use the ls command to verify this (HINT - type: ls Projects).
Now let us assume that you wanted to move the file phil371.mid to the Projects directory. This will physically move the file from your home directory to the "Projects" directory (only one instance of the copy will be available; and it will now be in the "Projects" directory). To do this, we type: mv filename destination. In our case, we would type: mv phil371.mid Projects. To verify the results, type ls to get the contents of your home directory and then type ls Projects to see whether or not the file has actually been moved to the "Projects" directory.
An important thing to remember: If you typed in "projects" instead of "Projects", a file called "projects" would have been created in your home directory.
Removing/deleting files
After a period of time, you may come to realize that you may no longer require a particular file. So in such an instance, you decide that you want to delete it (permenantly) from your directory. To do this, you would type: rm filename. To remove the file phil371.mid you would first have to change your directory to reflect where the "deletable" file is kept. So type: cd Projects. Your Unix prompt should now read: student:/home/login_id/Projects$. You can do an ls to verify that the file you want to delete is in fact in this directory. Now to delete the file, you type: rm phil371.mid. You will be prompted to confirm the deletion. If you want to delete the file press "y". If you decided that you don't want to delete the file press "n". Be careful with this command, once you have deleted a file, it is difficult, if not impossible to retrieve.
Removing/deleting a directory
You may find that once you have completed a course a directory that you created for it, is no longer required. In this case you would want to remove the directory from your home directory. However, keep in mind that in order to remove a directory, it has to be empty and you can't be in the directory that you are trying to delete. For example, if you were trying to delete "Projects", your Unix prompt could not be in the directory: student:/home/login_id/Projects$. In our particular case, we have just deleted the phil371.mid file, but there is still the duedates.doc file in the Projects directory. Follow the steps above and delete the "duedates.doc" file before continuing. Once the directory is empty, you can verify this by typing: ls, you can remove/delete the directory. Simply type: rmdir directoryname. We would type: rm Projects. The directory has now been deleted.
For a more detailed explanation of Unix commands visit On-Line Linux Man Pages.
At your Unix prompt, type: who to get a current list of users on the system.
To find out what each user is doing, type: w. This is how profs find out if you are working or not :)
To get detailed information about last login date of user, and the last time they read their mail, type: finger userid. For example, finger kstauff.
MySQL
Due to connection issues, we no longer recommend using a graphical client to connect to your database, such as MySQL CC, via SSH tunneling.
- A database has been created, which has the same name as your login and home directory. Type
mysql -p databasename
to use the mysql command line monitor (where databasename is your database (login) name). You will be prompted for your password. - Once you are in your MySQL database, type
\h
(for HELP) to get the basic command list.\q
is the command to quit. The other commands can be found in the MySQL Reference Manual below. - MySQL Reference Manual
- To create tables and table entries, follow the instructions given in your course materials and in the reference materials above.
- You are the only one who can read or write to your database from the command line.
Do not attempt to change either your MySQL password or your user configuration in the mysql database. These have been set to enable access from both the Web and the command line and changes made can result in loss of that access. If you feel that permissions need to be changed, please contact the SCIS technical team.
PHP basics
- You will place any PHP files in the 'public_html' subdirectory of your home directory (
/home/login/public_html
). To access these from the Web, the URL will behttp://student.athabascau.ca/~login/filename.php
. Substitute your login name and the filename you wish to access. - PHP Tutorial
The code below is to help you get started. Copy it into a file named 'hello.php' in the public_html subdirectory of your home directory. The URL to this will be http://student.athabascau.ca/~login/hello.php (replace login with your server login name.)
<?php
Print "Hello, World!";
?>
You will first need to contact the SCIS technical team to request to have a MySQL database created for you.
Once you have the database login information, copy the code below into a file named 'mysql.php' in your public_html directory. Replace the following with the username, password, and database name you were supplied with for the MySQL database. (This is not the same as your server login information.):
$username = "dblogin";
$password = "xxxxx";
$database = "dbname";
The URL to this will be http://student.athabascau.ca/~login/mysql.php (replace login with your server login name.)
<?php
$username = "dblogin";
$password = "xxxxx";
$database = "dbname";
$hostname = "localhost";
$dbh = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
$selected = mysql_select_db($database,$dbh)
or die("Could not select database $database");
print "Connected to MySQL database $database";
mysql_close($dbh);
?>
Connecting
SSH is a secure protocol for connecting and is now the recommended method for connecting to student.athabascau.ca. Telnet is no longer allowed due to its insecure protocol.
PuTTY
PuTTY is a free SSH client for Windows operating systems. It can be downloaded by following the link below: PuTTY Download. Although several programs are available for download from the URL above this set of instructions refer only to the PuTTY program (putty.exe) since it is the SSH client that is required to connect with AU's servers in addition to the Talker. Download the executable file by clicking on the putty.exe file and choose a directory to which you would like to store it. i.e., C:\Program Files\Putty\
. You may want to create a shortcut to putty.exe on your desktop for easy access in the future. Alternatively, you can also place an icon on your taskbar if you wish. The remaining instructions in this section will aid you on setting up and running PuTTY in order to work on the student.athabascau.ca server.
- You must use scp for transferring files to the student.athabascau.ca because it is a secure encrypted method. FTP no longer works on this server.
- The scp application that is recommended is the freeware WinSCP. You can download this from the WinSCP site.
- WinSCP FAQs
Updated February 08, 2024 by Digital & Web Operations (web_services@athabascau.ca)