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

stormthefront

Member
Apr 15, 2012
18
1
53
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.
 

stormthefront

Member
Apr 15, 2012
18
1
53
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.
 

stormthefront

Member
Apr 15, 2012
18
1
53
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.
 
Last edited:

stormthefront

Member
Apr 15, 2012
18
1
53
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.
 

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
although the issue there has been RESOLVED
Why haven't you posted back to that thread instead of leaving it in play? I think these threads are related.

I found some API function calls for both API2 and UAPI, however none addresses download from file manager to local computer.
Documentation is located here:
https://documentation.cpanel.net/display/SDK/Software+Development+Kit+Home

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.
What is the problem, exactly?