|
|
Strangeness using FTP in Terminal
|
|
|
|
Fresh-Faced Recruit
Join Date: Jul 2003
Location: San Francisco Bay Area
Status:
Offline
|
|
Strange response from remote server:
[snip]
[adsl-63-197-000-000:~] xtian% ftp ftp.land.com
Connected to ftp.land.com.
220 FTP Server
Name (ftp.land.com:xtian): chris
331 Password required for chris.
Password:
230 User chris logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls -a
229 Entering Extended Passive Mode (|||41183|)
200 EPRT command successful
[/snip]
See the line "ftp> ls -a"? This is supposed to list the directory contents [ http://www.seotoolbox.com/html-issues/easy-ftp.html], instead sends a cpommand to enter passive mode. Whats going on???
|
|
|
|
|
|
|
|
|
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status:
Offline
|
|
Originally posted by xtian:
Strange response from remote server:
[snip]
[adsl-63-197-000-000:~] xtian% ftp ftp.land.com
Connected to ftp.land.com.
220 FTP Server
Name (ftp.land.com:xtian): chris
331 Password required for chris.
Password:
230 User chris logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls -a
229 Entering Extended Passive Mode (|||41183|)
200 EPRT command successful
[/snip]
See the line "ftp> ls -a"? This is supposed to list the directory contents [http://www.seotoolbox.com/html-issues/easy-ftp.html], instead sends a cpommand to enter passive mode. Whats going on???
It's entering passive mode to send you the data (being the ASCII text making up the contents of the directory). This is normal for clients that default to passive such as Mac OS X's FTP command.
Oh, and "ls" in FTP already lists "dot" files, so adding the "-a" flag only shows you "." and ".." which aren't useful anyway. So you might as well save the keystrokes. (This is potentially server specific information though, so it may not apply to non-Mac OS X ftpd's.)
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jul 2003
Location: San Francisco Bay Area
Status:
Offline
|
|
Originally posted by Xeo:
It's entering passive mode to send you the data (being the ASCII text making up the contents of the directory). This is normal for clients that default to passive such as Mac OS X's FTP command.
Oh. That's one of the things about ftp that I meant to understand, but never did anything about it.
Your reply suggested I should wait longer for the server to reply. I did and this is what it said:
ftp> ls /
229 Entering Extended Passive Mode (|||33903|)
200 EPRT command successful
421 Service not available, remote server timed out. Connection closed
ftp>
I'm no closer to using OS X UNIX to ftp to my web server.
|
|
|
|
|
|
|
|
|
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status:
Offline
|
|
Originally posted by xtian:
Oh. That's one of the things about ftp that I meant to understand, but never did anything about it.
Your reply suggested I should wait longer for the server to reply. I did and this is what it said:
I'm no closer to using OS X UNIX to ftp to my web server.
You can try turning off passive mode and see if that helps. Once FTP'd to the server, type "passive" and it should say that passive is off. Then try the command again.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jul 2003
Location: San Francisco Bay Area
Status:
Offline
|
|
that did it xeo, thanks for your help. xtian
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Sep 2000
Location: Denver, CO, USA
Status:
Offline
|
|
Ok, I just found this thread and am having exactly the same problem. However, turning off passive mode only resulted in this:
Code:
Passive mode: off; fallback to active mode: off.
ftp> dir
500 Illegal EPRT command
200 PORT command successful
and then it sits there doing nothing. Connecting via clients like Transmit work fine, but i need CLI too for when I'm not sitting in front of the machine.
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Sep 2000
Location: Denver, CO, USA
Status:
Offline
|
|
I let this go for a while but today I wanted to ftp something and realized I never found a solution. Does anyone know how to resolve this?
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Apr 2001
Status:
Offline
|
|
Turning off passive mode when a firewall is involved, will cause the connection to hang.
If CLI does not work in passive mode, chances are that there's a server or firewall problem.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jul 2003
Location: San Francisco Bay Area
Status:
Offline
|
|
Try a combination of:
epsv4
passive
(such as epsv4 only, or with passive, or passive only).
I don't know yet why these commands work, but they help me.
good luck
xtian
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Sep 2000
Location: Denver, CO, USA
Status:
Offline
|
|
THANK YOU! 'epsv4' seems to do the trick.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|