The FTP.CFG file doesn't seem to work

Aug 28, 2008
127
4
I might not be doing something right, but I can't seem to get the FTP.CFG file to work as specified in the documentation. I've added my FTP site to it in the format specified:

ftp://myftpsite.com (alias) userid password

If I execute a dir command as follows it works:


But when I use the following it doesn't:

dir "ftp://alias/*"

Or really any variant involving either the alias or the full blown site. For example, this also fails:

dir "ftp://myftpsite.com/*"

In short, I seem to have to include the user ID and password explicitly in every command line for such commands to work. Help?!
 
Aug 28, 2008
127
4
Yes, I should have mentioned that. I also should have mentioned that the error I get is "TCC: FTP protocol error: 530 Login incorrect." followed by the name of the URL if I'm using the full-blown thing. If I simply use the alias, all I get is TCC: [11001] Host not found "alias"
 
May 20, 2008
11,918
124
Syracuse, NY, USA
I had never tried using FTP.CFG before. It was fairly easy to get it to work. Of course I first had to create the user (vefatica22) on the server and give him access to his home directory (d:\anonymous). After that was done, I put this in FTP.CFG.

Code:
ftp://vefatica.net (veftp) vefatica22 password

Quite simply, it worked:

Code:
d:\tc28> dir "ftp://veftp/*"

 Directory of  ftp://veftp/*

2019-10-12  00:00         <DIR>    4plugins
2014-08-08  00:00       3,657,325  arnex4.JPG
2021-10-01  10:58         121,573  pset3264.zip
2021-02-17  00:00          45,706  shellex.zip
           3,824,604 bytes in 3 files and 1 dir

And this shows that the info in FTP.CFG was used:

Code:
d:\tc28> iftp /v veftp
Connecting to FTP server at 74.111.37.82:21.
Connected.
220 Serv-U FTP Server v14.0 ready...
USER vefatica22
331 User name okay, need password.
230 User logged in, proceed.
PWD
257 "/" is current directory.

d:\tc28> dir ftp:
PWD
257 "/" is current directory.

PWD
257 "/" is current directory.
PWD
257 "/" is current directory.
PASV
227 Entering Passive Mode (74,111,37,82,200,185)
LIST
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete. 269 bytes transferred. 0.26 KB/sec.
 Directory of  ftp://vefatica.net/*

2019-10-12  00:00         <DIR>    4plugins
2014-08-08  00:00       3,657,325  arnex4.JPG
2021-10-01  10:58         121,573  pset3264.zip
2021-02-17  00:00          45,706  shellex.zip
           3,824,604 bytes in 3 files and 1 dir

d:\tc28>
 
Aug 28, 2008
127
4
I think I figured it out. For anyone else who runs into this issues, be aware that there might be an issue connecting to an FTP server that supports both regular FTP and SFTP. Every other FTP client I use will work via a regular FTP connection or an SFTP connection, but I can't get TakeCommand to use the regular FTP connection at all. I have to specify the secure version similar to the following: dir "sftp://alias/*"

It also seems the sync command won't accept a directory argument of that form, though that might be intentional. Though it turns out it wouldn't work for my purpose anyway, because doing a directory of the SFTP folder I was hoping to sync using TakeCommand gets only the file calendar date and not the times. I suspect that's related to a known Windows Explorer bug with FTP.

What a mess!
 
Aug 23, 2010
678
9
Do not confuse SFTP with FTPS ! These are entirely different protocols.
FTPS is a secure variant of FTP, while SFTP is an SSH based successor of SCP.
 

Similar threads

C
Replies
1
Views
2K