Article delegate-en/3377 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A3337@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: Constructing a virtual origin FTP server fails on symlinks crossing "MOUNT=" points
10 Jul 2006 08:03:19 GMT Steffen Kaiser <p44eqbdyi-t7hpjikdobxr.ml@ml.delegate.org>


On Tue, 27 Jun 2006, Yutaka Sato wrote:

Hello,

> Maybe what you need can be realized as "static manual MOUNTs" like this:

> [/var/tmp/ftp]
>  drwxr-xr-x  2 root  root 4096 Jun 21 14:19 pub/
>  drwxr-xr-x  1 root  root 4096 Jun 21 14:19 debian/
>
> [DeleGate parameters]
>  MOUNT="/                /var/tmp/ftp/*"
>  MOUNT="/pub/*           ftp://ftp2/mnt/mirror/pub/*"
>  MOUNT="/debian/*        ftp://ftp2/mnt/mirror/pub/debian/*"


Ah, this works!
I've prepended the call of delegate with a little script that creates a 
MOUNT=+=file from the content, works well, esp. because the content of the 
directory is almost static.

> Several ways to configure this MOUNT dynamically and/or automatically can
> be figured out, but I'm not sure if symbolic link (or shortcut on Win)

What automatic ways can it be? The += is static, correct? The manual does 
not make me believe that you can use a script here. the -=URL syntax won't 
work for me, as I would need a webserver and some sort of CGI.
I think you mean something like MOUNT=+=program?

Then I have some problems accessing the remote site via the FTP gateway.
(I used a FTPCONF=noxdc and also removed the MASTER= switch, and found no 
change.)

on proxy:
         $demon SERVER=ftp       \
                 -P21 \
                MASTER=ux-2s04:11011 \
                 MOUNT=+=$tfil \
                 TIMEOUT=restart:1d \
                 PERMIT=*:*:194.95.66.18,127.0.0.0/8,10.20.10.0/24       \
                 CACHE=no        \

I can remove the MASTER= option to no avail.

on master/ftp server:
        $demon -P21 SERVER=ftp \
                MOUNT="/pub/* /mnt/mirror/pub/*" \
                MOUNT="/ /var/ftp/*" \
                TIMEOUT=restart:1d \
                PERMIT=+=$etcdir/permit.ftp     \
                CACHE=no        \


When I use the command:

$ ftp ftp
<<login>>
> dir /pub
I do not get no listing,
> dir /pub
I do get the listing.

$ ftp ftp
> cd /pub
> dir
I get the listing.

Same is with ncftp.

wget do work:
   434  wget -o log -d -S -nr  --follow-ftp ftp://ftp/pub/
   435  wget -o log -d -S -nr  --follow-ftp --passive-ftp  ftp://ftp/pub/

KDE's konqueror v3.3.2 (direct connection to the Delegate proxy, _no_ web 
proxy (aka squid) in between). Gives me different replies (not the exact 
wording), sometimes "server broke connection", "cannot read", "empty 
replay", "could not connect to host ftp" ... .
The only stuff I find unusual in the logs is this:

07/10 09:47:50.11 [14147] 4+0/18/6: ## dgbind = 
/var/spool/delegate/subin/dgbind
07/10 09:47:50.12 [14147] 4+0/18/6: ## ftp-conndata: NOT bound#1 err=13
07/10 09:47:50.12 [14147] 4+0/18/6: ftp_conndata: connection refused 
10.20.10.6:34977->pc-2m63/10.20.10.63:39560, errno=111

However, there is no indication that above is logged for the _first_ time, 
konqueror connects to the proxy. They are logged only, when I reload the 
page. The Master is connected during the access.

When I do this (knoqueror):

open ftp://ftp/ -> I see the (virtual) root
then I click on some subdirectory and I get "Cannot enter folder" and the 
Delegate proxy logs:

07/10 09:52:07.03 [14278] 6+0/12/4: MOUNTED REMOTE [-la] -> 
[ftp://ux-2s04/pub/debian-non-US][-la]
07/10 09:52:07.03 [14278] 6+0/12/4: [430]150 Opening BINARY mode data 
connection for list (430 bytes).^M
07/10 09:52:13.42 [14209] 5+0/32/13: ## accept([19]:35043) failed polling, 
errno=0
07/10 09:52:13.42 [14209] 5+0/32/13: FTP ACCEPT_TIMEOUT 30
07/10 09:52:13.42 [14209] 5+0/32/13: [383]150 Opening BINARY mode data 
connection for list (383 bytes).^M
07/10 09:52:13.42 [14209] 5+0/32/13: ## accept([-1]:0) failed polling, 
errno=9
07/10 09:52:13.42 [14209] 5+0/32/13: FTP ACCEPT_TIMEOUT 30
07/10 09:52:13.42 [14209] 5+0/33/13: FTP-control-remote: 10.20.10.6:21 
[29]
07/10 09:52:13.42 [14209] 5+0/33/13: cannot make FTP data port: no control 
conn-2.
07/10 09:52:13.42 [14209] 5+0/33/13: abort: caught SIGPIPE

Sometimes, this is all the Delegate proxy logs:

07/10 09:53:54.51 [14290] 7+0/8: *** /pub/ => ftp://ux-2s04/pub/ ***
07/10 09:53:54.51 [14290] 7+0/8: MOUNTED-TO: //ux-2s04/pub/
07/10 09:53:54.51 [14290] 7+0/8: FTP LOGIN FROM pc-2m63 TO 
anonymous@ux-2s04
07/10 09:53:54.51 [14290] 7+0/8: PATH: 
ftp://ux-2s04:21!ux-2s03.inf.fh-bonn-rhein-sieg.de:21!pc-2m63:49684!anonymous@pc-2m63;1152518029
07/10 09:53:54.52 [14290] 7+0/8: FTP server ftp://ux-2s04:21/
07/10 09:53:54.52 [14290] 7+0/8: FTPHOPS: 1 [9/35 - -1/-1]
07/10 09:53:54.52 [14290] 7+0/8: MasterOpen connected [18] 
{194.95.66.21:11011 <- 194.95.66.18:35081} [0.000s]
07/10 09:53:54.52 [14290] 7+0/8: willSTLS_SV: ServerFlags=10
07/10 09:53:54.53 [14290] 7+0/8: MASTER[1] says(1): DeleGate-HELLO 
9.2.3-pre9 <11487.1152518034@ux-2s04..>^M
07/10 09:53:54.53 [14290] 7+0/8: forwarding to [18] 
delegate://ux-2s04.inf.fh-bonn-rhein-sieg.de:11011
07/10 09:53:54.54 [14290] 7+0/8: MASTER[1] says(2): 200 OK: good^M
07/10 09:53:54.54 [14290] 7+0/8: willSTLS_SV: ServerFlags=10
07/10 09:53:54.58 [14290] 7+0/8: willSTLS_SV: ServerFlags=10
07/10 09:53:54.58 [14290] 7+0/8: LoginPWD: "/"
07/10 09:53:54.59 [14290] 7+0/9/1: FTP-control-remote: 10.20.10.6:21 [35]
07/10 09:53:54.59 [14290] 7+0/9/1: FTP-data-local[19]: 10.20.10.6:35082
07/10 09:53:54.59 [14290] 7+0/9/1: ftp_conndata: connected 
194.95.66.18:35080->ux-2s04.inf.fh-bonn-rhein-sieg.de/194.95.66.21:59290 
[20](0.0)
07/10 09:53:54.59 [14290] 7+0/9/1: -- with PASV
07/10 09:53:54.59 [14290] 7+0/9/1: PASV [B][10,20,10,6,137,10] >> 227 
Entering Passive Mode (10,20,10,6,137,10).^M
07/10 09:53:54.59 [14290] 7+0/10/2: ## discard previous (unused) PASV 
sock: 19 -> 21
07/10 09:53:54.60 [14290] 7+0/10/2: PASV [A][|||35082|] >> 229 Entering 
Extended Passive Mode (|||35082|)^M
07/10 09:53:54.60 [14290] 7+0/11/3: #### DSV[-1] PSV[20]
07/10 09:53:54.60 [14290] 7+0/11/3: PORT [|1|10.20.10.63|32819|] >> 200 
PORT command successful [reusing].^M
07/10 09:53:54.60 [14290] 7+0/12/4: MOUNT DIRMATCH patn[pub/] url[pub] 3
07/10 09:53:54.60 [14290] 7+0/12/4: *** /pub/ => ftp://ux-2s04/pub/ ***
07/10 09:53:54.60 [14290] 7+0/12/4: MOUNTED REMOTE [-la] -> 
[ftp://ux-2s04/pub][-la]
07/10 09:53:54.61 [14290] 7+0/12/4: [3219]150 Opening BINARY mode data 
connection for list (3219 bytes).^M
07/10 09:54:24.61 [14290] 7+0/12/4: ## accept([19]:35082) failed polling, 
errno=0
07/10 09:54:24.61 [14290] 7+0/12/4: FTP ACCEPT_TIMEOUT 30
07/10 09:54:24.61 [14290] 7+0/13/4: FTP-control-remote: 10.20.10.6:21 [35]
07/10 09:54:24.61 [14290] 7+0/13/4: FTP-data-local[18]: 10.20.10.6:35085
07/10 09:54:24.61 [14290] 7+0/13/4: PASV [X][10,20,10,6,137,13] >> 227 
Entering Passive Mode (10,20,10,6,137,13).^M
07/10 09:54:24.61 [14290] 7+0/14/4: *** / => file://localhost/var/tmp/ftp/ 
***
07/10 09:54:24.61 [14290] 7+0/14/4: *** / => file://localhost/var/tmp/ftp/ 
***
07/10 09:54:24.61 [14290] 7+0/14/4: FTP-LOCAL: accepting client's PASV 
10,20,10,6,137,13

BUT: Mozilla 1.7.8 is working ?!

At 
http://www2.inf.fh-bonn-rhein-sieg.de/skdata/log9.2.3-pre9.FTP_probs.tgz 
you'll find, the logs of the Delegate proxy and master for:

+ access ftp://ftp/pub/ via konqueror (failed),
+ dito mozilla (OK),
+ dito plain ftp (failed) and
+ dito wget (OK).

Bye.

-- 

Steffen Kaiser

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