

You simply add #ACLS:, this only controls which users will see the plugin in the WHM Plugins section. Using the ACLS comment is pretty straight forward. You can see what permissions a reseller has by looking at the /var/cpanel/resellers file. These are indicated by a string like “list-accts” or “all”, you can view a list of these ACLs in /usr/local/cpanel/Whostmgr/ACLS.pm. If you are not familiar with what ACLs mean in the context of WHM, these refer to the permissions that the reseller has to various aspects in WHM such as the ability to create accounts or edit DNS zones. Then there is actually enforcing the ACL which is done via the Whostmgr::ACLS perl module. The ACLS comment controls who will see the ACL in the Plugins section of WHM. There are two parts to ACLs with WHM Plugins, that control who can display it and who can access it. An example of how a # WHMADDON should look for an application named “Sample Test App” would be: Display Name refers to what well be displayed under the “Plugins” header of WHM. cgi, so if you have addon_test.cgi, this would contain “test”. Where it says appname it should be replaced with the actual file name of the application excluding addon_ and. The first one of these is the WHMADDON comment which sets how the plugin will be displayed in WHM: These must be owned by root:root and be globally readable/executable ( 755), so don’t store any access credentials in these scripts – have them load from other files that are root-readable only.Īs I mentioned earlier, there are a couple of special comments that need to be placed inside of WHM Addons. Any CGI language can be used here, however only perl will allow you access to some special functions that make permission handling much easier.Īll WHM plugins must be placed at /usr/local/cpanel/whostmgr/docroot/cgi and must be prefixed with addon_ and end with. A WHM plugin is merely a simple CGI application that has a couple of special comments in it to handle how it is displayed.

I have had 3 people ask me in the past 48 hours on how to write them, so I thought I might want to consolidate and post this knowledge. We really have no information available on how to write WHM Plugins.
