[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: ftp oddities

Katsumi Yamaoka <yamaoka@jpl.org> wrote:
>>>>>> In [emacs-w3m : No.07963] Elias Oltmanns wrote:
>> Hi altogether,
>> I just noticed that emacs-w3m's ftp implementation seems to be rather
>> odd. Since I'm behind a firewall, I use
>> (setq ange-ftp-try-passive-mode t)
> I'm normally behind the firewall but I've never needed that.
> I tried it and I got an error at the first time about to connect
> to the ftp server using ange-ftp, not emacs-w3m.  This is an
> error, not a warning.  Even so, the ftp connection was still
> activated then, so I was successful to list the remote directory
> for the second time.
>> However, as long as w3m-use-ange-ftp is nil, the following message
>> appears in the echo area when I go to ftp://ftp.gwdg.de/pub/
>> Cannot retrieve URL: ftp://ftp.gwdg.de/pub/ (exit status: 0)
> Probably, it is because the firewall doesn't allow the ftp
> connection or you haven't set the ftp_proxy environment variable.
> I've set ftp_proxy as the same value as http_proxy.

The firewall does allow every outgoing and established as well as
related incoming connections. Thus it is no problem to access the site
in question just using w3m or ftp.

>> Yet, the contents of the directory is listed correctly and I can
>> browse the ftp-server without any difficulties.
> I'm confused.  Is it a problem related to emacs-w3m?  In other
> words, did you write about when you used emacs-w3m, setting
> w3m-use-ange-ftp as t?  Emacs-w3m uses neither ange-ftp nor
> ange-ftp-try-passive-mode if w3m-use-ange-ftp is nil.  In the
> case where you used emacs-w3m, setting w3m-use-ange-ftp as t, it
> will stop if the value of ange-ftp-try-passive-mode is not
> suitable to the connection, because of an error.

w3m-use-ange-ftp was still nil. Now, here is a bit more detailed
With w3m-use-ange-ftp nil and no ange-ftp-* variables set or changed
(in particular ange-ftp-try-passive-mode nil) as well as no proxy
variables set (I don't need them) I do m-x w3m RET g
ftp://ftp.gwdg.de/ RET.
Although the contents of ftp.gwdg.de's root directory is displayed
correctly, I hear a beep as if something went wrong. In the echo area
appears "Loading ange-ftp...done" despite the fact that I (as
mentioned before) had set w3m-use-ange-ftp nil.
Then I move point to the subdirectory link pub/ and press enter. Again
I get a beep but this time the directory is not displayed
properly. Instead nothing changes on the display (contents of the root
directory remains visible) and in the echo area appears the message
"FTP Error: DIR failed: 425 Can't build data connection: Connection refused."
The relevant part of the *Messages* buffer after the whole procedure
reads like this:
Loading ange-ftp...done
Opening FTP connection to ftp.gwdg.de...done
Logging in as user anonymous@ftp.gwdg.de...done
Getting PWD...done
Listing /anonymous@ftp.gwdg.de:/... [2 times]
ange-ftp-error: FTP Error: DIR failed: 425 Can't build data connection: Connection refused.

If I alter ange-ftp-try-passive-mode to t (w3m-use-ange-ftp is still
nil), I can browse the ftp-server but get a beep and the message
saying "Cannot retrieve URL: [...] (exist status 0)" every time I
follow a link.