1834394 Members
1628 Online
110066 Solutions
New Discussion

PROBLEMS WITH FTP

 
SOLVED
Go to solution
Guillermo Castillo
New Member

PROBLEMS WITH FTP

Hi, I have 28 C240 workstations on charge but I've a problem with ftp, some of the workstations send the message ftp/tcp unknown service, but all the machines were reinstalled at the same time with the same procedure, and the same users who can't make an ftp connection in one of the workstations, can do it in another, does anyone know the answer??

Thanks
Guillermo from M?xico
12 REPLIES 12
Steven Sim Kok Leong
Honored Contributor

Re: PROBLEMS WITH FTP

Hi,

Check your /etc/services file for the following lines:

ftp-data 20/tcp # File Transfer Protocol (Data)
ftp 21/tcp # File Transfer Protocol (Control)

They must exist on the client you are ftp-ing from.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com

Marcel Boon
Trusted Contributor

Re: PROBLEMS WITH FTP

Hi,

Check your etc/services and look if ftp is uncommend.
check on the remote hosts the $HOME/.rhosts and the /etc/hosts.equiv file, for possible deny's.

For futher information:
http://www.docs.hp.com/hpux/onlinedocs/B2355-90685/B2355-90685.html

Marcel
See the man pages
Shannon Petry
Honored Contributor

Re: PROBLEMS WITH FTP

I agree with the other two posts. The entry must have been removed from /etc/services.

If you did not remove this entry, it could be from corruption or someone playing around.

I'd recommend you copy the default file from /usr/newconfig/etc/services to /etc/services and chmod to 0444. This will alleviate possible future problems with other missing/corrupt entries.

Regards,
Shannon
Microsoft. When do you want a virus today?
rick jones
Honored Contributor

Re: PROBLEMS WITH FTP

is it possible that NIS is being used to lookup services? what happens if the NIS server is only spotty in its availabiltiy?
there is no rest for the wicked yet the virtuous have no pillows
Guillermo Castillo
New Member

Re: PROBLEMS WITH FTP

Hi again, thanks to Steven, M. Boon and Shannon, I've done what you suggested but I didn't get any result, in fact the files were ok, if you have any other idea, I'll apreciate it.

Rick, I didn't understand what you've said, because in some of the 28 worstations I can make normal FTP's and only some of them are going wrong with FTP, and I don't think the NIS service is spotty because other services like NIS for user access work very well, the problem is with FTP, and TELNET. Thanks anyway.
Steven Sim Kok Leong
Honored Contributor

Re: PROBLEMS WITH FTP

Hi,

For those workstations (clients) that are unable to initiate the FTP, can you verify that the /etc/services residing on these workstations (clients) are proper ie. with the ftp entry existing and uncommented (as we have pointed out above)? If the ftp entry is commented, following is what you get:

# grep "21/tcp" /etc/services
#ftp 21/tcp # File Transfer Protocol (Control)
# ftp localhost
ftp: ftp/tcp: unknown service

If the ftp entry is proper in /etc/services, following is what you would see:

# grep "21/tcp" /etc/services
ftp 21/tcp # File Transfer Protocol (Control)
# ftp localhost
Connected to localhost.
220 bkupsvr1 FTP server (Version 1.1.214.5 Tue Nov 16 09:39:15 GMT 1999) ready.
Name (localhost:root):


Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Tarek
Super Advisor

Re: PROBLEMS WITH FTP

If you are using NIS try to modify services in the /etc/nsswitch.conf as the following:
services: files nis
Then stop and start the inetd services in the /sbin/init.d directory.
I had this problem and i solved it in this way.
Try & good luck!
Regards
Tarek
Guillermo Castillo
New Member

Re: PROBLEMS WITH FTP

Hi again, I've tried what Steven Sim told me, but I didn't get any results, when I typed grep "21/tcp" /etc/services i got the message: ftp 21/tcp # File Transfer Protocol (Control) but when I type ftp localhost, I get ftp: ftp/tcp: unknown service, thanks anyway.

Tarek, what happens if dont?t have the file nsswitch.conf in /etc, do i have to make one in every client or what do i have to do? thanks for your help.
Tarek
Super Advisor
Solution

Re: PROBLEMS WITH FTP

Guillermo...i'm not very expert, maybe someone here in the form will answer you better than me...however i think /etc/nsswitch.conf is a required file...it is necessary..try to put it as i wrote you on one client and then try...i think it will works...
hope i helped you...
regards
tarek
Stephen Murray
New Member

Re: PROBLEMS WITH FTP

Don't know if you fixed this or not. I had the same problem with a server, the problem turned out to be that the file "/etc/services" was set to permissions "640". Changing it to "644" corrected the problem. A big clue was that "root" was able to ftp but every other user got the "unknown service" message. In addition, outside clients were able to connect into this server via ftp.
Guillermo Castillo
New Member

Re: PROBLEMS WITH FTP

Thanks Tarek, I made the nsswitch.conf file, and it worked.

Thanks to all of you that helped me.

Greetings
Guillermo Castillo
Matthew Murdock
Valued Contributor

Re: PROBLEMS WITH FTP

I just had the same problem, my resolution was that the client (HP/UX 11.00 client) that was failing was once a member of NIS domain, and it could not find the NIS server. Once I got the client back into the NIS domain, it worked (I never heard of nsswitch.conf on HP/UX). Glad your problem was solved.