Operating System - HP-UX
1822020 Members
3581 Online
109639 Solutions
New Discussion юеВ

Auto FTP job isn't working

 
SOLVED
Go to solution
Eric Bakken
Regular Advisor

Auto FTP job isn't working

Hi all,

I'm using the below script to send a file and it stopped working after the host changed the password. The only thing that I can see changed is that the password is now 8 characters instead of 6. I can log in manually just fine. I get a login failed error when i try to use this script. Can anyone help me?

error=`ftp -n -i <open ftp.server.com
user name password
binary
put file1 file2
bye
EOF`

echo "The FTP to server returned the following: $error"


I've tried altering the script in many ways but no luck. I'm wondering if it's a problem with the recieving server. Thanks,

-Eric
8 REPLIES 8
James R. Ferguson
Acclaimed Contributor

Re: Auto FTP job isn't working

Hi Eric:

From your posting, I am going to assume that the password is written as part of the here-document, and hence that you changed it.

Make sure that the here-document's lines (including the EOF marker are flush left without leading whitespace.

Regards!

...JRF...
Suraj K Sankari
Honored Contributor

Re: Auto FTP job isn't working

Hi,

After running the script its failed did you checked the source server's syslog.log what is there ?

Suraj
Eric Bakken
Regular Advisor

Re: Auto FTP job isn't working

I've started getting this message:

Error - incorrect permissions on /dev/tty.
User cannot log in.

-Eric
Eric Bakken
Regular Advisor

Re: Auto FTP job isn't working

I found someone else with the same problem but it doesn't have a resolution. http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1258901

I guess I'm not sure how simply changing the password for an ftp server login would cause this to happen.
Steven Schweda
Honored Contributor

Re: Auto FTP job isn't working

> I found someone else with the same problem
> but it doesn't have a resolution.

Possibly because he never answered the obvious
question:

> Have you looked at the permissions on any of
> the /dev/? Compared
> them between the two systems?

> I guess I'm not sure how simply changing
> the password for an ftp server login would
> cause this to happen.

Nor I. Could be coincidental.
Ganesh Saraf
Occasional Advisor
Solution

Re: Auto FTP job isn't working

Hello Eric,
Can you pls send your OS Version?? I have faced similar problem once. If password contains any special charecter like "@, #, $"
login fails. Try having password without these charecters.

Pls revert if you get solution.
Jim Keeble
Trusted Contributor

Re: Auto FTP job isn't working

It works on my systems.

Might be a timing issue. If so, you might try "expect" as a solution, but you do have to download and compile it, and HP doesn't support it.


http://expect.nist.gov/
Eric Bakken
Regular Advisor

Re: Auto FTP job isn't working

It turns out this was a password issue. We had a special character in the password that was causing problems. Thanks for your help,

-Eric