Page 1 of 1

Append with offset > 9 does not work

Posted: 2019-03-22 09:38
by TicTac
Hi,
I have the following problem:
When using append and the file i try to append to is not bigger than a size of 9 bytes, everything works fine. I can append 1, 3, 20 or even 200 bytes.
But when the file is bigger than 9, i can not even append 1 single byte.
This log shows that i started with a size of 3 and append 3 more bytes every time. It works 3 times but as soon the offset is 12, nothing happens. (I cancled the connection after 10 seconds because I know I would get a timeout, that's why it says "kicked").

(000036)22.03.2019 10:19:22 - (not logged in) (192.168.178.58)> 220-FileZilla Server 0.9.60 beta
(000036)22.03.2019 10:19:22 - (not logged in) (192.168.178.58)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(000036)22.03.2019 10:19:22 - (not logged in) (192.168.178.58)> 220 Please visit https://filezilla-project.org/
(000036)22.03.2019 10:19:22 - (not logged in) (192.168.178.58)> USER Daniel
(000036)22.03.2019 10:19:22 - (not logged in) (192.168.178.58)> 331 Password required for daniel
(000036)22.03.2019 10:19:22 - (not logged in) (192.168.178.58)> PASS ******
(000036)22.03.2019 10:19:22 - daniel (192.168.178.58)> 230 Logged on
(000036)22.03.2019 10:19:22 - daniel (192.168.178.58)> TYPE I
(000036)22.03.2019 10:19:22 - daniel (192.168.178.58)> 200 Type set to I
(000036)22.03.2019 10:19:22 - daniel (192.168.178.58)> PASV
(000036)22.03.2019 10:19:22 - daniel (192.168.178.58)> 227 Entering Passive Mode (192,168,178,55,227,246)
(000036)22.03.2019 10:19:23 - daniel (192.168.178.58)> APPE /T_2000.txt
(000036)22.03.2019 10:19:23 - daniel (192.168.178.58)> 150 Opening data channel for file upload to server of "/T_2000.txt", restarting at offset 3
(000036)22.03.2019 10:19:23 - daniel (192.168.178.58)> 226 Successfully transferred "/T_2000.txt"
(000036)22.03.2019 10:19:23 - daniel (192.168.178.58)> QUIT
(000036)22.03.2019 10:19:23 - daniel (192.168.178.58)> 221 Goodbye
(000036)22.03.2019 10:19:23 - daniel (192.168.178.58)> disconnected.
(000037)22.03.2019 10:19:33 - (not logged in) (192.168.178.58)> Connected on port 21, sending welcome message...
(000037)22.03.2019 10:19:33 - (not logged in) (192.168.178.58)> 220-FileZilla Server 0.9.60 beta
(000037)22.03.2019 10:19:33 - (not logged in) (192.168.178.58)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(000037)22.03.2019 10:19:33 - (not logged in) (192.168.178.58)> 220 Please visit https://filezilla-project.org/
(000037)22.03.2019 10:19:33 - (not logged in) (192.168.178.58)> USER Daniel
(000037)22.03.2019 10:19:33 - (not logged in) (192.168.178.58)> 331 Password required for daniel
(000037)22.03.2019 10:19:33 - (not logged in) (192.168.178.58)> PASS ******
(000037)22.03.2019 10:19:33 - daniel (192.168.178.58)> 230 Logged on
(000037)22.03.2019 10:19:33 - daniel (192.168.178.58)> TYPE I
(000037)22.03.2019 10:19:33 - daniel (192.168.178.58)> 200 Type set to I
(000037)22.03.2019 10:19:33 - daniel (192.168.178.58)> PASV
(000037)22.03.2019 10:19:33 - daniel (192.168.178.58)> 227 Entering Passive Mode (192,168,178,55,221,91)
(000037)22.03.2019 10:19:33 - daniel (192.168.178.58)> APPE /T_2000.txt
(000037)22.03.2019 10:19:33 - daniel (192.168.178.58)> 150 Opening data channel for file upload to server of "/T_2000.txt", restarting at offset 6
(000037)22.03.2019 10:19:33 - daniel (192.168.178.58)> 226 Successfully transferred "/T_2000.txt"
(000037)22.03.2019 10:19:33 - daniel (192.168.178.58)> QUIT
(000037)22.03.2019 10:19:33 - daniel (192.168.178.58)> 221 Goodbye
(000037)22.03.2019 10:19:33 - daniel (192.168.178.58)> disconnected.
(000038)22.03.2019 10:19:46 - (not logged in) (192.168.178.58)> Connected on port 21, sending welcome message...
(000038)22.03.2019 10:19:46 - (not logged in) (192.168.178.58)> 220-FileZilla Server 0.9.60 beta
(000038)22.03.2019 10:19:46 - (not logged in) (192.168.178.58)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(000038)22.03.2019 10:19:46 - (not logged in) (192.168.178.58)> 220 Please visit https://filezilla-project.org/
(000038)22.03.2019 10:19:46 - (not logged in) (192.168.178.58)> USER Daniel
(000038)22.03.2019 10:19:46 - (not logged in) (192.168.178.58)> 331 Password required for daniel
(000038)22.03.2019 10:19:46 - (not logged in) (192.168.178.58)> PASS ******
(000038)22.03.2019 10:19:46 - daniel (192.168.178.58)> 230 Logged on
(000038)22.03.2019 10:19:46 - daniel (192.168.178.58)> TYPE I
(000038)22.03.2019 10:19:46 - daniel (192.168.178.58)> 200 Type set to I
(000038)22.03.2019 10:19:46 - daniel (192.168.178.58)> PASV
(000038)22.03.2019 10:19:46 - daniel (192.168.178.58)> 227 Entering Passive Mode (192,168,178,55,199,157)
(000038)22.03.2019 10:19:46 - daniel (192.168.178.58)> APPE /T_2000.txt
(000038)22.03.2019 10:19:46 - daniel (192.168.178.58)> 150 Opening data channel for file upload to server of "/T_2000.txt", restarting at offset 9
(000038)22.03.2019 10:19:46 - daniel (192.168.178.58)> 226 Successfully transferred "/T_2000.txt"
(000038)22.03.2019 10:19:46 - daniel (192.168.178.58)> QUIT
(000038)22.03.2019 10:19:46 - daniel (192.168.178.58)> 221 Goodbye
(000038)22.03.2019 10:19:46 - daniel (192.168.178.58)> disconnected.
(000039)22.03.2019 10:19:56 - (not logged in) (192.168.178.58)> Connected on port 21, sending welcome message...
(000039)22.03.2019 10:19:56 - (not logged in) (192.168.178.58)> 220-FileZilla Server 0.9.60 beta
(000039)22.03.2019 10:19:56 - (not logged in) (192.168.178.58)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(000039)22.03.2019 10:19:56 - (not logged in) (192.168.178.58)> 220 Please visit https://filezilla-project.org/
(000039)22.03.2019 10:19:56 - (not logged in) (192.168.178.58)> USER Daniel
(000039)22.03.2019 10:19:56 - (not logged in) (192.168.178.58)> 331 Password required for daniel
(000039)22.03.2019 10:19:56 - (not logged in) (192.168.178.58)> PASS ******
(000039)22.03.2019 10:19:56 - daniel (192.168.178.58)> 230 Logged on
(000039)22.03.2019 10:19:56 - daniel (192.168.178.58)> TYPE I
(000039)22.03.2019 10:19:56 - daniel (192.168.178.58)> 200 Type set to I
(000039)22.03.2019 10:19:56 - daniel (192.168.178.58)> PASV
(000039)22.03.2019 10:19:56 - daniel (192.168.178.58)> 227 Entering Passive Mode (192,168,178,55,195,192)
(000039)22.03.2019 10:19:56 - daniel (192.168.178.58)> APPE /T_2000.txt
(000039)22.03.2019 10:19:56 - daniel (192.168.178.58)> 150 Opening data channel for file upload to server of "/T_2000.txt", restarting at offset 12
(000039)22.03.2019 10:21:09 - daniel (192.168.178.58)> 421 Kicked by Administrator
(000039)22.03.2019 10:21:09 - daniel (192.168.178.58)> disconnected.

Any ideas on that?
Thanks for any help.

Re: Append with offset > 9 does not work

Posted: 2019-03-22 10:30
by botg
There's nothing special about 9 or any other offset.

A Wireshark dump of the network traffic would be interesting to see here.

Re: Append with offset > 9 does not work

Posted: 2019-03-22 10:45
by TicTac
Hi, thanks for your reply.

Sure i can do that. I recorded the failed append attemp, but my record has like 1500 entries.
You want me to apply any filters? Or maybe just a specific range of entries? Because i don't really want to post the whole record.

Maybe you can tell me what i should look for?

Re: Append with offset > 9 does not work

Posted: 2019-03-22 16:28
by botg
Everything on the control connection from the PASV command to the 421 reply. Also everything that is happening on the data connection, check the PASV reply to see which port it uses.

Re: Append with offset > 9 does not work

Posted: 2019-03-25 11:18
by TicTac
Hi botg,
as you suggested, i checked the data connection and compared the < 9 offset and >9 offset connection. (see attachments)

For some reasons, the FTP-data are not sent with offset > 9. You need any of these messeges more detailed?

Thanks for all of your help.

Re: Append with offset > 9 does not work

Posted: 2019-03-25 15:12
by botg
What's with the duplicate/out-of-order packets?

Are you using any third-party software firewall?

Re: Append with offset > 9 does not work

Posted: 2019-03-27 09:18
by TicTac
Hi botg,

i have no idea where these packets come from.
But i can show you a detailed view of these packets.

Well i am not quite sure, i can descripe my setup.
I am sending the FTP commands from a SPS via a network adapter to my laptop. The laptop uses a virtual machine where the FileZilla Server is running. The VM has no firewall or anti virus installed, even windows firewall is disabled and all relevant ports are opened. In my host machine there are some firewalls, but the network adapter is directly briged to the VM, so i don't think these host machine firewalls should block anything?

So here is for example the out-of-order packet.

Re: Append with offset > 9 does not work

Posted: 2019-03-27 12:04
by botg
According to the dump the client simply hasn't sent any data on the data connection.
I am sending the FTP commands from a SPS
It's highly likely that it's a client-side problem. PLCs aren't known for having great networking capabilities, quite the opposite actually.

The laptop uses a virtual machine where the FileZilla Server is running. The VM has no firewall or anti virus installed, even windows firewall is disabled and all relevant ports are opened. In my host machine there are some firewalls, but the network adapter is directly briged to the VM, so i don't think these host machine firewalls should block anything?
If it is merely bridged then any host firewalls could still interfere with it. One way around that would be virtualizing the physical network adapter through I/O MMU virtualization, usually available through Intel VT-d or AMD-Vi. I have no idea how to configure any of that though,

Re: Append with offset > 9 does not work

Posted: 2019-03-27 13:18
by TicTac
Yea thats what i thought too, thats really strange.

Ok so you think with my Filezilla Server everything is fine right?
Then i have to check if there is really any firewall in my host machine that blocks the communication.

Anyway thank you a lot for your time. Even if we could not solve the problem, you helped me a lot.
Have a great day.

Re: Append with offset > 9 does not work

Posted: 2019-03-27 13:48
by botg
Ok so you think with my Filezilla Server everything is fine right?
Yes, log and dump show nothing wrong with FileZilla Server.