So apparently Apple has (stupidly) dropped support for "insecure" Unix commands such as telnet
, ftp
, etc. in 10.13, or "High Sierra" (see these threads for more info). Unfortunately, I use Dired as an ftp
client to lists.gnu.org. So, to compensate for the loss of BSD's ftp
, I installed the GNU inetutils
from homebrew:
brew install inetutils
However, GNU's ftp
seems to behave quite differently. For starters, I now have to explicitly provide a username and "password" and turn on passive mode. For example:
C-x C-f /ftp:[email protected]:
ftp> open lists.gnu.org
open lists.gnu.org
Connected to lists.gnu.org.
220 Welcome to lists.gnu.org MBOX FTP service.
ftp> ls
ls
530 Please login with USER and PASS.
530 Please login with USER and PASS.
530 Please login with USER and PASS.
ftp> user ftp
user ftp
331 Please specify the password.
Password: [email protected]
230 Login successful.
ftp> ls
ls
500 Illegal PORT command.
500 Unknown command.
ftp> passive
passive
Passive mode on.
ftp> ls
ls
227 Entering Passive Mode (208,118,235,17,81,10).
150 Here comes the directory listing.
drwxr-xr-x 2 500 500 4096 Mar 08 2012 123tkshop-announce
drwxr-xr-x 2 500 500 4096 Jan 08 2007 123tkshop-bugs
drwxr-xr-x 2 500 500 4096 Jan 05 2007 123tkshop-devoloper
...
226 Directory send OK.
ftp>
Previously, with BSD's ftp
, all of this login stuff would automatically happen when I tried to connect.
Yet even though ls
now works in the ftp
command prompt, I cannot get a Dired buffer for the remote host. Even after I've logged in (as above), when I try to run find-file
on /ftp:[email protected]:
I get the following errors in *Messages*
:
Getting PWD... [8 times]
tramp-file-name-handler: Unable to obtain CWD
And I see the following in the ftp
command prompt:
ftp> pwd
pwd
pwd
pwd
pwd
pwd
pwd
pwd
pwd
pwd
pwd
pwd
pwd
pwd
pwd
pwd
257 "/"
ftp> 257 "/"
ftp> 257 "/"
ftp> 257 "/"
ftp> 257 "/"
ftp> 257 "/"
ftp> 257 "/"
ftp> 257 "/"
ftp>
And I get no Dired buffer for the remote host.
So my question is: How can I use Dired to interact with ftp
hosts on OS X 10.13?
PS:
I noticed that these issues do not occur in Emacs on Ubuntu. And for good measure, I copied BSD's ftp
from another Mac and verified that none of these issues occur when I use that instead of GNU's ftp
.
I am using Emacs 25.3 (on both my OS X and Ubuntu systems).
ftp
would work great with Emacs. I'll make a post on thebug-gnu-emacs
mailing list and see if this is a problem with the macOS port of Emacs. Also, here is FreeBSD'sftp
, although it may be different from Apple'sftp
.(setq ange-ftp-ftp-program-args '("-i" "-g" "-v"))
. However, yes: Appleftp
works totally fine, so there must be something wrong with GNUftp
. Or, at least, with the way that Emacs is treating it.bug-gnu-emacs
in case this is a problem with the Emacs build for macOS.