Child pages
  • UAPI Functions - Ftp::get_ftp_daemon_info
Skip to end of metadata
Go to start of metadata

 

Description

This function retrieves the extended information about the server's FTP daemon.

Examples 


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/Ftp/get_ftp_daemon_info


Note:

This example calls the UAPI function via a cPanel session. For more information, read our Guide to UAPI documentation. 

 LiveAPI PHP Class
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Retrieve extended information about the FTP server.
$ftp_server = $cpanel->uapi(
    'Ftp', 'get_ftp_daemon_info'
);


Note:

For more information, read our Guide to the LiveAPI System.

 

 LiveAPI Perl Module
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Retrieve extended information about the FTP server.
my $ftp_server = $cpliveapi->uapi(
    'Ftp', 'get_ftp_daemon_info',
);


Note:

For more information, read our Guide to the LiveAPI System.

 

 cPanel Template Toolkit
<!-- Retrieve extended information about the FTP server. -->
[% execute( 'Ftp', 'get_ftp_daemon_info' ); %]


Note:

For more information, read our Guide to Template Toolkit documentation. 

 

 Command Line
uapi --user=username Ftp get_ftp_daemon_info


Notes:

  • You must URI-encode values.
  • username represents your account-level username.
  • For more information and additional output options, read our Guide to UAPI documentation or run the uapi --help command. 
  • If you run CloudLinux™, you must use the full path of the uapi command:

    /usr/local/cpanel/bin/uapi


 Output (JSON)
{
    "messages": null,
    "errors": null,
    "status": 1,
    "metadata": {},
    "data": {
        "supports": {
            "quota": 1,
            "login_without_domain": 0
        },
        "name": "pure-ftpd",
        "enabled": 1
    }
}


Note:

Use cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell) to directly test cPanel API calls.

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
namestringThe FTP server's name.
  • pure-ftpd
  • proftpd
  • An empty string.

pure-ftpd
enabledBooleanWhether the server's FTP daemon is enabled.
  • 1 — Enabled.
  • 0 — Disable.
1
supportshash

This hash contains the features that the FTP daemon supports.

This hash includes the quota and login_without_domain returns. 

quota

Boolean

Whether the FTP daemon supports disk quotas.

The function returns this value in the supports hash.

  • 1 — Supported.
  • 0Not supported.
1

login_without_domain

Boolean

Whether the FTP daemon supports username authentication without the user's domain.

The function returns this value in the supports hash.

  • 1 — Supported.
  • 0Not supported.
0