Taz

  1. About Taz
    1. Taz is a departmental computer running CentOS, a Linux-based operating system
    2. Taz is running an Apache web server
      1. Apache is the most popular web server, and it is often used on a Linux box
      2. Moving your web pages to Taz allows any web browser to view your pages
      3. Taz's home page: http://taz.harding.edu/
    3. Taz's web server is only accessible inside Harding's firewall
      1. Keeping Taz inaccessible from the outside world reduces Harding's liability if you were to create web pages with copyrighted material or with information that led to someone getting hurt
      2. When logged into the Harding domain, you are inside the firewall
      3. When connected to Harding's secure wifi, you are inside the firewall (How to connect to Harding's secured network)
      4. Harding's Guest network is outside the firewall
      5. You can access Taz's web server from outside the firewall by creating an ssh tunnel
    4. Everyone in this class has a Taz account
      1. Your username is the same as your Harding username
      2. Your initial password is your H number (including the H) but I recommend you change it
  2. Two ways to interact with Taz
    1. Using the command-line interface (SSH with Putty)
      1. Gives you the most power and flexibility but requires you to memorize and type commands
      2. Windows users:
        1. Use the free Putty SSH client to securely login to your account from Windows
        2. After running Putty, enter taz.harding.edu in the Host Name field and click Open
        3. A console window appears where you enter your Taz username and password
      3. Mac users can use the ssh command at the command line:
        $ ssh username@taz.harding.edu
        
      4. When you first login, you will be sitting in your home directory: /home/username
      5. Use the cd command to move to your public_html directory
        $ cd public_html
        
      6. List your files using the ls command
        $ ls -l
        
      7. Use Nano to edit your index.html file
        $ nano index.html
        
        1. Ctrl-O saves your file
        2. Ctrl-X exits
        3. Use your mouse to highlight text you want to copy, and right-click to paste. Otherwise your mouse doesn't do anything
      8. Your index.html web page is available at this URL: http://taz.harding.edu/~username/ where "username" is your username. My web page is at http://taz.harding.edu/~fmccown/
      9. Recommended to change your password using passwd command
        $ passwd
        
      10. Summary of useful commands:
        cd dirname Change to a different directory
        cd .. Go back one directory level
        ls -l Long listing of current directory
        rm filename Delete a file
        cp filename newfilename Copy a file to a new file
        cd dirname Change to a different directory
        mv oldfilename newfilename Rename a file
        mkdir dirname Create a new directory
        nano filename Edit a file
        pwd Show the name of the current directory
    2. Using an SCP or SFTP client (WinSCP)
      1. Use the free WinSCP client to manipulate your files using a GUI
      2. Run WinSCP, click New, enter taz.harding.edu in the Host name field, enter your Taz username and password in the appropriate fields, and press Login

        WinSCP login screenshot
      3. The first time you login to Taz, you will see a warning about the server's host key not being found. Press Yes to continue
      4. You will now see your computer's files on the left side of the window and the file system on Taz on the right

        WinSCP screenshot
      5. To edit an existing file, right-click on the file and select Edit. Any changes you make will be saved back onto Taz
      6. To create a new file or directory, select from the menu Files → New → File... or Directory...
      7. Drag-and-drop files between sides to copy files back and forth from your computer to Taz
    3. WinSCP: Make Notepad++ your default text editor
      1. Menu: Options → Preferences...
      2. Click Editors on left side
      3. Click Add... button on right side
      4. Click External editor radio button, then Browse button
      5. Navigate to C:\Program Files\Notepad++
      6. Double-click notepad++.exe
      7. Click OK
      8. Select Notepad++ from editor list, and press Up button multiple times until Notepad++ is at the top
      9. Click OK
  3. Case sensitivity
    1. Linux is case-sensitive, so the files Apple.html and apple.html are distinctly different
    2. Windows is case-insensitive, so you may not have two different files in the same directory named Apple.html and apple.html
    3. When transferring your files to Taz from your Windows computer, it's not unusual for images or style sheets to suddenly "break"
      1. This happens many times because the HTML is using a lowercase version of the filename (e.g., happy.png) but the file is actually stored with some uppercase letters (e.g., happy.PNG)
      2. It's best to always use lowercase letters in your filenames to prevent this from happening
      3. If you notice that an image that was visible on your computer is not visible when transfering your files to Taz, first make sure the file is actually on Taz, then check to see if your HTML and the filename are exactly the same and fix accordingly
  4. File permissions
    1. Each file in Linux has three types of access:
      1. read
      2. write
      3. execute
    2. Every file belongs to a specific user and group
      1. All students are in the student group
      2. All faculty are in the faculty group
      3. Any type of group could be created by the sysadmin
    3. When you view a long listing at the command-line or look at the Right column in WinSCP, you see each file's permissions as a string of 10 characters:
      1. Example: -rw-r--r--
      2. Character 1 is the type of file: - is regular, d is directory, l is link
      3. Chars 2-4 are the owner's permissions (read, write, execute)
      4. Chars 5-7 are the group's permissions (read, write, execute)
      5. Chars 8-10 are other's permissions (read, write, execute)
    4. For security purposes, it's best to use the minimum level of permissions to get the job the done
      1. Usually only user needs write permissions to files and directories
      2. To make a file accessible to Apache, the file needs the "other" permissions set to read; directories need execute for others
      3. If you don't want the file to be displayed on the web, just remove the read permission from others (gives 403)
    5. How to change file permissions
      1. If using Putty, use the chmod command
      2. If using WinSCP, right-click the file and choose Properties, then check whatever permissions you want the file to have