Faram said:
Hi,
when I use IP address I can save file in FTP site, but in command line
when
I use the name and path to the FTP site after a while give me this
message:
can't build data connection: connection timed out. any ideas?
Thanks in advance
Faram
I doubt it's to do with using IP address versus name.
I think it's to do with the FTP mode ( active/PORT or PASV ) which your FTP
client is using.
FTP can operate in one of 2 fundamentally different ways: Active ( PORT )
mode, or PASV mode. This determines how the data connection is built. (
either from the outside in ( PORT ), or from the inside out (PASV) ) Active
mode can cause problems if you ( the FTP client ) are behind a NAT router or
firewall, because the inbound data connection may be bolcked as
un-solicited. PASV mode is designed for clients behind a NAT / firewall.
I suspect the method you are using with IP address is connecting using PASV
mode. The supplied command-line FTP client is poor, and does not support
PASV mode. It always uses PORT mode.
All 3-rd party FTP programs will support PASV mode.
Get a better one here:
ftp://ftp.gnu.org/old-gnu/emacs/windows/contrib/ftp-for-win32.zip
Do a ? at ths one, and see there are many more commands.
PASV is the one you need.