Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can't run FTP commands GET or PUT anymore

4,501 views
Skip to first unread message

Thomas

unread,
Oct 8, 2009, 7:27:24 PM10/8/09
to
I am used to create savefiles an my locally attached AS/400, copy them
to my PC using FTP via Windows' command line, and then transfer them
to a remote AS/400 using FTP again. I'm not using IFS with all that.
All of a sudden, my local AS/400 (release: 5.3) seems no longer able
to run FTP as it used to. User and password are accepted, as well as
commands such as BIN or CD, but when I use commands such as DIR or GET
or PUT, the command window displays message "200 PORT subcommand
request successful" and then it freezes. I have no problems using FTP
with the remote AS/400 and I did not change anything on my local AS/
400. Thanks in advance for all responses.

jonathan bailey

unread,
Oct 9, 2009, 5:14:58 AM10/9/09
to
"Thomas" <jd...@arcor.de> wrote in message
news:7a0d5043-ea7d-49aa...@j9g2000vbp.googlegroups.com...

If you type debug before the put/get you can see the ipaddress & port
number. The port number is the last 2 'bytes' given, multiply one by 256 &
add the other. Now on each system try netstat option 3 & find the open port.
On the ftpclient system you should find its in a listening state & on the
server it should be trying to open.
I have had exactly the same problem with my windows pc to the 400 quite
recently. I originally thought it could be some change in the firewalls,
particularly the one on my pc, however I found the port numbers just didnt
match. Some other ftp software client worked fine on the pc so the ftp.exe
is bust. Cant see any way to refresh it from windows install/remove.

Also try the pasv command before you start any operations. This sets a
different port usage scheme.

HTH
--
Jonathan


Thomas

unread,
Oct 9, 2009, 8:33:10 AM10/9/09
to
Thank you very much for your quick response, Jonathan. Unfortunately,
this is all Greek to me. Nevertheless, I tried to connect using
Filezilla and got this after sign-on:
Command: SYST
Response: 215 OS/400 is the remote operating system. The TCP/IP
version is "V5R3M0".
Command: FEAT
Response: 211-Feature listing follows:
Response: AUTH TLS
Response: PBSZ
Response: PROT
Response: 211 End of feature listing.
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "QGPL" is current library.
Error: Failed to retrieve directory listing
Message has been deleted

xin...@netscape.net

unread,
Oct 9, 2009, 8:47:47 AM10/9/09
to
We had the same problem. I'm not a networking guru so I don't know
what
really happened but they were messing around with our internal network
and the
Router got locked down too tight or something. We mentioned this to
our network
guy and he came back said he fixed it, and he did, and that it was on
the Router
where he made the change. Sorry I don't know more about networking
but a check of your Router would be one thing to investigate.

that 1 guy

J.T.F.

unread,
Oct 9, 2009, 2:10:02 PM10/9/09
to

I had that problem about 6 months ago.

Try from another PC, if it works from there, then it is your PC that
is the issue. The only real way to resolve this is to do a reload of
your system. You MIGHT be able to fix it by running a repair
installation of windows, but I doubt that will fix it.

Good luck.

jonathan bailey

unread,
Oct 12, 2009, 8:56:36 AM10/12/09
to
"Thomas" <jd...@arcor.de> wrote in message
news:0f8a1181-063a-466d...@k33g2000yqa.googlegroups.com...

Never used filezilla. from windows ftp command after signing on:
ftp> debug
Debugging On .
ftp> ls
---> PORT 192,168,1,181,16,74
200 PORT subcommand request successful.
---> NLST

& nothing else

16*256+74=4170
then in another cmd box:
C:\>netstat -a

Active Connections

Proto Local Address Foreign Address State
TCP localhost:4166 10.1.16.100:ftp ESTABLISHED
TCP localhost:4168 10.1.16.100:ftp ESTABLISHED
TCP localhost:4170 localhost:0 LISTENING

on the target as400
netstat
take option 3
subset by remote ip address:
Remote Remote Local
Opt Address Port Port Idle Time State
172.16.67.140 3902 telnet 000:00:02 Established
172.16.67.140 4168 ftp-data 000:00:31 SYN-sent
172.16.67.140 4168 ftp-con > 000:05:13 Established
172.16.67.140 4175 telnet 000:00:00 Established

So the as400 has decided to contact my pc on 4168 when the pc has told it to
use port 4170!

Does filezilla have a passive option? MS FTP dosnt.

--
Jonathan


jonathan bailey

unread,
Oct 12, 2009, 8:58:43 AM10/12/09
to
"jonathan bailey" <jonatha...@tesco.net> wrote in message
news:hav93f$r11$1...@aioe.org...
The 2 addresses for the pc are due to a firewall-but other FTP software
works OK.

--
Jonathan


Ken Sims

unread,
Oct 12, 2009, 10:37:27 AM10/12/09
to
Hi Jonathan -

On Mon, 12 Oct 2009 13:56:36 +0100, "jonathan bailey"
<jonatha...@tesco.net> wrote:

>Does filezilla have a passive option? MS FTP dosnt.

Yes. I'm running an older version, so the options may have moved ...

Global: Edit > Settings... > Firewall settings > Set the Passive Mode
option.

Site-specifc: Bring up the configuration for the site > Advanced >
Passive transfer mode settings

Personally I set the global option to passive and allow all sites to
default to Use default, then set any sites to Active if needed.

--
Ken
Opinions expressed are my own and do not necessarily represent the views
of my employer or anyone in their right mind.

Giovanni

unread,
Oct 13, 2009, 4:54:19 AM10/13/09
to

Make sure that you do not have an auxiliary storage problem.
Run WRKSYSSTS and check "% system ASP used".

Giovanni

Lothar Kimmeringer

unread,
Oct 13, 2009, 6:53:40 PM10/13/09
to
Thomas wrote:

> but when I use commands such as DIR or GET
> or PUT, the command window displays message "200 PORT subcommand
> request successful" and then it freezes.

The FTP PORT command means that the data-transfer (the directory
listing, the up- or downloaded data) should be done by initiating
a connection from the FTP-server to the client. This is known
as active mode in FTP.

So if this freezes (and don't immediately come back with an
error) that means, that a firewall is dropping (instead of
rejecting them leading to a clear error-message) the packets
for this.

So check the firewall-settings on the Window-box, of an
intermediate firewall or your AS/400 box if there are rules
that prevent the data-transfer.

Alternatively change from active to passive mode where the
data-connection is established by the client.

> I have no problems using FTP
> with the remote AS/400 and I did not change anything on my local AS/
> 400. Thanks in advance for all responses.

So most likely it's the Windows-box where a new firewall is
installed or an existing one was losing the rules for allowing
the operation of a FTP server.


Regards, Lothar
--
Lothar Kimmeringer E-Mail: spam...@kimmeringer.de
PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

Always remember: The answer is forty-two, there can only be wrong
questions!

Tom Liotta

unread,
Oct 18, 2009, 2:15:33 AM10/18/09
to
jonathan bailey wrote:

> Does filezilla have a passive option? MS FTP dosnt.

MS FTP does. It just isn't obvious about it.

When using ftp through Internet Explorer and wanting PASV try:

http://tinyurl.com/cvw8f or
http://compnetworking.about.com/cs/novellgroupwise/ht/setpassiveftpie.htm

When using command-line ftp.exe try:

http://edi.stylusstudio.com/msg08284.htm

They both work for me on W2K with IE6. They may be easier to find or
more obvious in newer installations. I don't have newer Windows --
all upgrades go a Linux route.

--
Tom Liotta
http://zap.to/tl400

Tom Liotta

unread,
Oct 18, 2009, 2:18:41 AM10/18/09
to
Tom Liotta wrote:
> jonathan bailey wrote:
>
>> Does filezilla have a passive option? MS FTP dosnt.
>
> MS FTP does. It just isn't obvious about it.
>
> When using ftp through Internet Explorer and wanting PASV try:
>
> http://tinyurl.com/cvw8f or
> http://compnetworking.about.com/cs/novellgroupwise/ht/setpassiveftpie.htm

I left off this link:

http://support.microsoft.com/kb/323446

I didn't find an 'official' link for ftp.exe, but it might be
obvious from reading the technique how it might work.

jonathan bailey

unread,
Oct 19, 2009, 10:24:39 AM10/19/09
to
"Tom Liotta" <tli...@earthlink.net> wrote in message
news:J9ydnUatrrTwLkfX...@earthlink.com...

ftp.exe on XP sp3 dosnt have a pasv command listed in help - or a hidden one
which works. I'm hoping to get less ms & more of something else but things
arent looking good-I'm firmly in the .net office in our company now. :(

--
Jonathan


Tom Liotta

unread,
Oct 19, 2009, 4:24:13 PM10/19/09
to
jonathan bailey wrote:

>> I didn't find an 'official' link for ftp.exe, but it might be obvious from
>> reading the technique how it might work.
>

> ftp.exe on XP sp3 dosnt have a pasv command listed in help - or a hidden one
> which works. I'm hoping to get less ms & more of something else but things
> arent looking good-I'm firmly in the .net office in our company now. :(

Jonathan:

As I noted in my first reply...

> When using command-line ftp.exe try:
>
> http://edi.stylusstudio.com/msg08284.htm

...ftp.exe does allow the LITERAL subcommand to pass a literal value
that can be "PASV" and it works when I try it. I just couldn't find
an 'official' Microsoft document that talks about it.

As I understand it, LITERAL simply sends whatever you want as if it
was a ftp subcommand. Since PASV is valid, it should work if it's
been implemented in the server. And if it's not implemented, it's
not going to work no matter what.

jonathan bailey

unread,
Oct 20, 2009, 8:22:49 AM10/20/09
to
"Tom Liotta" <tli...@earthlink.net> wrote in message
news:1tCdnZKa4Z-HVkHX...@earthlink.com...

OK I admit I didnt get to your last like as I read IE6 & assumed the worst!

I get
ftp> LITERAL PASV
---> PASV
227 Entering Passive Mode (192,168,5,12,12,46).
ftp> ls
---> PORT 192,168,1,181,11,235
200 PORT command successful.
---> NLST
150 Opening ASCII mode data connection for file list.

11*256+235=3051(unless ms calc is broken)

netstat gives
TCP 192.168.1.181:3051 0.0.0.0:0 LISTENING

which implies its not in passive mode at all.
Also
ftp> help literal
literal Send arbitrary ftp command
so you can set the target to be in passive mode but I dont think ftp.exe
really understands pasv at all. I think my version is broken in some way in
any case.

I'm not too bothered. I have another ftp client which works OK. Its just
there dosnt seem to be a method of fixing it. You cant just re-install an
rpm.

--
Jonathan


Thomas

unread,
Oct 27, 2009, 7:20:00 PM10/27/09
to
After changing from VPN to a direct connection through my router, the
same problem emerged with another host. On the other hand, there are
no problems with another PC connected to the same router. Therefore,
my PC seems to have difficulties in communicating with the router and
it seems to be a good idea to reload the system.

Thanks a lot to all folks who took part in this thread - I learned a
lot!

Thomas

dan...@djwinc.com

unread,
Jun 23, 2015, 5:21:28 AM6/23/15
to
Jonathan you are awesome! It worked real well for me! I previously lost many nights without success. THANK YOU!!!
0 new messages