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.

11
  • 1
    "I try to create FTP connection via Trump" ... that's not possible anymore since Jan 20th. 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. 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 9:49
  • Honestly, this needs debugging. Not possible on SX. Pls contact us via the tramp-devel@gnu.org ML. 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
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".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.