ALSB FTP Nuance
This was originally posted on my dev2dev blog June 18th, 2008.
One of my customers just recently had an issue with AquaLogic Service Bus's FTP transport. They were attempting to write a file to a remote ftp site using a Business Service, but they kept getting a 553 error from the FTP server. The stack looked similar to this:
com.bea.wli.sb.transports.TransportException: Received error response (553) from FTP server [localhost] IP [127.0.0.1 port [21] status [connected] upon executing command [stor ./data/inbound/somefile.csv] at com.bea.wli.sb.transports.ftp.connector.FTPTransportProvider.sendMessage(FTPTransportProvider.java:399) at com.bea.wli.sb.transports.ftp.connector.FTPTransportProvider.sendMessageAsync(FTPTransportProvider.java:289) at sun.reflect.GeneratedMethodAccessor579.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585)
It turns out that the path on the business service should be relative to the user of the service account of the FTP Business Service based on the directory the user was being placed in upon a successful ftp login.
So the original FTP URI was ftp://locahost:21/data/inbound/
but since a specific user was being used being placed in a user-specific directory by the ftp-server, the URI should have been:
ftp://localhost:21/../../data/inbound
The relative path components are required because the "data" directory is two levels above where the user was being placed. If you encounter this problem and need help from support, reference case 790268 and they should be able to help you out.