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.

What Api And What Function Call Is The File Manager Using For Downloads

Discussion in 'General Discussion' started by stormthefront, Jul 30, 2015.

  1. stormthefront

    stormthefront Member

    Joined:
    Apr 15, 2012
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    Can you tell me which API - 1, 2, UAPI is the fileman using for file downloading - I found some API function calls for both API2 and UAPI, however none addresses download from file manager to local computer. Also, please advise on the best API test method (API Shell accepts only API1 calls from what I have seen) to test the function call in order to debug the problem.

    Thank you.

    Regards,
    K.
     
  2. stormthefront

    stormthefront Member

    Joined:
    Apr 15, 2012
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    more debug info :

    Code:
    
    Request URL:
    https://server.com:2083/cpsess4352439023/download?skipencode=1&file=%2fhomehdd%2username%2fpublic_html%2fdir%2ffile.tar.gz
    Request Method:    GET
    Status Code:    HTTP/1.1 404 Not Found
    
    
    Regards,
    K.
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,470
    Likes Received:
    198
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  4. stormthefront

    stormthefront Member

    Joined:
    Apr 15, 2012
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    It is supposedly related (although the issue there has been RESOLVED by implementing a hook - it is no longer present).

    Here, however it seems that if I change the GET request to

    Code:
    https://server.com:2083/cpsess6744230909/download?skipencode=1&file=%2fhome%2fusername%2fpublic_html%2f360username%2ffile.tar.gz
    it starts working and the download passes through. Any idea on how to get cPanel to work with home in the Fileman section?

    Thanks.

    Regards,
    K.
     
    #4 stormthefront, Jul 30, 2015
    Last edited: Jul 30, 2015
  5. stormthefront

    stormthefront Member

    Joined:
    Apr 15, 2012
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    using the UAPI path parameter I can see that the absolute path is:

    Code:
    "path":"/homehdd/user","nicemode":"0711","humansize":"57 bytes","size":"57","fullpath":"/homehdd/user","absdir":"/homehdd/user"
    Where does it take this information from? The users are set with /home/username in /etc/passwd

    I am beginning to think this is something related to permissions, but I have not idea how to debug it yet.

    Regards,
    K.
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,470
    Likes Received:
    198
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Why haven't you posted back to that thread instead of leaving it in play? I think these threads are related.

    Documentation is located here:
    https://documentation.cpanel.net/display/SDK/Software+Development+Kit+Home

    What is the problem, exactly?
     
Loading...

Share This Page