Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to run a working FTP script on my Azure VM with Server2012.

All firewalls are off for this test. Port20/21 is an open endpoint.

cd current
binary hash
prompt n
quote pasv
MGET *.*


ftp> OPEN
Connected to
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 2 of 50 allowed.
220-Local time is now 15:15. Server port: 21.
220-This is a private system - No anonymous login
220 You will be disconnected after 3 minutes of inactivity.
User (
331 User xxxxxxx OK. Password required

230-User xxxxxxxxx has group access to:  ftpgroup
230-OK. Current directory is /
230-All usage is logged for security and statistical analysis purposes.
230 Do not exceed one download set per 10 minute interval.
ftp> cd current
250 OK. Current directory is /current
ftp> binary hash
200 TYPE is now 8-bit binary
ftp> prompt n
Interactive mode Off .
ftp> quote pasv
227 Entering Passive Mode (85,17,xx,xxx,197,86)
ftp> MGET *.*
I won't open a connection to 10.140.x.xx (only to
200 TYPE is now 8-bit binary
Cannot find list of remote files.
ftp> QUIT
221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 Logout.

As you can see, it has a problem at the MGET command.

Ive tried a active command with PORT xx,xx,xxx,xxx,xx,xx but i get an Invalid command after that line from the FTP client.

Filezilla connects ok via port 21.

share|improve this question
Did you really obscure the IP addresses of well-known public sites? That seems unnecessary and unhelpful. – Michael Hampton Dec 23 '12 at 15:25
just what I normally do , i didnt think the actually address was relevant in this example. – Dan Sewell Dec 23 '12 at 15:28
@DanSewell did you create endpoints for your passive port range? – faker Dec 23 '12 at 18:43
no, because You can only create upto 25 endpoints in total, rather than ranges. – Dan Sewell Dec 23 '12 at 19:25
@DanSewell Right, but then you need to limit your passive port range to match that. Without endpoints passive will not work as it more or less acts as a firewall. – faker Dec 24 '12 at 8:58

1 Answer 1

up vote 0 down vote accepted

I seems the windows FTP does not do passive ftp properly, so I ended up writing my own ftp program in c# forcing passive mode. This is fine.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.