I'm trying to write script to fetch few files from freeFTPd SFTP-server with Tectia SCPg3 (or SFTPg3) -client.
It works well, if I define exact filename to my script, but there is some issue with the wildcards..
Below are some logs taken from SFTP, connected with debug level 3:
If I understand that correct, it seems like directory listing is working anyway, because there is 3 times line: "SecshFtTree/secshfttree_internal.c:4141: Unknown file attribute type: 5.", and there is 3 files matching to pattern *.txt in source folder. Can someone tell me what means message "unknown file attribute type: 5?"
On freeFTPd's side I can't find anything helpful from logs, there is all it logged from below session:
With psftp-client mget-command works as expected:
I would very much appreciate any help or guidance with this, thank you in advance!
It seems to me that freeSSHd does not send file type in file attributes (permissions -- S_IFMT) when responding to readdir request. It does indicate a directory, but not files. Tectia file transfer clients refuse to transfer entities with unknown type. That is when using mget *.txt.
When doing get test1.txt, client issues 'stat' request. freeSSHd server replies with file type set to S_IFREG as expected. And everything works fine.
So I guess it is an inter-operability issue. Tectia file transfer clients could be more permissive and try to do as much as they can with object of unkown type -- assuming they are regular files. freeSSHd should, perhaps, claim file type in attributes returned in response to readdir request (FXP_NAME), especially when it knows the type.
But I may be wrong, I did just quick debugging session...
BTW: as you probably know, the opposite direction: put, works fine at least with similar test case.
answered Dec 24 '14 at 00:23
Martin Dobsik ♦
Developer of freeFTPd published new version of his software (1.0.13), now it works as expected. Thank you for your help Martin, it probably guided him to right direction.
answered Jan 18 '15 at 19:03