Send an xml file to ftp server

Is there a cake method to send an xml file to ftp server ?
I am trying :

$ftp_conn = ftp_connect($ftp_server) or die();
$login = ftp_login($ftp_conn, ‘login_name’, ‘pwd’);
ftp_put($ftp_conn, $filename . ‘.xml’, $myFile, FTP_ASCII);

But it does not work. Error :
ftp_put(): bind() failed: Permission denied (13)

You never check the return value of ftp_login. From the “permission denied” error, I’m guessing that the login is failing.

Thank you for this answer.
In fact, I was not told that the server was in passive mode.
I called the maintenance department and I added
ftp_pasv($conn_id, true);

Thank you again.