1830168 Members
7387 Online
109999 Solutions
New Discussion

ftp help

 
intern06
Advisor

ftp help

I'm an intern at a company that recently bought out another business. In doing so, they inherited a unix system that contains files which they need to retrieve. No one in the company, including myself, really understands or knows unix so please respond with the true assumption that I'm a unix idiot.

I need to ftp the files on the unix system to a windows system. It has been suggested to me too use WS_FTP and a couple other freeware ftp programs on my windows system to connect to the unix system, but I'm confused on a couple points related to that.

The current system configuration is an HP Visualize C160 running HP-UX B 10.20. It has an emulex performance 2500 connected to the LAN-AUI port. It also has an available normal ethernet LAN port.

Should I just connect the unix system up to the network through the ethernet port? If so, how do I set up the IP address so I can tell the windows system where to look for the ftp.

Is there anything I have to do in order to set up the unix system as an ftp server and do I have to tell it which directories I want listed on the server?

I don't know if it makes a difference or not, but the windows computer is currently connected via ethernet cable to a Hawking 10-base T 4 port hub which is connected via port 4 to the ethernet port in the wall. It is set in uplink mode instead of normal. If it is easier to just connect the two computers via that router instead of making them both internet accessible, I'm more than willing to do that.

I'm basically just looking for the easiest and most straightforward way to ftp the files from the unix system to the Windows 2000 Pro system.
Please remember that I am very unfamiliar with unix and, while I feel that windows makes ftp fairly straightforward, I'm not all that familiar with ftp either.

Any help would be very appreciated and would help me out of this confusing situation. Thanks!
14 REPLIES 14
Christian Tremblay
Trusted Contributor

Re: ftp help

You can ftp to the UNIX server by opening a DOS window and typing ftp

You will get a ftp login from the unix server, put in the user name and password, you will then login in the home directory of the UNIX user you used.

cd to the directory where the files are and use get to download it.

Provided that the UNIX user you are using has proper permissions on those files, you should download them without problem.

If you have multiple files to download, use mget instead of get.
intern06
Advisor

Re: ftp help

I just tried this connection (following the process you outlined) and it didn't work.

I disconnected the Hawking router from the internet and connected both the unix and the windows system to it. The LED indicating that there was a connection lit up when I plulgged in the ethernet cable for the unix system so there is obviously a connection of some type occurring.

I tried to ftp virtually every IP address and host name on the unix system that I could find and nothing worked.

I think I'm going to have to put the unix system on the network via that router and then connect that way. Does that make sense?
A. Clay Stephenson
Acclaimed Contributor

Re: ftp help

The first thing that you should do is examine /etc/rc.config.d/netconf using a text editor and determine the ip address and subnet mask. Also look for the ROUTE_DESTINATION=default and ROUTE_GATEWAY entries. That will tell you how the box is currently configured. Since you are a novice, if you need to make changes to these values, I would suggest that 1) make a copy of this file 2) make your changes using a text editor (e.g. vi); 3) reboot so that the changes will take effect. Long before you try ftp, you need to able to ping.

If it ain't broke, I can fix that.
intern06
Advisor

Re: ftp help

My problem clearly seems to be in configuring the unix system to interact with my network.

Using DOS, I can determine my
Primary DNS Suffix
Node Type (HYBRID)
IP Routing Enabled (NO)
WINS Proxy Enabled (NO)
DNS Suffix Search List
Connection-specific DNS Suffix
DHCP Enabled (YES)
Autoconfiguration Enabled (YES)
IP Address
Subnet Mask
Default Gateway
DHCP Server
DNS Servers
Primary WINS Server


I included the answers to the specifications that were just yes or no so you could know how the network is configured.

How do I configure my unix system to interact with a system like this?

Re: ftp help

Hi Intern...

Proceeding upon the advice to treat this as a blind walk-through. I get the impression you do not know the IP or HostName of the UNIX box...we'll go there first. As Clay said you need the hostname, subnet-mask, and box IP. Remember CASE COUNTS in everything you type, and assume in each command that I say to type, it ends with

1. Power-down the machine.
2. Power-UP the machine...after a few seconds you will see text appear giving you time to press to change the monitor, ignore that, but when the text starts scrolling again, press .
3. There will be a menu with the available options.
4. type bo pri
This will boot using the primary hard drive.
6. You will be asked "Interact with ISL?"
type Y
When the ISL> prompt appears type;
hpux -iS

This will boot the machine into single-user "offline" mode, and you will be the root (super-user).

The prompt will be a #
1. Type cd /etc/rc.config.d
2. Type /usr/bin/grep HOSTNAME netconf

Something like this will be displayed;
HOSTNAME="TheHostNameHere"

4. Type /usr/bin/grep IP_ADDRESS netconf

Something like this will be displayed;
IP_ADDRESS[0]=192.6.1.52

5. Type /usr/bin/grep SUBNET_MASK netconf

Something like this will be displayed;
SUBNET_MASK[0]="255.255.255.0"

Finally, type reset

That will restart the machine...this time let it go through the reboot.

Depending on what you found as far as IP and subnet mask, you may need further help to change those.

But if they're compatible with your current network, see if you can FTP that hostname.

I hope some of this helps...If not, let us know what you get and we'll go for more :)
Rita C Workman
Honored Contributor

Re: ftp help

Dear Intern06

Let's take apart your note:
1.Should I just connect the unix system up to the network through the ethernet port?
>>Yes you need to connect it to a port. Talk to your networking person as the port will have to be configured to match the speed of the lancard inside your HPUX server. Might have them try 100Mb Full Duplex (Auto Negotial OFF), since we don't know exactly what card it is to say for sure.
2.Is there anything I have to do in order to set up the unix system as an ftp server and do I have to tell it which directories I want listed on the server?
>>Shouldn't need to do anything. FTP was not created by Microsoft-it's a standard protocol than UNIX boxes have long been using.
Next...
Clay mentions the network configuration file that should be edited to correspond to what you want to set your IP to and the other settings (talk to that network guy of yours) like the gateway address. Go in and edit it. We us "vi" one of the older editing tools. Simple commands:
vi /etc/rc.config.d/netconf
(file opens)
arrow down to change IP and arrow over to old IP address. Make sure you have a new IP number and info from your network person.
Now just position cursor at end of the IP and type "x". The x removes/deletes a character at a time. When you have all the IP gone, hit escape key, then with cursor now at the end of line, hit the "a" key. The "a" is for add. Now type the new IP octets and arrow to your next.
(That's as simple as I can state it)
When you are done editing....hit:
escape key
Hold shift key and hit ":"
then type "wq!" and hit enter.
File is now write/quit and saved

Next...like Clay says, reboot the box by typing at root "/"
shutdown -ry 0

To FTP you can go from the UNIX box by cd to where your files are and type:
ftp

or from the Windows box, do your ftp back to the UNIX box.

If you experience any problems, from the UNIX box type:
netstat -rn to confirm IP info

If the IP's are good, then it is probably because the port speeds on your network port are different than your lancard port.
So getting the lan # from your netstat command screen do this:
lanscan write down the PPA # too
lanadmin -x PPA
ex:
lanadmin -x 0 (for speed on lan0)

Hope this made some sense,
Rgrds,
Rita
Christian Tremblay
Trusted Contributor

Re: ftp help

Of course, like Clay said, before thinking about using ftp, your system has to be on the network.

Make sure that your NIC is properly connected to your router/switch then the easiest way for you would be to use SAM
(system administration manager) on your unix server, it will provide an easy to use interface to configure your network card.

login as root and type: sam

choose "networking and communications"
choose "network interface cards"
you will see all NICS on the system

Pick the one you know is connected to the network and fill in the IP address, netmask etc.

Go back up 1 level in SAM and choose "routes" and enter your default gateway for the network.

from any other box on the network, try to ping the IP you just configured.




intern06
Advisor

Re: ftp help

The company is very small so I don't know if we have a network guy, but even if we have one I don't know where my supervisor is so I couldn't find him if I needed to. I will tell you all that I can.

First of all, I tried to mess with some of the configurations and it worked slightly to the point that I got a message on the windows computer that another computer had its IP address (this meant that the unix system had connected). Unfortunately, I don't remember if I messed with a setting or what actually happened but it then proceeded to make the HP Common Desktop Environment stop working. I kept booting into this message: Unable to initialize or connect to the Desktop messaging system. Check your $HOME/.dt/errorlog for more information.

After I clicked ok, it just takes me back to the login screen and never let me login. I eventually reloaded the netconf file that I had started with (I backed it up before changing it).

I got it to boot back to the HP CDE but now I don't know what to do in order to get the networking working.

I also had an intriguing experience. I moved the laptop to a different networking port on the floor and it set itself up with the same ip address. This really confused me becuase how can two networking ports both produce the same IP address on this computer? Does that mean there is something special I have to set up on the other computer?

Also, I have the ability to bring both 100 Mbps and 10 Mbps to the LAN port on the unix system. Is there a way to check which speed is the one I should use?

Could you please help me by looking at the information which I could retrieve off this computer (the windows one) and tell me how to apply that to setup the unix one. Obiously, you can't give perfect answers because you don't have the situation right in front of you, but any help would be GREATLY appreciated.
intern06
Advisor

Re: ftp help

I've tried a couple more things since resetting all networking settings back to before I messed with them (and I'm pretty sure successfully connected them, but messed up other parts of the computer) and nothing has worked again.

I have come across a couple messages however that may be able to help you to help me.

In SAM under Internet Addresses, when trying to update the DNS received this error message:
There are no â primaryâ special files in /var/sam/dns. This is a SAM internal error. Please notify HP

In same area of SAM, when trying to set the Default Gateway:
The system â â with internet address â 192.168.16.2â cannot be used as a gateway because this system cannot directly connect to it via any of the Network Interfaces currently configured. Please enter a system name, internet address pair that is directly reachable by this system.

I also set the DNS revolver to the IP address of the DNS server that the windows computer told me.

Although it says DHCP enabled in SAM, it is not enabled in netconf file. I tried enabling it in the netconf file and rebooted, but that did not help.

In all reality, I don't know if any of the above steps were even necessary but they were values that I saw in the configuration of the laptop so I decided to try them.

Thanks for your continued help with this. It really means a lot.
Peter Nikitka
Honored Contributor

Re: ftp help

Hi,

seeing which kind of trouble you have, it seems to me, the best and cheapest solution for you and your company would be to aquire a consultant with knowledge in HP-UX.
Sorry for no better news...

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
V. Nyga
Honored Contributor

Re: ftp help

Hi,

will you try to use an external consultant?
I think you shouldn't use DNS and DHCP for this single problem (ftp some files).
Check which ip addresses are used in your company - x.y.z.a

Try some ip addresses only with different 'a' - with 'ping' at your win pc.
Choose one not used ip address - do a 'set_parms ip_address' (or /sbin/set_parms ip_address') to change ux systems ip address to this one. Use 'set_parms addl_netwrk' to disable DNS, DHCP, NIS.

Connect ws to your hub and try a ping.

Results?

HTH
Volkmar

P.S. about vi:
http://www.lagmonster.org/docs/vi.html
http://en.wikipedia.org/wiki/Vi
*** Say 'Thanks' with Kudos ***
intern06
Advisor

Re: ftp help

Well, after trying out a combination of my own networking knowledge and everyone's posts this unix idiot has a working ftp server!

I just need some quick (and hopefully easier to answer) help. I can access files on the unix system in the user's user directory using explorer, but I can't go up a level. Every time I try it takes me to my internet home page. I can access these directories and files using DOS, but the only way I know how to tranfer files with DOS is using mget which is extremely tedious. I tried programs like WinSCP and CoffeeCupFTP, but even though logging in as anonymous is a snap I cannot login as a user. I need to log in as a user to get to those other files and directories.

If you can help me in any of the three ways I would appreciate it:
1) Help me get to the upper level directories using explorer. (currently it just takes me to my home page)
2) Direct me how to download entire directories using DOS (if there is a way)
3) Advise me on why the 3rd part FTP programs are having difficulty logging in as a user. (none of the users have any passwords if that makes a difference)

Thanks so much for your help in this entire process!
intern06
Advisor

Re: ftp help

A quick update to my last request.

If you can help me with the DOS part, my quesiton really is is there a command to download subdirectories with DOS? I know how to download all the files in a certain directory.
V. Nyga
Honored Contributor

Re: ftp help

Hi,

I don't know ftp good - you can check all commands of unix ftp with 'man ftp'.
See also:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1024912

or do a search here with 'ftp'.
Then I think you have to check which settings you have to do at your pc to ftp to win.
Sorry, can't help you more.
Volkmar
*** Say 'Thanks' with Kudos ***