Where is the home directory? - Gregg Hosting

The affects of Web Hosts on Your Business Website

Here're ways your choice of web hosting service provider impacts the performance of your business:


check

Website loading speed

check

Uptime and availability

check

Customer support

check

Security

check

Server location

Where is the home directory?

Where is the home directory?

Overview

When reading articles about where to upload and manage your website files, the terms /home directory, user’s home directory, and website directory will appear frequently. These terms can be perplexing because they all refer to distinct parts of the server.

This article describes what these directories are and how to verify that you are managing your website in the correct location on the server.

Terminology
In this article, the following words are defined:

Term Term Explanation
User

On the server, a user/username is the name given to a domain.
The server’s /home directory
All users are listed in this directory.
User directories
In the /home directory, there are multiple user directories.
The user’s home directory
A directory for a single user. (The sign also refers to this.)
The listing of websites
Website directory under a single username
User
The username assigned to your domain name on the server is known as a website user. This is the username you’ll use to manage your website on your server using an SFTP or SSH client. A single username can be used to create many websites. More information on GreggHost users can be found in the following articles.

The process of adding a user to a service
Changing a domain’s allocated user
The /home directory on the server
The /home directory on the server is where ALL users’ files are stored. /home is how this is referred to. It would simply look like this on the server:

/home
This directory is accessible to no one at GreggHost.
This directory simply contains several username directories.
Websites can be found in these user directories.
Directories for users
Many other usernames can be found in the server’s /home directory. In the /home directory, each username has its own directory.

Servers that are shared
The usernames you’ve created, as well as any other users on the server, are stored in this /home directory if you’re on a shared web server. Consider the following scenario:

/home /youruser1 /youruser2 /youruser3 /otheruser1 /otheruser2 /otheruser3 /otheruser1 /otheruser2 /otheruser3
Dedicated Servers or Virtual Private Servers
Only your personal usernames are stored in the /home directory on a VPS or Dedicated Server. Consider the following scenario:

/home /youruser1 /youruser2 /youruser3 /youruser4 /youruser5 /youruser6 /youruser7 /youruser8
The home directory of the user
When the word “user’s home directory” is used in this knowledge base, it refers to this directory.

The symbol is frequently used to refer to this directory. Consider the following scenario:

[server]

$ cd The user’s home directory on the server is unique to that user. It’s one of several users listed in the server’s /home directory. Consider the following scenario:

/home/youruser1
This user directory is only accessible to your user. It is inaccessible to everyone else. All of your website and user configuration files are stored here.

If you’re using SSH to connect to your server, you can use the pwd command to see which directory you’re in. If you’re already in your user’s home directory, this is how it’ll look.

[server]

/home/username $ pwd
What is the purpose of this directory?
The most common uses of this directory are to maintain your user’s configuration files (such as the.bash profile) and to examine your access and error logs. You must instead navigate to your website directory if you wish to manage your website files.

In an SFTP client like Filezilla, it would look like this:

home directory of the user
In the user’s home directory, there are several default files.
These are the files that you’ll find in the user’s home directory by default.

/home/youruser1/.alias.bash profile.bashrc.cshrc /Maildir /logs /example.com/example.com/example.com/example.com/example.com/example.com/example.com/example.com/example.com/example.
The listing of websites
The actual website files are stored in the website directory. Consider the following scenario:

/home/youruser1/example.com
If you’re using SSH to connect to your server, you can use the pwd command to see which directory you’re in. If you’re already listed in your website directory, this is how it’ll look.

$ pwd /home/username/example.com [server]$ pwd /home/username/example.com
The following files will be added to the website directory of a newly formed domain:

favicon.ico
favicon.gif
quickstart.html
When the site is experiencing high traffic from users or web crawlers, favicon.ico and favicon.gif help prevent server stress from excess 404 pages. When no other valid index files are present, Quickstart.html is used as the default index page. Please see the following article for further information:

How can I use an.htaccess file to control my directory indexes?
This is how it would appear in a Filezilla-like SFTP client. You’ll see a list of all of your website’s files.

filezilla
Assigning a domain to a user
When you add hosting to a website in the panel, you’ll be given a login. The following articles show how to add a user to a domain and server in several methods.

How can I add a domain to my account?
Changing a domain’s allocated user
The process of adding a user to a service
Policy of one user per domain
A website can only be associated with one username, however a single user can be associated with several websites. This is explained in further depth in the following article.

Policy of one user per domain
Summary
You’ll either be in your user’s home directory or the website directory when you need to manage your website.

Home directory of the user
You would configure settings for the user in this directory, which would apply to all websites under it. For example, changing your PHP settings in a phprc file or editing your.bash profile.

a list of websites
This is the location where you would change the files for a specific website.