HI,
You were right the user name was wrong.
But the user name was the LOCAL user name on my computer.
I still have the feeling that ftp is not reading the .netrc file
althouh it should.
Just as I only wrote ftp ftp.
www.com and had no .netrc file.
Best regards
/ Peter Ivarsson
kondal wrote:
> Peter Ivarsson wrote:
> > Hi,
> >
> > I have a program that's creates a .netrc in $HOME.
> > When I at the AIX prompt write "ftp xxx.yyy.com", the ftp command
> > transfers a file to the remote host as I want.
> > When I in my code write "status = system( "ftp xxx.yyy.com" ).
> > I get the error below:
> > Connected to xxx.yyy.com.
> > 220 buick FTP server (Version 4.1 Thu Sep 12 23:46:23 CDT 2002) ready.
> > Name (xxx.yyy.com:ZZZ): 331 Password required for ZZZ.
> > 530 Login incorrect.
> > It seams that the ftp command doesn't find the .netrc in $HOME.
> > And that automatic login doesn't work.
> > But the $HOME is correct when I do 'system( "echo Dollar home = $HOME"
> > );'
> >
> > This code is running in AIX 5.3.
> >
> > Does anyone have a clue?
> >
> > Best Regards
> > / Peter Ivarsson
>
> .netrc is getting opened and is parsed by the ftp program. I think that
> the password is wrong. Why don't you add -d option for the ftp command
> to enable the debug messages. This enables you to see what message
> transfer are going through between the server and the client.
>
> ps. -d option for ftp gives debug messages in linux, hope it is same
> for AIX
>
> -kondal