Troubleshooting a cPanel Permission Denied/Access Denied Error

Symptom

After applying the 7.9.0 update, a permission error may be encountered with performing package changes or during Tenant Usage Metrics & Server Usage automation tasks with the cPanel module.

The following errors may be observed:

  • A Permission Denied error is displayed when changing a cPanel package
  • An Access denied error is displayed during the daily automation tasks cron

Cause

This occurs if the server user does not have permission to use the cPanel API listresellers command.

Solution

Please apply the 7.9.2 Maintence Release via the Utilities > Update WHMCS page

Workaround

Grant the "all" permission to the cPanel user specified in the  WHMCS Setup > Products/Services > Servers > Edit page.

This is  done via the WHM "Manage API Tokens" page              

Hotfix

A hotfix has been created for 7.9.1 only which introduces conditional  logic to skip this query if the required permission is not available:

https://whmcs.community/files/file/124-module-7253-cpanel-permission-deniedaccess-denied/