Q: How do I upload a file and link to it on the Department Website?
  1. Select the text you want to link to the file.
  2. Click on the link button 
  3. Click on 'Browse Server'
  4. At the top where is says 'Upload a new file in this folder' click on 'Browse'
  5. Choose the file you want to upload
  6. The file will appear in the window, click on it
  7. click Select.

After you save your changes by clicking on 'Update' you should be able to test that the link works to the file.

Q: How do I update my profile on the Department Personnel web page?

The Department's personnel web directory is located under PEOPLE here:

People Directory

If you don't see your entry, you must log in to add your profile the first time using your StatNet username and password.

Q: How do I create a folder on the server, to upload files to?
  1. Click on the link button:

  2. Click on Browse Server:

  3. Navigate to where you want the folder, and click on Create New Folder:

Q: How do I create my personal webpage ?

In this tutorial, you will learn some basics of HypterText Makeup Language (HTML). After this tutorial you will know

  1. What is HTML?
  2. How to post web pages on the Internet?
  3. What editor is needed to edit a web file?
  4. How to scan classnotes into computer as pdf files?
  5. How to convert file formats?

  1. What is HTML?

    W3School Online Web Tutorials

    back to top

  2. How to post web pages on the Internet?

    To post web pages, you need to put all web files into a "public_html"  and set permission correctly.
    First, you need to email IT help to create "data" folder for you if you don't have one yet.  The new location is
    ie/ /usr/local/data/john.foo
    After you have your "data" folder, ssh to our Unix server and start setting it up.
    ie. ssh john.foo [at] stat.ubc.ca
    $ mkdir /usr/local/data/john.foo/public_html
    $ ln -s /usr/local/data/john.foo/public_html   ~/john.foo/public_html
    Folder permission is 711 or 755 (less secure)
    $ chmod 711 /usr/local/data/john.foo/public_html
    $ chmod 711 ~/john.foo
    Notes: To find out where your home directory is type: 'pwd' 

    In the " public_html" folder, a file called "index.html". This file is the main web page.
    Set permission to File is 644
    $ cd /usr/local/data/john.foo/public_html
    $ vim index.html
    $ chmod 644 index.html

    Your Website is

    Note: You can also have a webpage on unixlab,our Undergradute server. Can be useful, for keeping online material for the course you're TAing. For example, web files for user stat200 will be in /home/www/stat200/public_html

    and it can be accessed from the web as http://unixlab.stat.ubc.ca/~stat200

    back to top
  3. What editor is needed to edit a web file?

    On our Unix systems, Vim and Emacs.  Opensource package such as Seamonkey or commercial products
    such as Adobe Dreamweaver and Microsoft Expression are very good.

    back to top

  4. How to scan classnotes into computer as pdf files?

    We can use Adobe Acrobat to scan classnotes. The computer we used is in the mailroom. The procedures are follows:

    1. Double click the use for PDF scanning icon on the desktop of Windows 2000.
    2. Select File from the menu bar of Adobe Acrobat
    3. Select submenu Import, then sub-submenu scan.
    4. Put the first page into the scanner. The page should face down and be put in the right-upper corner of the scanner.
    5. Click the Scan button on the dialog window of Adobe Acrobat.
    6. From the dialog window, set the value of Image type as black & white photo, the value of Destination as screen/web and the value of Resolution as 96
    7. Select area you want to scan into computer by pressing left-button of mouse while dragging the mouse.
    8. Click Scan button.
    9. After finishing scanning the first page, Adobe Acrobat will ask if you want to scan next page or not. If you want, just click nextbutton. Otherwise, click Done button.
    10. After you scan all pages of your classnotes, select menu File and submenu Save. The default file format is pdf.

    Once you get the pdf file, you can upload to the course website. The procedure is

    1. Double click the SSH secure FTP icon on the desktop.
    2. Click the Quick Connect button.
    3. Log into the course website, stat404 say.
    4. Double click the public_html directory.
    5. From the menu bar select Operation menu and upload submenu.
    6. From the pop-up dialog window select the pdf file you just scan in and click Upload button.
    7. Select Window menu and New Terminal submenu. A terminal will pop-up.
    8. Go to public_html directory and change permission of all files by the command: chmod 644 *

    back to top

  5. How to convert file formats in Unix and Linux?

    To convert latex file to html files, use the command:

    latex2html abc.tex

    To convert dvi file "abc.dvi" to ps file "abc.ps", use the command:

    dvips -o abc.ps abc.dvi

    To convert ps file "abc.ps" to pdf file "abc.pdf", use the command:

    ps2pdf13 abc.ps

    To directly convert latex file to pdf format, please refer to Dr. Harry Joe's tips page.

    back to top

Q: Departmental Disclaimer and Personal Web Page policy
Q: How to automatically post a bunch of photos in your webpage?

You can use the scripts makethumbs.sh and rotate.sh provided by http://www.molenda.com/makethumbs/. The basic procedure is given below.


Download makethumbs.sh and rotate.sh to a directory, ~/mytools say, from http://www.molenda.com/makethumbs/.


Change the modes of the files makethumbs.sh and rotate.sh by typing command:

chmod +x ~/mytools/*.sh


Create a directory, ~/myphoto say. And copy all your jpg files in this directory. This directory only contains the photos you want to post.


Run the following command in the directory ~/myphoto:



Make a hyperlink to ~/myphoto/index.html.

That's simple!


  • If you want to change the title of the photo webpage, captions and descriptions of the photos, you can modify the file ~/myphoto/description.txt and re-type the command ~/mytools/makethumbs.sh.
  • If you want to rotate some photos, use the script rotate.sh. For example, the command cp photo1.jpg photo1.jpg.bak cp photo2.jpg photo2.jpg.bak ~/mytools/rotate.sh r photo1 photo2 ~/mytools/makethumbs.sh will rotate photo1.jpg and photo2.jpg anti-clockwise 90 degree. Since rotate.sh may modify the original file, it's better to make a backup for the file you want to rotate. You can type rotate.sh --help to obtain the usage of the script rotate.sh. The following is the copy of the usage information: bash-2.04$ ./rotate.sh --help Usage: rotate.sh [-p|-o] <-r|-l> file1.jpg file2.jpg file3.jpg ... -p | --preserve Do not touch original image, even if we can do so safely. -r | --rotate-right Rotate images to the right (90 deg clockwise) -l | --rotate-left Rotate images to the left (90 deg counter clockwise) rotate.sh tries to rotate images losslessly if possible. Lossless rotation is possible on this system, so it is the default. You can override this behavior with -o (overwrite) or with -p (preserve) Filenames can be any unique part of the filename. e.g. if DSCN0532.jpg exists, 'rotate.sh r 32' will rotate it 90 degrees clockwise. You can find the latest version of this program at http://www.molenda.com/ This is version v1.22 of rotate.sh.
  • Each time you make some changes (e.g. adding new photos, modifying the descriptions, or rotating photos), you have to re-run the command ~/mytools/makethumbs.sh.
Q: How to create a password-protected website?

Use "be.stat.ubc.ca"
$ssh  username@stat.ubc.ca

Here are the simplified instructions on how to make a password protected web folder for our site:

1) Create the private web folder in your web directory. This is the directory for which you want to curtail access to.

$mkdir -p  /nfs/fil-data/username/public_html/private
$mkdir -p  /nfs/fil-data/username/keys

2) Within this private web directory, create a file called


which contains the following text:

AuthType Basic
AuthName "Title of your protected folder"
AuthUserFile /nfs/fil-data/username/keys/.htpasswd
Require valid-user
ErrorDocument 403 https://www.stat.ubc.ca/~username/private/
Notes: www.ugrad.stat.ubc.ca 
DONOT use "SSLRequireSSL" and "ErrorDocument 403 https://www.ugrad.stat.ubc.ca/~myusername/private/"
3) To create a password file with an initial user and password, use this command:
	$/usr/local/bin/htpasswd -c /nfs/fil-data/username/keys/.htpasswd user1
	... enter password for users1

To add additional users, run this command:

$/usr/local/bin/htpasswd /nfs/fil-data/username/keys/.htpasswd user2
	... enter password for users2
Note: There is no "-c" for creating second users

To delete users
$/usr/local/bin/htpasswd  -D /nfs/fil-data/username/keys/.htpasswd users

4) Make sure your files and directories have the correct permissions:

	$chmod 0711 /nfs/fil-data/username/public_html/private
	$chmod 0644 /nfs/fil-data/username/public_html/private/.htaccess
	$chmod 0711 /nfs/fil-data/username/keys
	$chmod 0644 /nfs/fil-data/username/keys/.htpasswd


Test the setup by using a browser and going to your private web folder:


It is important to note that this will offer some protection of your web files against unauthorized access via a web browser, but it does not protect you from StatNet users reading your files since they can go directly to your web directory via regular filesystem commands like 'cd' and 'less' and access your files.

In this case, you ought to encrypt your files (for example, by using the zip utility to created an encrypted zip archive). This is for for highly confidential information that need to be desseminated.

Q: Help with PHP and XML?Help with PHP and XML?
Q: Is it possible to complete the statistics major in two more years if I plan to take Math/Stat 302 in term 1 of year 3?

Yes, if you have credit for Math 200 and Math 221 (or their equivalents), and can fit in the Science breadth requirements and the thematic concentation requirements.
For example, take STAT/MATH 302, Stat 300, Stat 344 in term 1 of year 3; STAT 305, Stat 306 in term 2 of year 3. Then you have the prerequisites for Stat 400 level courses.

Q: CPSC 100 and 210 may be difficult to register into. When should CPSC 110 and CPSC 210 (or Math 210) be taken?

Take them as soon as possible but not necessarily by the end of year 2 if there are registration issues.
Credit for CPSC 110 and one of CPSC 210 or Math 210 is required for promotion to year 4.