Virtualization made simple for Everyone.
rd Party specification. I had to  enable data transfer from a LINUX server to a Windows  Server 2003 Enterprise box which I have rebuilt. Which is not a big deal; I setup the FTP Server on the Windows box. After setting up the FTP server on the Windows 2003 server, I tried to test it from the Linux server and unfortunately it did not work. I was able to setup a FTP connecting after user  authentication, the only command I could run successfully was pwd  which shows the current Working Directory. When I gave the command to list  the files on the windows server with dir or ls -la as windows can understand both the command the server was giving an error message Entering Passive mode and the cursor blinking.  I had to intrupt the connection using CTRL +Z  key. I was getting the error shown below: [caption id="attachment_350" align="aligncenter" width="594"] Error ‘277 Entering Passive mode’[/caption] Googled it and came to know that this is  quite a famous error, after a lot of digging around and not getting the answer to the problem I started working from the basic level. I tested it locally  and found Windows Firewall was blocking the connection, the Firewall warning pops up asking if I want to continue or block the request. As this was local I authorized the access and Allowed the Connection and I could use Ftp and work on the server, However I was connected working on the server locally. Then I tried to connect from the LINUX server  with an Admin account I started to  getting the same  error ‘277 Entering Passive mode ( some numbers )’. I had then add FTP.exe and the port 21 in Firewall exception.. Unfortunately this did not work either. Then I disable the Firewall completely to test and  magic! everything started working. [caption id="attachment_351" align="aligncenter" width="594"] Directory listing starts working just after disabling the Windows Firewall[/caption] Just after sorting out this issue,  I came to know that they wanted the data to be sent via SFTP which is SSH on Linux. Unfortunately a s we all know windows doest support SSH or SFTP  so I had to use WinSSDH which is a  third-party tool for SSH. And added WinSSDH on the exception list and managed to enable the Firewall again. The next task for me was  to setup a automatic connection using public and privet key so that files are sent from LINUX server to windows server without a password prompt by something like scheduled task in windows.  We normally setup a Corn job on the Linux box to schedule the file transfers. Hence we want it automated without manual input of the password. Tip: When ever your setting up a RSA tunnell by using public and privet key make sure the key is generated from the server from which you are trying to access or send / receive data. In my case the rsa key has to be generated on Linux server and the public key needs to imported in the WinSSHD user account which is going to connect from Linux Server. If you have any questions or need more information, please feel free to contact me. Thanks.]]>

by:
November 8, 2010

The way passive mode works, the FTP server starts listening on a different port (other than 21) and the client connects to it to start the data connection. Since only port 21 was opened, passive mode was failing. Some servers let you configure the range of passive ports so you can open them in the firewall.
If I understand FTP correctly, originally this worked the other way around–The server tried to connect to the client. Passive mode was introduced due to the rise of firewalls and such that resulted in clients commonly being unable to receive incoming connections.

November 20, 2011

Thanks for your Reply It really helps us understand why this error occur
Many Thanks

January 8, 2012

Hi.
i am connecting to with my user name and password at ftp://ftp.4shared.com/
getting some error:
as
230 User logged in, proceed.
ftp> dir
501 PORT is disabled. Please switch to passive mode.
503 PORT or PASV must be issued first
reply me at wynn.jason@ymail.com

March 29, 2012

Hey… Im using FTP over SSL, in that im getting the same error. I’m using curl. Plz suggest me what to do…

thanks in advance.

May 2, 2014

You should take part in a contest for one of the greatest blogs on the internet.
I will highly recommend this site!

December 13, 2019

Excellent beat ! I would like to apprentice while you amend your website, how can i subscribe for a blog website? The account helped me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear idea|

December 13, 2019

Attractive component of content. I simply stumbled upon your website and in accession capital to assert that I get in fact enjoyed account your blog posts. Anyway I’ll be subscribing in your augment and even I fulfillment you get entry to persistently quickly.|

December 15, 2019

No matter if some one searches for his vital thing, so he/she wants to be available that in detail, thus that thing is maintained over here.|

Leave a Reply

Your email address will not be published. Required fields are marked *