I'm using delegate to proxy ftp requests to a remote server, but hit a problem. I am running delegate with the following config:
/usr/bin/delegated -f -P21 SERVER=ftp PERMIT="*:*:*" REMITTABLE="*" MOUNT="/ftproot* ftp://ftphost/ftproot/* " "
I can sucessfully loging and cd around manually and get a file, however, when I use some tool (wget, ncftpget, and others for example), such as:
wget ftp://userxyz:pass123@delegatehost/ftproot/x/y/z/file.zip
it fails with a file not found. This seems to occur becuase the leading slash that makes this an absolute path is being stripped by delegate.. If I log into the ftp server direclty, it puts me in my home directory (/home/userxyz) by default and since delegate is stripping the leading slash, is trying to issue a cwd ftproot/x/y/z from my home directory for an absolute path of /home/userxyz/ftproot/x/y/z which of course doesnt exist. This is the raw output of the above wget command:
====================================================
~ > wget ftp://userxyz:pass123@delegateHost/ftproot/x/y/z/file.zip
--19:09:04-- ftp://userxyz:*password*@delegateHost/ftproot/z/y/z/file.zip
=> `file.zip'
Resolving delegateHost ... 1.2.3.4
Connecting to delegateHost|1.2.3.4|:21... connected.
Logging in as userxyz ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD /ftproot/x/y/z ...
No such directory `ftproot/x/y/z'.
=====================================================
Note wget first reports it is getting the full absolute path with the leading slash:
==> TYPE I ... done. ==> CWD /ftproot/x/y/z ...
But the error message that comes back from the server lacks the leading slash:
No such directory `ftproot/x/y/z'.
If I simply change my the hostname in the wget to go direcly to ftphost rather than through delegate, it works successfully, so I think delegate has a bug where leading slashes are stripped off incorrectly.
Anthony