Skip to main content

Calling a wrapper (privilege escalation) from PHP since cPanel 11.38

Comments

6 comments

  • tizoo
    Hi all, In fact it seems that it is not possible to make the same call with PHP as the documentation tell how to make it with Perl. We finally stay with the old way that generate the following error for each call : error_log:cpwrapd: falling back to using legacy adminbin: /usr/local/cpanel/bin/tzbmadmin
    Cheers, Philippe
    0
  • Mrg
    Hello, same problem. How can we reach this? How do you call the priv. escal. wrapper?
    0
  • cPanelMichael
    Hello, I've merged your posts into this thread, as there's no need to post the same question to multiple threads. Thank you.
    0
  • cPanelMichael
    Hello, Here's the response to the associated support ticket for this issue from David N: [QUOTE] Hello, Thanks for contacting us. The way cpwrap is written, the only language that can interface with it is Perl. However, it's possible (and not very difficult) to write a thin custom UAPI module with a call (or calls) that wraps your cpwrap call. Your LiveAPI page will then use $cpanel->uapi to invoke the custom UAPI call you've written. I recommend reading over the custom UAPI modules documentation if you haven't already:
    0
  • tizoo
    Hi Mrg, We do exactely as cPanelMichael tell you : 1) Created a custom module (TZBM.pm) 2) Installed the custom module in /usr/local/cpanel/Cpanel/ 3) Call it from PHP with something like : $cpanel->api2('TZBM', 'genmailboxlistfile', $param); Hope this help. Cheers, Philippe
    0

Please sign in to leave a comment.