LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-07-2007, 02:09 PM   #1
ljmace1953
Member
 
Registered: Jan 2006
Distribution: suse
Posts: 38

Rep: Reputation: 0
strange ftp problem


I have a script (really 2) that ftps a file to another server.
If I run the script manually it processes fineas a normal user.
I then put it into cron and it has failed.
Sometimes I get nothing in my log and sometimes I get 'EPSV': command not understood.
The file is created by root
Here is my command and the file it executes.

command:
#!/bin/sh
ftp -n < /opt/mace/ftp_thedb.sh

file to execute:
open xx.xx.xx.xx
quote user ftpuser
quote pass ueserpass
binary
lcd /backup_dir
put lits2*
quit


What am I missing?????????
thanks
ljmace1953
 
Old 12-08-2007, 06:52 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Code:
quote pass ueserpass
I think the above is the command that triggers the error, since in some cases the pass command is the short form of passive, which toggles the passive mode transfer. I have not investigated this further, anyway you can offer the password by means of the user command, as in
Code:
user ftpuser userpass
without the command quote, otherwise it is not understood.
 
Old 12-13-2007, 05:56 AM   #3
ljmace1953
Member
 
Registered: Jan 2006
Distribution: suse
Posts: 38

Original Poster
Rep: Reputation: 0
First I'd like to thank you who helped.
Now to be humbled. After redoing the scripts with somesuggestions only 1 of my 3 transfers worked.
Humm must be a timing problem, I'll change the order they are started and wait until the next day and see what happens.
Well I just got my 1st pair of glasses(at 54) and when I went in to edit cron I notices something funny.
Instead of having 2>&1 I had 2>$1 at a 10 font the 2 signs looked simular. The reason it happened on 2 ftps on 2 different servers is the name transfer were the same so I just cut and pasted the error.
Thanks for the help(eating crow)
Mace
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange FTP Problem mcupples Linux - Server 3 04-05-2007 10:37 AM
Very Strange FTP script problem ??? lionking_x Linux - Newbie 1 08-15-2005 04:53 AM
strange ftp problem nix_crazy Linux - Networking 5 04-12-2005 08:36 PM
Strange problem with apt-get FTP TheOneKEA Debian 2 12-01-2004 08:32 AM
Strange problem while installing via ftp Pauluso Linux - Networking 1 10-18-2004 09:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:36 PM.

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