Using Skeleton Directories in cPanel

5/5 - (3 votes)

The skeleton (aka “skel”) directory is one of the frequently ignored features on Linux servers, especially for hosting providers.  With the skel directory, you can easily configure a default set of files to be automatically copied into new user accounts, which is particularly useful for customizing the holding pages for new customer websites.

 

On a bare Linux server, the skeleton folder can be found in /etc/skel.  On cPanel servers, the directory will be in “cpanel3-skel” in the home directory of the user that owns the account being created.  For example, if you’re the root user and you’re creating an account on the server, that account’s default files will be copied from /root/cpanel3-skel.  If you’re a reseller, it will be in your home folder, ie /home/yourusername/cpanel3-skel.

 

Let’s say when new users are created on your server, you want their websites to automatically show a basic index.html page that says “coming soon”.  You may also want the user to have a customized .bashrc file for their SSH sessions.  If you are root, you’ll create the following files:

 

  • /root/cpanel3-skel/public_html/index.html
  • /root/cpanel3-skel/.bashrc

 

Now, when user accounts are created, their accounts will automatically contain .bashrc and public_html/index.html.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Log in