Cpanel disk space consumed by an account’s MySQL and PostgreSQL database
To enable this feature toggle the following Tweak Setting:
When displaying disk usage in cPanel/WHM include Postgresql and MySQL® disk usage.
As with the database counts, the disk usage calculation is handled by /scripts/update_db_cache which executes every 4 hours. This script is executed upon enabling the Tweak Setting. Administrators may also execute this script to recalculate the figures.
The disk usage figures are stored in /var/cpanel/datastore/mysql-disk-usage and /var/cpanel/datastore/postgres-disk-usage.
cat /var/cpanel/datastore/mysql-disk-usage
Support for /scripts/updatemysqlquota ends as of cPanelTM 11.25.0. Per this change /scripts/updatemysqlquota is no longer distributed with the product.
Reference: http://cpanel.net
Cpanel failurls File
The failurls file, located at /var/cpanel/failurls, allows you to specify where resellers can redirect users who fail to authenticate with cPanel.
Enter the URLs to which resellers can redirect users, one per line, in the file.
Entries in this file must meet the following requirements:
Entries must be an exact match. Dynamic URLs are not acceptable.
Example:
http://example.com/index.php?failed=1
Dynamic content on the login page must be passed via hidden POST variables. Using the GET query string will fail because it will not match any entry in the failurls file exactly. When you are finished creating entries in the failurls file, you must restart cPanel. To restart cPanel, run the following command as the root user:
/usr/local/cpanel/startup
Reference : http://cpanel.net/
Installing cPanel DNS ONLY
To begin your installation, use the following commands:
Open the /home directory by typing the command cd /home
Fetch the latest installation file from the cPanel servers by typing the command
wget -N http://httpupdate.cpanel.net/latest-dnsonly
Open and run the installation files by typing the command sh latest-dnsonly
Installing PostgreSQL on Your cPanel/WHM Server
cPanel requires PostgreSQL 7.3.x or later.
First step is to update cpanel using /scripts/upcp from command line while logged in as root. If you have PostgreSQL 7.2.x installed, back up your databases using pg_dumpall.
Move your existing PostgreSQL data directory somewhere else by, for example, typing the following command:
mv /var/lib/pgsql /var/lib/pgsql.old
Type the following command:
From WHM now select Postgres Config in the SQL Services section of WHM. Type a new PostgreSQL password in the text box and click Change Password.
How to fix Cpanel Account Permissions
Fixing file and directory permission.
find /home/*/public_html/* -type f -exec chmod 644 {} \;
find /home/*/public_html/* -type d -exec chmod 755 {} \;
we can specify user by replace * with usename
To fix the permission for all the websites.
for i in `ls /var/cpanel/users` ; do chown -R $i.$i /home/$i/public_html/* ; done