LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Problem with FTP Script (https://www.linuxquestions.org/questions/linux-general-1/problem-with-ftp-script-207838/)

bmeckle 07-21-2004 08:29 AM

Problem with FTP Script
 
Hello,
I am having problems getting an ftp script to function properly. My script is as follows.

ftp -n -v -d ServerName <<ENDFTP
$FTPUSER:$FTPPASS
asci
get ./*
bye
ENDFTP

When I run it I get the following message.

Connected to ServerName.
220 (vsFTPd 1.2.0)
---> AUTH GSSAPI
530 Please login with USER and PASS.
---> AUTH KERBEROS_V4
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
---> SYST
530 Please login with USER and PASS.
?Invalid command
---> TYPE A
530 Please login with USER and PASS.
local: ./collage.sh remote: ./*
---> PASV
530 Please login with USER and PASS.
Passive mode refused. Turning off passive mode.
---> PORT 174,22,80,249,131,45
530 Please login with USER and PASS.
ftp: bind: Address already in use
---> QUIT
221 Goodbye.

This same script format work on other ftp's.
The server I am trying to connect to is running vsftpd 1.2.2 it was originally running 1.2.0 but I read that this version was better for passive transfer's which is something I need to do.
Any help would be greatly appreciated.

Thanks

bmeckle 07-22-2004 02:28 PM

I found the solution to this problem. Actually I found 2 solutions.

easiest was to just add the -i flag.

ftp -n -i -v -d ServerName <<ENDFTP
$FTPUSER:$FTPPASS
asci
get ./*
bye
ENDFTP

This allowed the connection to go through and the rest of the script to execute.

The other solution I stumbled accross was to use AUTOFTP script to build my shell script.

Either way I got the problem solved.


All times are GMT -5. The time now is 03:51 PM.