Knowledgebase Home | Glossary | Favorites Knowledgebase Home | Glossary | Favorites
SSH Container Navigation
Article Details

Last Updated
24th of August, 2010

User Opinions (1 vote)
100% thumbs up 0% thumbs down

How would you rate this answer?
Helpful
Not helpful
Stackable containers all have a similar directory structure (e.g., see Container File Paths). This article will show how you can navigate that structure.

Table of Contents


Listing Files and Directories

When using SSH to access a container a user will be placed into their home directory. By default, a sites/ directory, which all sites live under, will be in the home directory. To verify this use the ls command while in a home directory:
[demo@c-web1 ~]$ ls
sites
To get a more detailed list use the ls -la command:
[demo@c-web1 ~]$ ls -la
total 24
drwxr-x--x 3 demo admin  4096 Feb 22 22:30 .
drwxr-xr-x 3 root root   4096 Feb 17 17:45 ..
-rw------- 1 demo admin  1816 Apr 12 21:05 .bash_history
-rw-r--r-- 1 demo admin    24 Feb 17 17:45 .bash_logout
-rw-r--r-- 1 demo admin   176 Feb 17 17:45 .bash_profile
-rw-r--r-- 1 demo admin   124 Feb 17 17:45 .bashrc
drwxr-x--x 3 demo apache 4096 Mar 25 19:25 sites
This command shows all of the hidden folders and files as well as the ownership and permission of all folders and files.

Changing Directories

To change directories use the cd command. This can be done in relationship to the current directory:
[demo@c-web1 ~]$ cd sites/
or with full paths:
[demo@c-web1 sites]$ cd /home/demo/sites/

Showing Current Directory

It can often be helpful to know which directory you are currently in. To do this use the pwd command:
[demo@c-web1 sites]$ pwd
/home/demo/sites

Navigating Sites and Environments

On a container each site environment gets its own document root. To get there, first change to the sites/ folder:
[demo@c-web1 sites]$ cd /home/demo/sites/
Now list the directories in that folder:
[demo@c-web1 sites]$ ls
mystackable.com_env1       yourstackable.com_Version_1
mystackable.com_Version_2  yourstackable.com_Version_2
Each folder represents a site environment. For example, if we want to change the files in mystackable.com_evn1 we will need to change to that directory:
[demo@c-web1 sites]$ cd mystackable.com_env1/
[demo@c-web1 mystackable.com_env1]$ ls
doc_root
We can see that there is a doc_root/ folder there. This is where the site files for that environment will live:
[demo@c-web1 mystackable.com_env1]$ cd doc_root/
We are now in the root for the environment. All of the files in this folder will be accessible by the environment.
Visitor Comments
  1. Comment #1 (Posted by Medford)
    I love reading these articles because they're short but inrfomtiave.
  2. Comment #2 (Posted by Butch)
    It's spokoy how clever some ppl are. Thanks!
  3. Comment #3 (Posted by Teyah)
    Ah, i see. Well that's not too trckiy at all!"
Post Comment for "SSH Container Navigation"
To post a comment for this article, simply complete the form below. Fields marked with an asterisk are required.
   Your Name:
* Your Comment:
* Enter the code below:
 
Related Articles
No related articles were found.
Attachments
No attachments were found.

Continue