automatic FTP failed

I have automated ftp for different scripts. every script uses different login and passwords for different server. it reads the username and password from netrc.

there is 1 particular script that is failing. this script is failing in FTP step. i have checked the logs it says login failed. but when i try to do the manual logging to the same server with the username and password provided in the .netrc file. its successful.

my question here is.. is it possible to restrict automatic ftp from the destination server by some configuration. when i am able to do manual ftp then why its failing in automatic ftp??

any ideas or suggestions anything will be a lot of help. thanks a lot in advance....:confused:

It shouldn't be able to tell the difference. Are there any backslashes, odd or non-ASCII characters in the username/password that could be causing confusion?

are you running the scripts as yourself or as root ?

try

# chmod 600 .netrc 

as ygemici said. give only read and write permission. that i have already checked. .netrc file has 600 permission.

as riegersteve - i m running the script as a root.

as corona said - the password has one (_) underscore in it. will that makes a difference...

i am going to change the password to something normal which will not contain backslashes, odd or non-ASCII characters...

---------- Post updated at 02:07 AM ---------- Previous update was at 02:07 AM ----------

thanks a lot for a quick reply. i will update it once i get the final results after changing the passwords.

Passwords longer than 8 characters also give trouble in ftp.

ftp looks for .netrc as $HOME/.netrc . Therefore the value of $HOME is important.