mnis2008
asked on
FTP issue
I am trying to transfer a test file test.txt from my Computer to a Linux Server behind a firewall. I am able to connect to the server but I am not able to transfer the file, Below is the error
I have submitted this question earlier, It worked using a FTP client but I want it to work from msdos prompt
I have submitted this question earlier, It worked using a FTP client but I want it to work from msdos prompt
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
U:\>c:
C:\>ftp XXX.XXX.128.23
Connected to XXX.XXX.128.23
220 Access to this Computer System is Strictly Regulated and Subject to Criminal
Prosecution
User (XXX.XXX.128.23:(none)): schtz
331 Please specify the password.
Password:
230 Login successful.
ftp> put test.txt
500 Illegal PORT command.
> ftp: bind :Unknown error number
ftp> literal passive
500 Unknown command.
ftp> literal pasv
227 Entering Passive Mode (XXX,XXX,128,23,46,224)
ftp> put test.txt
> ftp: bind :Unknown error number
ftp>
You may have to change modes. Try typing bin for binary and then resend the file. If that does not work, try typing ascii for ascii before sending.
ASKER
It seems to be evident that your data port is not open! What makes you think it is?
The messages you posted say that every command using only the control connection works, but any command needing the data connection doesn't.
So please recheck your firewall settings (end-to-end!)
wmp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hello wmp,
I am able to create a file and navigate inside the folder, So I thought my data port was open, Now I think I am wrong, Is there any test which can tell me that my data connection port is not open.
Steve
I am able to create a file and navigate inside the folder, So I thought my data port was open, Now I think I am wrong, Is there any test which can tell me that my data connection port is not open.
Steve
Oh also don't trust that old RFC that says FTP uses port 20 for the data channel because that was written before the invention of passive mode.
AlexPace is correct, the windows built-in ftp command-line client is not capable of passive mode ftp.
I believe most web browsers (IE, firefox, chrome) use passive mode by default for ftp urls, or quickly switch to passive mode if required. If you get a directory listing using a browser then you should be fine with an ftp client that can deal with passive mode[1]. If not, then the firewall is almost certainly getting in the way.
[1] http://www.ncftp.com/ncftp/ is one such.
HTH!
I believe most web browsers (IE, firefox, chrome) use passive mode by default for ftp urls, or quickly switch to passive mode if required. If you get a directory listing using a browser then you should be fine with an ftp client that can deal with passive mode[1]. If not, then the firewall is almost certainly getting in the way.
[1] http://www.ncftp.com/ncftp/ is one such.
HTH!
ASKER
Thanks guy for all your information.
I am able to connect to the server in passive mode. Now the question is how can I tell If I have a FTP server that supports passive or active mode. I am using linux and how can this be told.
If there is a provision is there any parameter that I need to turn off/on to switch modes.
I am able to connect to the server in passive mode. Now the question is how can I tell If I have a FTP server that supports passive or active mode. I am using linux and how can this be told.
If there is a provision is there any parameter that I need to turn off/on to switch modes.
Virtually every FTP server supports passive mode.
Some of the have the option to define a port range for passive mode ports.
Which FTP server do you use on Linux?
Check with "man ftpd" on Linux how to display brand and version.
Should be something like "/usr/sbin/ftpd -v" or "...... -version" or "......--version" or "..... --help"
Some of the have the option to define a port range for passive mode ports.
Which FTP server do you use on Linux?
Check with "man ftpd" on Linux how to display brand and version.
Should be something like "/usr/sbin/ftpd -v" or "...... -version" or "......--version" or "..... --help"
ASKER
I am using vsftpd on linux
/usr/sbin/vsftpd -v
vsftpd: version 2.0.5
But how can I check if its a ACTIVE OR PASSIVE supported...???
/usr/sbin/vsftpd -v
vsftpd: version 2.0.5
But how can I check if its a ACTIVE OR PASSIVE supported...???
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.