Open pbtura opened 2 years ago
Quick update. I also tried doing the command in Ubuntu 20.04 and got the same results.
Please try cls command in the same directory to check if the file listing can be parsed successfully.
On Thu, 3 Feb 2022 at 18:21, pbtura @.***> wrote:
Quick update. I also tried doing the command in Ubuntu 20.04 and got the same results.
— Reply to this email directly, view it on GitHub https://github.com/lavv17/lftp/issues/659#issuecomment-1029099000, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHLWXB4VXHZFWUES2KLOH3UZKMONANCNFSM5NMK6WYQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Alexander.
Interesting results. Doing an 'ls' on that directory works fine but 'cls' runs into the same error as 'mirror'. I also tried a different directory with fewer files and got the same results.
Please try cls command in the same directory to check if the file listing can be parsed successfully. On Thu, 3 Feb 2022 at 18:21, pbtura @.> wrote: Quick update. I also tried doing the command in Ubuntu 20.04 and got the same results. — Reply to this email directly, view it on GitHub <#659 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHLWXB4VXHZFWUES2KLOH3UZKMONANCNFSM5NMK6WYQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.Message ID: @.> -- Alexander.
I did some digging into the source code. From what I can tell, there is something off about the behaviour of the Ftp::ParseLongList() method of the FtpListInfo class. If I connect to a remote unix server, it will figure out the correct line parser and return the parsed data. However, if I try to connect to a non-unix server (MSLD in our case), the data will get parsed, but the code to store the current parser as the 'guessed_parser' never gets called. As a result, when it gets to the end of the method, the parser and output data have not been stored, so it returns an empty list.
Digging deeper I found some odd behaviour in ParseFtpLongList_UNIX(). Since the remote server is NOT unix based, in theory this parser should result in an error. However, MSLD returns file info strings formatted like "size=0;modify=20220118175102;create=20191127173656;perm=cpledf;type=dir; ." . When ParseFtpLongList_UNIX checks the line it calls
if(strchr("bcpsD",line[0])) // block, char, pipe, socket, Door.
return 0;
Since the first character of the line is 's' it treats it as a socket and returns 0 rather than attempting the parse and returning an error. I commented out that line and re-ran my command and it printed the contents of the directory.
I'm trying to use mirror to copy some files from a remote server to a local folder. I can connect to the ftp and run other commands successfully. When I try to do 'mirror -c' however, the command does not produce any results. None of the requested files are copied to local. I had another person on our team run the same command to make sure it wasn't a local configuration issue and they got the same results.
To see if I could locate the source of the problems, I ran an strace command: strace -f -yy -e trace=file -q -o lftp.strace . Looking at the results, I suspect the problem is related to timezone in some way. The command is repeatedly trying to stat /etc/localtime before timing out. I will include the stacktrace results below.
Environment: Ubuntu 18.04 LFTP 4.8.1
(repeats several thousand times)