Skip to main content

Fileman fileop function

Comments

2 comments

  • Visad182
    May someone explain me this please ? I really don't know why we pay for license fee but have no support...
    0
  • cPanelMichael
    Hello @Visad182, It looks like you are attempting to use a session-based API call for a cPanel API 2 function:
    // Define the API call. $cpanel_host = 'localhost'; $request_uri = "https://$cpanel_host:2083/execute/Fileman/fileop";

    That type of call isn't supported with cPanel API 2 the way that it is with cPanel UAPI. You can scroll to the bottom of the following document and click on the various API types to see the supported methods of calling functions: Guide to cPanel API 2 - Developer Documentation - cPanel Documentation Also, note that a good approach when troubleshooting an issue with an API function is to test it out via the command line first. Here's an example of how to use this cPanel API 2 function via the command line: # cpapi2 --user=username123 Fileman fileop op=extract sourcefiles=/home/username123/example.zip destfiles=/home/username123/ doubledecode=1 --- cpanelresult: apiversion: 2 data: - dest: /home/username123 output: "Archive: /home/username123/example.zip\n extracting: 123 \n extracting: 456 \n" result: 1 src: /home/username123/example.zip event: result: 1 func: fileop module: Fileman
    This command correctly extracted the files from /home/username123/example.zip to the /home/username123/ directory. Keep in mind that opening a support ticket is a better approach if you require more immediate assistance (24/7 support is not offered on the cPanel Forums): Create Support Ticket - Version 72 Documentation - cPanel Documentation Thank you.
    0

Please sign in to leave a comment.