• Portal Home
  • Knowledgebase
  • Web Programming
  • Linux and SSH
  • What is the absolute path of my hosting account?

What is the absolute path of my hosting account?

The "path" of a file is the route used to access this file, or to go from one place to another in the file system. In Windows, an example path is:

C:\path\to\file.txt

When you connect to the hosting server, by using the SSH protocol for instance, you will notice that the path syntax is not the same. Instead, it looks like:

/path/to/file.txt

This difference is due to the fact that you are on a Linux server that uses a different file system than Windows.

When you use a script, you might be asked to provide its path. The absolute path is the path starting at the highest folder in the filesystem hierarchy (also called "root folder" in Linux), and going through all the subfolders required to reach the target file. It is of the form:

/subfolder1/subfolder2/file.txt

When you are prompted for an absolute path, it refers to the path starting at the root folder and ending in the folder containing your script. For an application installed in the main folder of your website, the absolute path is written as follows and applies to all users:

/home/[user]/public_html

where [user] is your cPanel user name. This path is also displayed in your cPanel, in the left menu under General server information.

As an example, suppose you own the sample-domain.com with cPanel user name domain1, and that you installed the Joomla application so that it appears at http://sample-domain.com/joomla. The absolute path of your Joomla installation will then be: home/domain1/public_html/joomla.

 

Article ID: #HC5071

Was this answer helpful?