Loading...

Knowledge Base
Categories:

Skeleton Directory

Share

Skeleton directories are remarkably useful to set configurations on new cPanel accounts. This page tells you the location of the folder to place files for your clients via WHM. Any files in the skeleton directory will automatically be uploaded to each new cPanel you create. The files will not appear in cPanel's which were already created.

In this article, we will address the following: 


What are skeleton directories?

cPanel skeleton directories allow resellers the ability to create a base setup for new accounts which they add through their WHM interface. For example, if a reseller wanted each new account to have an index.html file that served as an 'Under Construction' notice to visitors to that site until their customer was able to migrate their content or build their site, the reseller would be able to put the base files for this notice in their skeleton directory.

Where are they located?

The skeleton directory is located in the reseller user's home directory. It is named 'cpanel3-skel'. 

Why would a reseller use a skeleton directory?

Restricting access to a site for only certain IP addresses:

If a reseller wants to ensure that new accounts are only accessible from their IP addresses when the new account is created, they can create a default .htaccess file and put it in the cPanel skeleton directory. 

root@test [/home/resellertest/cpanel3-skel]# ls
./  ../  etc/  public_ftp/  public_html/

For our example, we are using a server with Apache 2.4, so we would add the following to our .htaccess file at /home/$reselleruser/cpanel3-skel/ :

'require ip $ip.add.re.ss'

Then when a new account is created, that .htaccess file will be put at /home/$newuser/.

Adding a default index.html file:

If a reseller wants to put up a default site for new accounts, they can do so by putting the site file(s) in the /home/$eselleruser/cpanel3-skel/public_html directory. If the public_html directory does not exist in the /home/$reselleruser/cpanel3-skel/ directory, then it will need to be created.

root@test [/home/resellertest/cpanel3-skel/public_html]#ls
./  ../  index.html

Once a new account is created, the site files will be added to the account. Then when visitors view the site, the default coming soon page or temporary site files will be displayed.

Notes

  • Any files/directories that are put in a reseller user's cpanel3-skel directory will be put in all new accounts that are created by the reseller user. The changes will not be retroactively applied to accounts that have already been created.  
  • The structure of the skeleton directory is such that /home/$reselleruser/cpanel3-skel/ is equivalent to /home/$newuser/. This means that if we make a file named some_file.txt at /home/$reselleruser/, then that file with all of its contents will be made at /home/$newuser/.
  • Files can be added to directories that are normally created by the cPanel account creation process by creating that directory in the /home/$reselleruser/cpanel3-skel/ directory. For example, if a customer needs a particular file created in /home/$newuser/etc/, then a directory named 'etc' would need to be created at /home/$reselleruser/cpanel3-skel/ and the file placed in that directory.
Did you find this article helpful?

 
* Your feedback is too short

Loading...