help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Ange-ftp: passive mode transfers?


From: Ehud Karni
Subject: Re: Ange-ftp: passive mode transfers?
Date: Wed, 18 Apr 2001 19:45:08 +0300

On Mon, 16 Apr 2001 14:24:07 +0530, Lord Emsworth <lordemsworthx@yahoo.com> 
wrote:
> 
> I regularly use Emacs to access remote files. Everything was working 
> fine. However, recently, some of our computers (including mine) were put 
> behind a firewall, while some weren't (including those on which I used 
> to access files).
> 
> Ange-ftp no longer works for data transfer (though it works fine with 
> control commands). This is because of the firewall. Is there any 
> setting/configuration I can change to enable passive data transfers with 
> Ange-ftp?

The solution is to send the PASV command. Here is my lisp code:

(defvar ange-ftp-pasv-on-hosts '(
           "sun" "dew" "ims" "fog" "ice" "smt-db" "rain" "smt-com"     ;; Shamat
           "swnt" "swnt-mail" swnt-sms" swnt-bak" "nwsw"               ;; NT 
servers (TA)
           "linux"  "ulnx01" "ulnx02" "ulnx03" "ulnx04" "ulnx05"       ;; UNIX 
& LINUX servers
           )
  "List of hosts that do not need pasv (within the firewall)" )


(defun ange-ftp-set-passive ()
"can be run only in when proc is dynamicly linked (startup)."
       (if (not (member host ange-ftp-pasv-on-hosts))
           (ange-ftp-raw-send-cmd proc "passive")))


(add-hook 'ange-ftp-process-startup-hook 'ange-ftp-set-passive)

Note: I have the `ange-ftp-pasv-on-hosts' because I have many computers
    within our firewall and some of them could not handle the "PASV" 
    command. If you want to work ALWAYS in passive mode you can dispose
    of this variable and its check.

Ehud.


-- 
 Ehud Karni  Simon Mivtach Insurance agency  /"\
 Tel: +972-3-6212-757  Fax: +972-3-6292-544  \ /  ASCII Ribbon Campaign
 (USA) Fax  and  voice  mail: 1-815-5509341   X   Against HTML Mail
 Better     Safe     Than     Sorry          / \
 mailto:ehud@unix.simonwiesel.co.il        http://www.simonwiesel.co.il




reply via email to

[Prev in Thread] Current Thread [Next in Thread]