Have a Question?

If you have any question you can ask below or enter what you are looking for!

Common Paths and Utilities in cPanel and WHM

For users of cPanel/WHM on virtual or dedicated servers, the following article describes common system paths and utilities.

Paths of Base Modules




/usr/local/bin/convert or /usr/bin/convert




Ruby Gems




FLV Tool

User Directories

Document Root

WWW Directory

CGI Directory

cPanel / WHM Core Directories and Files

It only contains scripts and binaries which provide installation and configuration of many cPanel services.

Accommodates proprietary configuration data for cPanel:

  • Primary cPanel configuration
  • User configurations
  • Reseller configurations
  • Accounting, conversion, and update logs
  • Bandwidth data
  • Customized service templates

Primary cPanel configuration file.

Each variable influences the behaviour of cPanel. Variables are delimited and separated by an equal sign. If this file does not exist, cPanel falls back to defaults.

Lists each reseller with a comma-delimited list of WHM resources that a reseller can access.

It contains a list of accounting functions performed through WHM like account removal and creation.

Files contain a list of bandwidth history for each account named after their respective users. History files are stored in human-readable format. Meanwhile, actual bandwidth data are stored in round-robin databases.

File name is inherited from the feature list name. It contains a line delimited list of feature variables and zero or one value. Variables control cPanel resources available to users.

It contains a list of packages. If a package belongs to resellers, the file name is prefixed with reseller username. Each of these values determines the value created in cPanel user file.

It contains a list of cPanel user configuration files named after the user. Variables define account resources, themes, and domains, among others.

Other /var/cPanel Directories

This directory contains logs from account copies/transfers.

It contains the output of each cPanel update executed on the server.

It is named after the respective reseller users they represent. Each contains only the IP address which should be used as resellers main shared IP.

It contains customized DNS zone templates created in WHM.

This directory holds a large number of scripts serving as building blocks for many cPanel/WHM features.

These scripts are used to:

  • Update cPanel and many of its services
  • Customise account creation routines
  • Perform backups of cPanel accounts
  • Install and update cPanel managed services

cPanel Maintenance Scripts

By default cPanel applies updates at 2:13 AM (server time through root crontab).
/scripts/upcp sends out these updates through the key components:

  • /scripts/updatenow– Synchronises /scripts directory
  • /scripts/sysup– Updates cPanel managed rpms
  • /scripts/rpmup– Updates all other system updates

Updates are logged to time-stamped files in /var/cPanel/update logs. Update configuration is stored in /etc/cpupdate.conf.

Account Management Scripts

/scripts/wwwacct (account creation)
/scripts/removeacct (account termination)
/scripts/suspendacct (account suspension)
/scripts/unsuspendacct (account resuming)
/scripts/addpop (create pop account)

Updates the user:owner and user:domain tables stored in:


These tables enumerate and keep track of accounts as well as their owners.

Package Management

Takes argument list of rpms, then passes these on to the underlying package manager.

The equivalent of ensurerpm for FreeBSD. Updates specified packages from ports.

Takes argument list of perl modules to install via CPAN. Each of the aforementioned scripts can accept an argument of ‘–force’ to force package installations.

Can be called to apply MySQL updates independent of upcp.

Cleans up the default MySQL privilege tables by installing a more restrictive privilege schema.

Will verify that mysql is accessible with password stored in /root/.my.cnf and force a reset with a random 16 character string if inaccessible.

Can be called to apply exim updates independent of upcp.

Will rebuild exim.conf, and merge local, distribution, and cPanel configurations.

Rebuild named.conf based on existing zone files.

Download, extract, and execute apache build script.

Rebuilds httpd.conf based on DNS entries found in each cPanel user configuration.

Other cPanel Scripts

The majority of cPanel managed service can be scripts named appropriately.

Will rebuild the PHP interpreter used internally by cpsrvd.

Will scan for and install any Perl modules required by cPanel.

Updates horde and resets the horde mysql user password.

Will attempt to rebuild quota database per information stored in /etc/quota.conf.

Leave a Reply

You must be logged in to post a comment.