473,554 Members | 3,070 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't get automatic ftp working within system() method.

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:ZZ Z): 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

Sep 12 '06 #1
3 4234

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:ZZ Z): 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

Sep 12 '06 #2
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:ZZ Z): 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
Sep 13 '06 #3
Hi,

Mr Kondal was right that 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:ZZ Z): 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
Sep 13 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1458
by: Joseph | last post by:
The idea is to show only one of the <Baby_Div> while hiding all the others. At the moment all I have managed to do is to show each <Baby_Div> in turn as expected, but the problem is that once a <Baby_Div>.innerHTML is replaced by one of the procedures, it does not work anymore, ie, the <Baby_Div> content is not displayed anymore, once code...
10
3459
by: ThunderMusic | last post by:
Hi, How can I get if the Windows running is a server version? Is there a property somewhere that can tell me if the Windows version is a server edition (including server, advanced server, web server, etc) or just a workstation (if it's not a workstation, then it's a server). My app must verifies that for security reasons. It should work...
0
4399
by: Peter | last post by:
When I issue call sqlj.install_jar('file:///f:/jars/mail.jar','MAIL'); I get the messages SQL4301N Java or .NET interpreter startup or communication failed, reason
6
6589
by: Dolphin White | last post by:
For example, I allocate some unmanaged resources in the static constructors, then how can I properly release the resource before the application exit? thx!
25
2352
by: Zeng | last post by:
I finally narrowed down my code to this situation, quite a few (not all) of my CMyClass objects got hold up after each run of this function via the simple webpage that shows NumberEd editbox. My memory profile shows that those instances survive 3 rounds of GC collections - it's not what I expected. In my real code, CMyClass occupies big...
34
29833
by: Tom | last post by:
I'd greatly appreciate advice and code snippets on how to create a ram disk within a C/C++ program. I also need to be able to determine the free space. Thanks in advance for any help.
25
2634
by: sidd | last post by:
In the following code: int i = 5; ---it goes to .data segment int j; ---it goes to bss segment int main() { int c; int i = 5; ---stack
0
7519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7792
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8034
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7556
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7885
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6137
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5430
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5151
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3555
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.