hi,
i add remote ftp backup details successfully with custom ftp port 821. but, after create backup with command line get error ftp: connect to address ::1: Connection refused
successfully connect if try with php ftp login.
<?php
// connect to FTP server
$ftp_server = "localhost";
$port = "821";
$ftp_username = "abc";
$ftp_userpass = "123";
$ftp_conn = ftp_connect($ftp_server, $port) or die("Could not connect to $ftp_server");
// login
if (@ftp_login($ftp_conn, $ftp_username, $ftp_userpass))
{
echo "Connection established.";
}
else
{
echo "Couldn't establish a connection.";
}
// close connection
ftp_close($ftp_conn);
?>
yes after use 127.0.0.1 work fine with sftp port 22.
but, not work with ftp port 21. ask for password and login success… but, stuck at “Retrieving directory listing”…
i know this is not hestiacp problem. but your small help save my time.
thank you @Raphael and @eris
Status: Initializing TLS...
Status: TLS connection established.
Status: Logged in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is the current directory
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: PASV
Response: 227 Entering Passive Mode (192,168,2,2,46,255).
Command: LIST
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing