Description

This function creates a new FTP account.


Examples




$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$add_ftp = $cpanel->api1('Ftp','addftp', array('user','12345luggage','usernameftp','0','0','public_html/usernameftp') ); // Call the function.

 



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $add_ftp = $cpliveapi->api1('Ftp','addftp', ['user','12345luggage','usernameftp','0','0','public_html/usernameftp'] ); # Call the function.

 


<cpanel Module="Ftp::addftp( $FORM('user','pass','homedir','quota','disallowdot','homedir2'))">




cpapi1 --user=username Ftp addftp user 12345luggage


For more information and additional output options, read our Guide to cPanel API 1 documentation or run the cpapi1 --help command.  



This function does not return output.



Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The FTP username.

A valid FTP username on the account.

user
passstring

Required

The FTP password.

A secure password.
12345luggage
homedirstring

The FTP account's home directory.

If you do not specify a path, the FTP account uses the cPanel account's home directory.

A valid path, relative to the cPanel account's home directory.
public_ftp
quotaBoolean

The quota of the new FTP account.

This value defaults to 0, which grants an unlimited quota.

  • A valid integer which measures the quota size, in bytes.
  • 0 — An unlimited quota.
0
disallowdotBoolean

Whether to strip the dots from the username.

This value defaults to 1.

  • 1 — Strip dots from the username.
  • 0 — Allow dots in the username.
0
homedir2string


We deprecated this parameter in cPanel & WHM version 11.


 
 

Returns

This function does not return output.