Article delegate-en/3180 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]

Newsgroups: mail-lists.delegate-en

[DeleGate-En] delegate strips leading slash for ftp absolute paths
06 Apr 2006 23:16:54 GMT

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/

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/
--19:09:04--  ftp://userxyz:*password*@delegateHost/ftproot/z/y/z/
           => `'
Resolving delegateHost ...
Connecting to delegateHost||: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.

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]