Description

This function enables or disables anonymous FTP logins.

Examples 




https://hostname.example.com:2083/cpsess##########/execute/Ftp/set_anonymous_ftp?set=0



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Disable anonymous FTP logins.
$anon_ftp = $cpanel->uapi(
    'Ftp', 'set_anonymous_ftp',
    array(
        'set'    => '0',
         )
);

 



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Disable anonymous FTP logins.
my $anon_ftp = $cpliveapi->uapi(
    'Ftp', 'set_anonymous_ftp',
    {
        'set'    => '0',
    }
);

 



<!-- Disable anonymous FTP logins. -->
[% execute( 'Ftp', 'set_anonymous_ftp', { set => '0' } ); %]

 



uapi --user=username Ftp set_anonymous_ftp set=0



{  
   "messages":null,
   "errors":null,
   "status":1,
   "metadata":{  

   },
   "data":null
}



Parameters

ParameterTypeDescriptionPossible valuesExample
setBoolean

Required

Whether to enable or disable anonymous FTP logins.

  • 1 — Enable.
  • 0 — Disable.
0

Returns

This function returns only metadata.