LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-17-2007, 02:28 PM   #1
qrshat
Member
 
Registered: Oct 2005
Posts: 56

Rep: Reputation: 15
Passive FTP Problem in Shell Script


Hi,

When i use ftp command in ftp prompt,i take the error follows;

ftp> dir
200 Port command successful.
421 Failed to create ActiveFTP Data Connection. (Blocked by firewall?) Please use PassiveFTP
ftp>


Because of this error, My shell script is not running
properly. How can i use passive ftp in my shell script and in ftp promt?

Thanks in advance,
 
Old 04-17-2007, 03:24 PM   #2
penguiniator
Member
 
Registered: Feb 2004
Location: Olympia, WA
Distribution: SolydK
Posts: 442
Blog Entries: 3

Rep: Reputation: 60
What version of ftp are you using? Newer versions try to use passive ftp by default and only try to use an active mode connection when you specify the -A switch. You can specify the -p switch, which will tell ftp to use a passive mode connection. This switch is deprecated in newer versions, due to passive mode being the default, but it still works.
 
Old 04-17-2007, 06:20 PM   #3
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Strange client.
Also there is no "better method". One puts the security risk on the client, the other on the server.

Quote:
421 Failed to create ActiveFTP Data Connection. (Blocked by firewall?) Please use PassiveFTP
Strange comment from a ftp client. Which version and distro are you using?

type
passive
to put the communication in passive mode
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script for ftp javier_ccs Programming 7 07-18-2006 11:02 PM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM
FTP: active and passive mode problem with some windows client tda71 Linux - Networking 2 06-14-2005 08:31 AM
Konqueror FTP passive/active problem & .netrc perl21 Linux - General 0 03-17-2005 04:43 PM
How do I set my FTP server to accept passive FTP? imsam Linux - Newbie 3 12-12-2004 06:22 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration