Technical Questions (UNIX)
UNIX Web hosting technical issue and how-to
 
 How do I logon to UNIX shell?
 How do I get online help for an UNIX command?
 How do I list my files and directories?
 How do I change directories?
 How do I make directories?
 How do I remove files?
 How do I remove directories?
 How do I copy files and directories?
 How do I move or rename files and directories?
 How do I search within files?
 How do I change file and directory permissions?
 How do I backup and restore files and directores?
 How do I compress and decompress files and directories?
 How do I change my Password?
 What is Telnet?
 How do I password protect part of my web site?
 Can I recover files or directories that are accidentally deleted?
 What is WebShell?
 How do I custom error pages?
 How do I access my web site statistics?
 Do you have a list of commonly used UNIX commands?
 

 How do I logon to UNIX shell?
You can use Telnet program to logon to UNIX shell. Microsoft Windows 95/98/ME/2000 has a built-in Telnet program, simply click on [Start] --> [Run] and type "telnet www.your-domain.com" in the field, click on [OK] and Telnet will initiate connection to your web site. Your will then be prompted for your User ID and Password. To terminate your current Telnet session, simply type exit to logout the shell.

Although Windows' built-in Telnet program can connect to your web site right off the shelf, it only supports very few terminal emulations. This sometimes creates problem when you use UNIX utilities such as 'pico' or 'vi' editors, the cursor keys may return characters instead of moving. We recommend the following shell access programs for Windows:

Download SecureCRT
Download PuTTY

Both programs also support SSH, the "secure" version of shell access. For more information about SSH, please visit Secure Login and Data Encryption page.

 How do I get online help for an UNIX command?
In the UNIX shell, you can access online help for a particular UNIX command by typing man, short for 'manual'. For example, to find help on cd, short for 'change directory', you'd type:

man cd

 How do I list my files and directories?
The ls command lists the files and subdirectories of the current directory. This is equivalent to the dir command in DOS. Here are some commonly used ls options:

  • ls -a will list hidden files such as .htaccess
  • ls -l will list detailed information such as permissions, ownership, file size and modification date
  • ls -al will list both hidden files and detailed information

  How do I change directories?
The cd command will change to another directory. This is equivalent to the cd and chdir commands in DOS.

  • Once you logon to your account with Telnet, type cd public_html to change to your public_html directory
  • Type cd to return to your home directory from any current directory (back to /vws/your_User_ID)
  • Type cd .. to move up one directory

 How do I make directories?
The mkdir command makes a new directory. This is equivalent to the md and mkdir commands in DOS.

  • Type mkdir demo to create a new directory called demo

 How do I remove files?
The rm command removes a file. This is equivalent to the del command in DOS.

  • Type rm demo.txt to remove a file called demo.txt

 How do I remove directories?
The rmdir command will remove an empty directory. This is equivalent to the rd command in DOS.

  • Type rmdir demo to remove an empty directory called demo

To remove a directory containing sub-directories and/or files, use rmdir -R. This is equivalent to the deltree command in DOS.

  • Type rmdir -R demo to remove a directory called demo and all of its contents

 How do I copy files and directories ?
The cp command copies a file to a new directory or filename. This is equivalent to the copy command in DOS.

  • Type cp welcome.htm index.html will copy the welcome.htm file to the index.html file
  • Type cp welcome.html public_html/index.html will copy the welcome.htm file to the index.html file located in the public_html directory
  • Type cp * /vws/your_User_ID/public_html will copy all the files in the current directory to your public_html directory. Note that when you specify a directory with a leading "/", it means the full path of the destinated directory with respect to the root filesystem
  • Type cp -R temp public_html will copy the temp directory to the public_html directory 

 How do I move or rename files and directories?
The mv command moves a file or directory to a new location or renames it. This is equivalent to the move, ren and rename commands in DOS.

  • Type mv welcome.htm index.html will rename the welcome.htm file to the index.html file
  • Type mv welcome public_html/index.html will move the welcome.htm file to the public_html directory and rename it to index.html file
  • Type mv * /vws/your_User_ID/public_html will move everything in the current directory to the public_html directory
  • Type mv temp public_html will move the temp directory to the public_html directory 

 How do I search within files?
The grep command finds lines in files that match specified text patterns. The syntax is as follows grep text filename:

  • Type grep welcome index.html will find any lines in the index.html file containing the text welcome in them
  • Type grep hello * will find any files in the current directory that contain the text hello in them

 How do I change file and directory permissions?
The chmod command sets the permissions of a file or directory. There are 3 sets of permissions for files and directories: owner, group and other which are controlled by read, write and execute permissions. This is equivalent to the attrib command in DOS.

To demonstrate how the file and directory permission work, here is an sample output of the demo's user account using ls -l command:

drwxr-xr-x  3 demo  demogroup  4096 Nov 26 17:36 public_html
||_||_||_|
d u  g  o <-- 'd' = "d" indicates this is a directory
              'u' = user "demo" has read, write and execute permissions
              'g' = group "demogroup" has read and execute permissions
              'o' = other has read and execute permissions

-rw-r--r--  1 demo  demogroup  2755 Oct 23 23:39 readme.txt
||_||_||_|
d u  g  o <-- 'd' = "-" indicates this is a file
              'u' = user "demo" has read and write permissions
              'g' = group "demogroup" has read permission
              'o' = other has read permission
              

There are two ways to use chmod command.

The "letter" scheme approach:

  • To give "demogroup" group write permisson to the readme.txt file:
    chmod g+w readme.txt
  • To remove "other" read permisson to the readme.txt file:
    chmod o-r readme.txt
  • To remove "demo" user read permission to the readme.txt file:
    chmod u-r readme.txt
  • To give "demogroup" group write permission to the public_html directory:
    chmod g+w public_html
  • To remove "demogroup" group write permission to the public_html and all of its files and sub-directories:
    chmod -R g-w public_html

The "number" scheme approach:

0 = no permission given
1 = execute only
2 = write only
3 = write and execute
4 = read only
5 = read and execute
6 = read and write
7 = read, write and execute

  • To give "demo" user read/write, "demogroup" group read/write, and "other" read only permissions to the readme.txt file:
    chmod 664 readme.txt
  • To give "demo" user read/write/execute, "demogroup" group read/execute, and "other" read/execute permissions to the public_html directory:
    chmod 755 public_html
  • To give "demo" user read/write/execute, "demogroup" group read/write/execute, and "other" read/execute permission to the public_html/cgi-bin directory and all of its files and sub-directories:
    chmod -R 775 public_html/cgi-bin

In general, CGI scripts and their directories usually have u+rwx, g+rx and o+rx permissions. HTML files usually have u+rw, g+r and o+r permissions. Directories usually have u+rwx, g+rx and o+rx permissions (when you make a new directory, these permissions are the default setting).

 How do I backup and restore files and directories?
The tar command is an archiving utility for packing many files into a single archive file while retaining file permissions and ownership.

  • Type tar cvfp backup1.tar public_html in your home directory to archive the contents of your public_html directory into backup1.tar
  • Type tar xvpf baackup1.tar in your home directory to restore (replace) the contents of your public_html directory from backup1.tar

 How do I compress and decompress files and directories?
The tar command can be used with gzip to compress many files into a single archive while retaining file permissions and ownership. Please note that these files can be decompressed with WinZip.

  • Type tar cvzfp backup2.tgz public_html in your home directory to compress the contents of your public_html directory into backup2.tgz
  • Type tar xvzfp backup2.tgz in your home directory to restore (replace) the contents of your public_html directory from backup2.tgz

 How do I change my Password?
Please note that your Password is case sensitive, check to make sure your Caps Lock key is not set!

To change your FrontPage password:

  • Open FrontPage
  • Open your FrontPage Web
  • Select "Change Password..." from the [Tools] pull-down menu

To change your UNIX password:

  • Telnet to your account
  • Type passwd
    You will then be prompted for your old password, new password and confirm your new password

You can also change your UNIX password using the Web Control Panel.

Please note that password change applies to your FTP, Telnet and SSH access.

 What is Telnet?
Telnet is a tool that lets you log in to other computers over the Internet. Telnet is text-based; there's no pointing or clicking. All your navigation is done via the keyboard.

When you Telnet into your Virtual Web Server, you will be connected remotely to the UNIX operating system. Thus, you can type in UNIX commands and manipulate your web site. 

 
 How do I password protect part of my web site?
You can password protect directories and files in your public_html directory with the WebShell software. In the bottom right hand corner of WebShell, change the mode to "Protect" and then click on the directory or file you want to protect. A new screen will appear allowing you to edit your .htaccess file.
 
 
 Can I recover files or directories that are accidentally deleted?
Unfortunately no. UNIX does not have the Recycled Bin feature like Microsoft Windows.
 
 
 What is WebShell?
WebShell is a combination of CGI Script, HTML and JavaScripts that performs most of the file operations required for website account maintenance from your favorite web browser. Version 2.0 Features:
  • Remote Account Administration
  • Intuitive, easy to use interface
  • Files/Directories copy, move, delete, rename, info
  • Files upload & download
  • Files preview (supports most of the formats understandable by web browser)
  • Multiple files/directories selection and manipulations
  • Files Editing & Source Viewing
  • Superior two panels view for ease of file manipulations
  • Based on UNIX security mechanism for maximum security & flexibility
  • Easily configurable interface
  • Set access permissions on files and directories
  • Full UNIX type accounts support
  • File Filtering
  • Online user help
  • Select multiple files using mask or by mouse click
  • Simple 2-step installation
  • Supports Netscape 3.x, 4.x and Internet Explorer 4.x (any platform)
  • Written in C++ for optimum performance
 
 How do I custom error pages?

In your public_html directory, there is a file called "error404.html". You can edit the error404.html file to design your own custom error messages. you can test the 404 Error Message by going to an invalid URL in your web site. For example, http://www.my-domain.com/nonexist.html
 

 
 How do I access my web site statistics?
Point your web browser to http://www.my-domain.com/stats/ (note the trailing "/") or use Web Control Panel.
 
 
 Do you have a list of commonly used UNIX commands?

WebMonkey has excellent resources and guides for UNIX users. Check out their WebMonkey | Reference: UNIX Guide.
 

 

[ Home | Portfolio | Online Order | Infrastructure | Careers ]
[ About Tritech | Site Search | SiteMap | Contact Tritech ]

All fees are in Canadian dollars and are subject to change without notice.
Copyright 1997-2000, Tritech Automation Corporation. All rights reserved.

Tritech Home Products and Services Technical Support Order FreeBSD and Linux Internet Servers Order Virtual Web Hosting Service Order e-Commerce Solutions Order Dedicated Servers Order Application Services Order Domain Name Services Order Virtual e-Mail Service