0

I try to create FTP connection via Tramp, but the output I get on AngeFTP is:

ftp> open android.local
ftp: Can't connect to `192.168.0.21:21': Connection refused
ftp: Can't connect to `android.local:ftp'
ftp> 

I have tried many different options, but nothing works. SFTP works fine, but I can't get FTP working. Here is my config:

/etc/hosts

192.168.0.21 android.local

~/.netrc

machine android.local
    login foo
    password foo
    port 2221

init.el

(set-register ?a (cons 'file "/ftp:foo@android.local:#2221:/storage/0123-4567"))

Any ideas?


EDIT: I was able to connect via ftp client from the terminal (outside Tramp) with the command ftp ftp://foo:foo@192.168.0.21:2221, but can't replicate that via Tramp.

Navidot
  • 732
  • 5
  • 12
  • 1
    "I try to create FTP connection via Trump" ... that's not possible anymore since Jan 20th. – Michael Albinus Jan 30 '21 at 18:43
  • Seriously: your FTP server seems to be located on an Android device. Are you able to connect with a vanilla FTP client, from a shell? And, btw, I'm not sure that Ange-FTP is able to read multiple line .netrc entries. – Michael Albinus Jan 30 '21 at 18:44
  • @MichaelAlbinus yes, I found it best, OS agnostic way to transfer files to Android devices. I used to use FileZilla for this, but it would be easier by just using Tramp. Obviously you need FTP server app. – Navidot Jan 31 '21 at 09:49
  • Honestly, this needs debugging. Not possible on SX. Pls contact us via the `tramp-devel@gnu.org` ML. – Michael Albinus Jan 31 '21 at 14:30
  • Ok. Can you tell what I should put into the message, if the copy of this post will be sufficient? – Navidot Jan 31 '21 at 16:08
  • Yes, even a reference to this discussion would do. The point is, that email exchange is better suited to give you instructions for tests. – Michael Albinus Jan 31 '21 at 17:45
  • Sorry, I'm a bit confused. You said that "creating FTP connection via Trump is not possible since Jan 20th.", but you want me to leave a message on ML about it as it would be possible. I don't want to waste anybody time, if this kind of connection is not possible. I was able to connect to FTP using terminal client outside Emacs, I updated the post with information. – Navidot Feb 01 '21 at 08:36
  • Please read letter-by-letter what I have said :-) And think about the date, what happened then. – Michael Albinus Feb 01 '21 at 10:38
  • I read entire conversation but if the FTP is not supported I don't understand what needs debugging in your opinion. – Navidot Feb 02 '21 at 17:13
  • Oh my god. You have said initially "I try to create FTP connection via Trump", and I made a joke (I thought) saying, that this what-so-ever person in not related to Tramp. – Michael Albinus Feb 03 '21 at 08:52
  • Haha ok sorry, yes, I made a typo which I fixed a day later. I'm not US person. I thought you are referring to the information I read over the internet that FTP is now handled by AngeFtp so Tramp FTP support was abandoned. I will send a report then. Thanks for clarification. – Navidot Feb 03 '21 at 10:11

1 Answers1

1

There is a syntax error in the example. "/ftp:foo@android.local:#2221:/storage/0123-4567" must be "/ftp:foo@android.local#2221:/storage/0123-4567".

Michael Albinus
  • 6,647
  • 14
  • 20