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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED UAPI: Get docroot of domain from bash running as root

Discussion in 'cPanel Developers' started by EneTar, Mar 6, 2018.

Tags:
  1. EneTar

    EneTar Well-Known Member

    Joined:
    Dec 19, 2015
    Messages:
    135
    Likes Received:
    9
    Trophy Points:
    18
    Location:
    Greece
    cPanel Access Level:
    Root Administrator
    In terminal logged in as root, Is it possible to run something like

    Code:
    #uapi  --output=json DomainInfo single_domain_data domain=example.com
    without the --user parameter. At that point of my script the user is unknown and the --user=root doesn't return any info because the domain is not owned by root.

    Otherwise is there any other API method to get the docroot of any domain or to get the owner account of the domain by knowing only the domain at that point?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,215
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    EneTar likes this.
  3. EneTar

    EneTar Well-Known Member

    Joined:
    Dec 19, 2015
    Messages:
    135
    Likes Received:
    9
    Trophy Points:
    18
    Location:
    Greece
    cPanel Access Level:
    Root Administrator
    Resolved, thanks
     
    cPanelMichael likes this.
Loading...

Share This Page