The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

UAPI Module

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

  1. JanElegran

    JanElegran Registered

    Joined:
    Nov 23, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
    Example:
    Code:
    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

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    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.
     
Loading...

Share This Page