tomaswolf commented on issue #489: URL: https://github.com/apache/mina-sshd/issues/489#issuecomment-2078224203
OK. Findings: 1. This server sends longname as `-rw-rw-rw 1 root root 1944 Apr 24 14:58 demo.csv` (just before offset 288) 2. This is then followed by flags 0x00_00_00_0F: we have size, uid/gid, permissions, and access and modification time. - Size is 0x00_00_00_00_00_00_07_98, i.e. 1944 bytes - UID = 0x00_00_00_00, GID = 0x00_00_00_00 - Permissions = 0x00_00_01_B6 (438, rw-rw-rw-) - Access and modification times (both are equal, two 4-byte unsigned ints, seconds since Unix Epoch) So far, so bad. The server indeed does not send the "file type" flags in "permissions". And moreover, its "longname" looks strange. I would have expected it to start with "-rw-rw-rw-", not with "-rw-rw-rw ". WinSCP indeed parses "longname". It assumes that the first character of the longname gives the item type: '-' for a regular file, 'l' for a symbolic link, and 'd' for a directory (case insensitive). I suppose we should do so, too, at least if it's SFTP V3 and the permissions don't give the file type. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org