Skip to main content

Update script for WHM plugin

Comments

7 comments

  • jimlongo
    OK. I've got a working update script, it's really the install script using cp -u to update new components, and that works by updating files without overwriting configuration files. Next question: (in app update). I'd like to offer both auto-update (by installing a cron command to run my installer) and a manual update button. The update button calls a php file that tries to run my install script (called from a remote location), and this is proving problematic. When I click the button I get a 403 error. How do I deal with this? HTTP error 403 cgi/ToplineVentures/update.php WHM is configured to disallow execution of unregistered applications when logged in as root or a reseller with the "all" ACL. To enable this functionality you must do one of the following: Register this addon with the /usr/local/cpanel/bin/register_appconfig script (Guide to WHM Plugins - The AppConfig System - Developer Documentation - cPanel Documentation), Enable the "Allow apps that have not registered with AppConfig to be run when logged in as root or a reseller with the "all" ACL in WHM" option in "Tweak Settings", or add permit_unregistered_apps_as_root=1 to the /var/cpanel/cpanel.config file, and run the /usr/local/cpanel/etc/init/startcpsrvd script. Top recap, the link calls a php file, which contains /dev/null && bash installcpanel");
    0
  • cPanelMichael
    Hello @jimlongo,
    HTTP error 403 cgi/ToplineVentures/update.php WHM is configured to disallow execution of unregistered applications when logged in as root or a reseller with the "all" ACL. To enable this functionality you must do one of the following: Register this addon with the /usr/local/cpanel/bin/register_appconfig script (
    You'd need to first follow the instructions found in the output of the error message above. To apply this to only this plugin, you can follow the instructions at:
    Guide to WHM Plugins - AppConfig Registration - Developer Documentation - cPanel Documentation Thank you.
    0
  • jimlongo
    Thanks Michael, it sounds like the instructions would apply if I (the admin) manually set those items. But this is a plugin which should just work from the admin's perspective, not have to manually intervene. The plugin is registered with AppConfig.
    0
  • cPanelMichael
    The plugin is registered with AppConfig.

    Hello @jimlongo, Can you confirm the plugin created its own .conf file in the /var/cpanel/apps/ directory when it was registered? Thank you.
    0
  • jimlongo
    Yes there is a conf file in /var/cpanel/apps/
    0
  • cPanelMichael
    Hello @jimlongo, If the application is registered, then the following two options under the Security tab in WHM >> Tweak Settings could be leading to that error message: This setting allows WHM applications and addons to execute even if an ACL list has not been defined This setting allows cPanel and Webmail applications and addons to execute even if a feature list has not been defined Do you have an ACL list and feature list defined for this application in it's configuration file? If not, we document how to configure this for the application at: Guide to WHM Plugins - AppConfig Configuration File - Developer Documentation - cPanel Documentation Let me know if this helps. Thank you.
    0
  • jimlongo
    Thank you.
    0

Please sign in to leave a comment.