Operating System - HP-UX
1748090 Members
5086 Online
108758 Solutions
New Discussion юеВ

Re: Cannot FTP from Unix to Windows

 
Raoof
Regular Advisor

Cannot FTP from Unix to Windows

Dear All,

 

Environment Details:

 

Unix : HP-UX B.11.31 U ia64

Windows : XP SP3

 

I cannot able to ftp from unix to windows. When i gave the below command it through an error as

hostname#ftp wind-ipddress

ftp: connect: Connection refused

 

As am new to the Unix box so could able to diagnose the problem much.

 

Will be really grateful for your valuable advices/solutions.

 

Regards

25 REPLIES 25
Naj
Valued Contributor

Re: Cannot FTP from Unix to Windows

hi,

Please check wind-ipaddress port whether is open or not

#telnet wind-ipaddress (port)

if it remain refuse means wind-ipaddres port ftp is close.

Thanks

BR
Naj

____________________________________________
:: Really appreciate if you could assign some points.
:: Don't know how to assign point? Click the KUDOS! star!
Hein van den Heuvel
Honored Contributor

Re: Cannot FTP from Unix to Windows

>>I cannot able to ftp from unix to windows.

 

Can you FTP to the target box from an other (windows) system?

 

>> hostname#ftp wind-ipddress

>> ftp: connect: Connection refused

 

Typically that is an issue with the target (server/host) box, not the current (client/ftp) box.

Is there an FTP ( IIS ? ) server started on the windows system?

Best I know by default there is no FTP server started on XP

 

>> As am new to the Unix box so could able to diagnose the problem much.

 

It is unlikely to be an Unix issue, an if it is, it is most likely to be a naming issue.

So just tr with a hard coded IP address and/or check with 'ping' an 'nslookup' to make sure the name used actually goes to the right target;

 

Hope this helps some,

Hein

 

Dennis Handly
Acclaimed Contributor

Re: Cannot FTP from Unix to Windows

What's changed since your previous question back in April?  Did it ever work?

http://h30499.www3.hp.com/t5/Networking/Compress-and-FTP-from-HP-UNIX-to-Windows/m-p/4778993#M47418

Gaurab Mallik
Frequent Visitor

Re: Cannot FTP from Unix to Windows

1. check if any FTP server is running on windoesXP box, if not then either you have to enable IIS or use some third party ftp service like filezilla server.

2. Check for firewall issues, port 21 might be blocked from firewall.

3. Use IP address for the windows machine instead of its name.

Unix is user-friendly. It's just very selective about who its friends are
Raoof
Regular Advisor

Re: Cannot FTP from Unix to Windows

Dear Hein,

 

Thanks for your immediate reply.

 

>>Typically that is an issue with the target (server/host) box, not the current (client/ftp) box.

Is there an FTP ( IIS ? ) server started on the windows system?

Best I know by default there is no FTP server started on XP

 

I checked the FTP service in the windows box, yes it was not configured on which I did some work around to get the FTP service enable.

 

Now I can able to FTP from Unix box to the Windows one after facing and resolving the below errors like

Error: 530 User <surname> cannot log in.

Login failed

and

Error: 550 permission denied.

 

But now my concern is to transfer the files 'X & Y' from one of the Unix directory like ( /bkpfiles/X Y ) into the Windows drive (D:\backup\ X Y) by using the shell script which I can scheduled to run on some specific time.

 

Valuable advices will be highly appreciated.

 

Regards

Dennis Handly
Acclaimed Contributor

Re: Cannot FTP from Unix to Windows

>But now my concern is to transfer the files

 

You're script needs to model how you do it by hand.

Did you want to embed the password in your script?

Raoof
Regular Advisor

Re: Cannot FTP from Unix to Windows

Dear Handy,

 

Yes i can add the password in it.

 

 

REgards

Dennis Handly
Acclaimed Contributor

Re: Cannot FTP from Unix to Windows

Some previous threads (that are mangled due to XML tags):

http://h30499.www3.hp.com/t5/System-Administration/Syntax-error-at-line-23-lt-is-not-matched/m-p/4593942/highlight/true#M375231

http://h30499.www3.hp.com/t5/Languages-and-Scripting/ftp-a-file-to-local-system/m-p/4292654/highlight/true#M23033

http://h30499.www3.hp.com/t5/System-Administration/ftp-process/m-p/4204483/highlight/true#M325205

 

(Insert standard caveats about security hole here.)

ftp -n -i machine <<EOF

user user-name password-for-user-name
cd D:\\backup
lcd local-directory
put file
bye
EOF

 

SInce this is windows with their ill advised use of backslashes "\", you will have to quote each one in each command line.

Raoof
Regular Advisor

Re: Cannot FTP from Unix to Windows

Dear Handy,

 

On your given script below

>>

ftp -n -i machine <EOF

user user-name password-for-user-name
cd D:\\backup
lcd local-directory
put file
bye
EOF

 

i did the changes as per my requirement, please check and feedback whether it is in correct format or not, as i am also very newbie in writing the scripts.

 

ftp -n -i machine(here i have to mention the win ipaddress?) <EOF

user administrator test123

cd D:\\backup

lcd /dumps

put file

bye

EOF

 

Please advise.

 

Regards