FTP file time issue with FFS 10.17

Get help for specific problems
Servatius
Posts: 3
Joined: 9 Nov 2019

Post by Servatius • 09 Nov 2019, 11:34

I have an issue similar to the one described here: viewtopic.php?t=5780.

I want to synchronize some hundred PDF files from an iPad to a Windows PC. For the majority of the files, the time is cut to midnight and shown as 01:00:00 due to the time zone (CET) or as 02:00:00 when the modification date was in a daylight saving time period. For the rest of the files (about 3 percent), the time is cut to the minute so that only the second is zeroed, but again 1 or 2 is added to the hour.

Both FileZilla and WinSCP show all times correctly (local time as shown on the PC sync directory).

The FTP server I use on the iPad is either FTPManager or FE File Explorer (both are free, from Skyjos Co., Ltd.). If you don't have the opportunity to test with an iPad, is there a possibility to increase logging so that you can see what the server sends?

User avatar
Zenju
Site Admin
Posts: 5125
Joined: 9 Dec 2007

Post by Zenju • 09 Nov 2019, 13:08

Do you know how to use Wireshark? If so, just enter "FTP" into the display filter to only show the FTP traffic. The response to the FEAT command will be interesting.

Or just enter "FEAT" in FileZilla as a custom command.

Servatius
Posts: 3
Joined: 9 Nov 2019

Post by Servatius • 09 Nov 2019, 15:54

Thanks a lot for the quick reply.

FEAT is
Command:	FEAT
Response:	211-Extensions supported:
Response:	 MDTM
Response:	 MFMT
Response:	 SIZE
Response:	 MLSD
Response:	 PASV
Response:	 EPSV
Response:	 UTF8
Response:	211 End
Status:	Connection closed by server
When filtering for ftp-data, Wireshark shows for the majority of files that the server sends just the date without time, but for files from the current year, it replaces the year by the hour and minute (in local time):
-rw-r--r--     0 mobile mobile     937004 Jul 19 2015 Helios MiniVent M1.pdf\n
-rw-r--r--     0 mobile mobile     580975 Apr 12 14:23 Helios Service Checkliste M1.pdf\n
The time sent (14:23) is already local (CES with DST at that date), but FFS seems to interpret the time as UTC and adds 2 more hours, showing 16:23:00.

When I access the server with FileZilla, Wireshark shows the following response:
type=file;size=937004;modify=20150719153735; Helios MiniVent M1.pdf\n
type=file;size=580975;modify=20190412122330; Helios Service Checkliste M1.pdf\n
These are full UTC timestamps including hour, minute, and second.

So the question is what is the difference in the requests so that the server sends different responses for FreeFileSync and FileZilla.

After the CWD command, FFS uses the LIST command, but FZ uses the MLSD command. This explains the different responses (see also here: https://stackoverflow.com/questions/40321519/ftp-server-directory-listing-formats).

Would it be possible that FreeFileSync uses MLSD if it is listed with the FEAT command (and LIST otherwise)?

User avatar
Zenju
Site Admin
Posts: 5125
Joined: 9 Dec 2007

Post by Zenju • 09 Nov 2019, 21:19

The server incorrectly implements RFC3659, but FZ and WinSCP have workarounds to accept the invalid FEAT response. ("there is no distinct FEAT output for MLSD. The presence of the MLST feature indicates that both MLST and MLSD are supported")

Anyway, FFS joins the club and accepts this non-conforming FEAT: https://www.mediafire.com/file/yisw58scp7f1ppb/FreeFileSync_10.18_%5BBeta%5D_Windows_Setup.exe

Servatius
Posts: 3
Joined: 9 Nov 2019

Post by Servatius • 09 Nov 2019, 22:20

Thank you very much for the quick workaround. FFS now shows the full timestamps!