We have had a 3rd party working with our Alfresco 4.2 Enterprise system via the FTP interface. They came across a strange issue that caused much head scratching.. I wondered if it was a bug in Alfresco?
The FTP server is running a non-standard port with a defined data-transfer set of ports due to Alfresco running as a non-privileged account.
The 3rd party connected their app to Alfresco without an issue. They needed to CWD to a particular directory, get a file, CWD to a different folder and grab another file. When they tried this with their own internal FTP server mirroring the folder structure it worked fine, but when they tried it on own Alfresco server it failed when CWD to the 2nd folder, Alfresco returned a 550 - can not find path/folder error.
We worked through the issues, trying it on both test, live and staging ALfresco servers, all the same error.. I then set up a quick FileZilla FTP server on a windows box and replicated the folder structure.
The logs were better than the Alfresco ones and showed it connecting, CWD'ing to the first folder, getting the 1st document then attempting to CWD to the 2nd folder, the CWD for this 2nd attempt was:
CWD //<folder>/<folder>/<folder>
The double slash at the start of the folder path was handled by the FTP server without trouble but failed every time with Alfresco.
The only way the app could perform its work was to set their .KeepAlive = false This means that every request requires a new FTP connection.
So the question is, is this behavior correct? I've checked as much as I can but can't find a bug that represents this issue so is it worth filing it as a bug?
Why do you think that spurious directory is valid? Can you refer to an RFC that defines that alfresco should behave differently. If so then please raise a JIRA with full details.h
Update: I've just been reading RFCs. The CWD argument is application specific, so it's up to alfresco to define how it works. Just because one FTP server ignores that error does not mean all should do so.
Still open for discussion, especially if you can back up your argument.
Thanks for that info. I'm happy with the way it works so i'm not going to file a bug, but hopefully by raising it on here means that anyone else who has a similar issue can find a solution.