Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-08-2005, 12:08 PM   #1
Registered: Aug 2003
Posts: 36

Rep: Reputation: 15
Very Strange FTP script problem ???

Hi Folks,

I am trying to upload a file to a ftp server via cron. The script fails with the following error .

Server1 # ./ftprunner.orig
Connected to XYSW.YXTQ.
220-FTPTCPD1 IBM FTP CS V1R5 at XYSW.YXTQ, 11:55:32 on 2005-08-08.
220 Connection will close if idle for more than 5 minutes.
---> USER john
421 Service not available, remote server timed out. Connection closed
Login failed.
Not connected.
Not connected.

If i ftp manually , i can upload the server without any problems using the same userid and passwd. So it is not permissions.

Here is the script , (user is john, with passwd john123)
ftp -vnd XYSW.YXTQ <<-EOF
user john john123
put testfile testfile

The same script works if i change the server name to another ftpserver. So the script is fine , no syntax problems.

Any clues guys ??? Thanks

Old 08-15-2005, 05:53 AM   #2
LQ Newbie
Registered: Aug 2005
Location: Melbourne, Aust.
Distribution: Gentoo/Ubuntu
Posts: 15

Rep: Reputation: 0
Rather strange indeed! It looks like a connection is made to the server (all good) and then that connection is "lost", hence no success. What happens if you execute this script at the command line? Could you post the line in your cronfile that runs the script? Make sure you don't have any newlines in the cronfile, as they are interpreted as being a new command - and remember that cron doesn't start with the same environment variables as you do.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
strange ftp problem nix_crazy Linux - Networking 5 04-12-2005 09:36 PM
Strange problem with apt-get FTP TheOneKEA Debian 2 12-01-2004 09:32 AM
Strange problem while installing via ftp Pauluso Linux - Networking 1 10-18-2004 10:30 AM
Problem with FTP Script bmeckle Linux - General 1 07-22-2004 03:28 PM
Squid and FTP servers - very strange and urgent problem Zingaro2002 Linux - Networking 1 11-10-2003 05:37 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:34 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration