M
M
m2_viktor2016-09-21 14:26:30
Computer networks
m2_viktor, 2016-09-21 14:26:30

Why can't the file be sent via ftp from the cmd client?

Hello, I recently had this problem at work:
Every day after the completion of a backup operation, workstations send an xml report about the result to an ftp server on the Internet. The script looks like this:

lcd C:\temp\
open ftp.myserver.com
login
password

mput nrobot_OAK_2016-09-21T08-06-57Z(-6).xml

bye
This script is run in multiple branches. But several branches at some point stopped sending these reports. I tried sending it manually, and this is what came out to stdout:
ftp> ftp>Связь с ftp.myserver.com
open ftp.myserver.com
220 Microsoft FTP Service
Пользователь (ftp.myserver.com:(none)): 
331 Password required

230 User logged in.

ftp> ftp> 
mput nrobot_OAK_2016-09-21T08-06-57Z(-6).xml
mput nrobot_OAK_2016-09-21T08-06-57Z(-6).xml? 
200 PORT command successful.
150 Opening ASCII mode data connection.
By elimination, I assumed that the problem could be at the ISP level, because. it is the same on problematic branches. But the support replied that everything is fine with them.
Here is the stdout from the working branch:
ftp> ftp>Связь с ftp.myserver.com
open ftp.myserver.com
220 Microsoft FTP Service
Пользователь (ftp.myserver.com:(none)): 
331 Password required

230 User logged in.

ftp> mput nrobot_OAK_2016-09-21T08-06-57Z(-6).xml
mput nrobot_OAK_2016-09-21T08-06-57Z(-6).xml? 
200 PORT command successful.
125 Data connection already open; Transfer starting.
226 Transfer complete.
ftp: 30250 байт отправлено за 0.13 (сек) со скоростью 232.69 (КБ/сек).
ftp> bye
221 Goodbye.

Here is a screenshot of a Wireshark packet capture from a problematic branch:
5223549ef5dd4e548d0a849f853efdae.png
Here is a screenshot of a Wireshark packet capture from a branch where there is no problem:
6c3a38ed955b47faa55f5f861b04448e.png
Why am I sure the problem is at the ISP level? Because I came to the problematic branch with an MTS 3G modem and sent a report via the modem, there were no problems. I must also say that if you browse the directories on the FTP server through a browser, then there are no problems either.
Please help me figure it out.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2016-09-21
@m2_viktor

You have established a connection to port 21 of the server. Further, the data transfer session is not established.
FTP.exe uses active mode, while third-party clients use passive. The problem is either with the firewall on the server or client (disable / open check). Or the provider does not allow a connection to your server IP on port 20

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question