Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

UAPI Module

Discussion in 'cPanel Developers' started by JanElegran, Nov 23, 2015.

  1. JanElegran

    JanElegran Registered

    Nov 23, 2015
    Likes Received:
    Trophy Points:
    New York
    cPanel Access Level:
    Root Administrator
    Hello Friends,

    I am posting this here for the first time. Any help or guidance will be highly appreciated.

    I have the following Problem during my module development.
    The goal of the module is it to clone a git repository into the public_html folder of the logged in cpanel user.
    I am using the Single Sign on method
    UAPI Call: https://ip:2083/token/execute/example/foobar
    user: Max
    my $com = 'whoami';
    # max
    my $pwd = `pwd`;
    # /usr/local/cpanel/base
    my $home = `cd ~`; OR
    my $home = `/home/Max`;
    my $pwd2 = `pwd`;
    # /usr/local/cpanel/base
    As you can see the directory didn't change.
    I was wondering if the account needs root access in order to move around to the own home directory?
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello :)

    You may want to develop a custom script that clones your git repository, as opposed to attempting to create a custom UAPI module. For instance, are you attempting to allow a user to complete this action directly from their cPanel interface?

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice