Operating System - HP-UX
1822002 Members
3902 Online
109639 Solutions
New Discussion юеВ

ftp: ftp/tcp: unknown service

 
Remy_1
Occasional Advisor

ftp: ftp/tcp: unknown service

Hi everyone,

I'm getting this error: ftp: ftp/tcp: unknown service when trying to open up an FTP session locally. I'm getting the same error for telnet.
I get: connection refuesed when I tried to do it from an other host.

Thanks again,
Remy Chau
6 REPLIES 6
Sanjiv Sharma_1
Honored Contributor

Re: ftp: ftp/tcp: unknown service

Sridhar Bhaskarla
Honored Contributor

Re: ftp: ftp/tcp: unknown service

Hi Remy,

Looks like your /etc/services file got corrupted or these entries got deleted. Do a 'grep ftp /etc/services' and see if you get any output. If this is working for root, then make sure the permissions are correct for /etc/services file. Others should have read permissions over this file.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
T G Manikandan
Honored Contributor

Re: ftp: ftp/tcp: unknown service

Make sure those services are present in /etc/services file.

If your file looks corrupted,

#mv /etc/services /etc/services.bk
#cp /usr/newconfig/etc/services /etc/services
#inetd -c


Vijaya Kumar_3
Respected Contributor

Re: ftp: ftp/tcp: unknown service

Do you have FTP Service running locally.

Try this:

telnet localhost 21

If you get something like THIS

Trying...
Connected to localhost
Escape character is '^]'.
220 host-12 FTP server (Version 1.1.214.8 Fri Apr 20 07:27:42 GMT 2003) ready.



It shows you are running FTP service. If you get an error

"Connection Refused" means you are not running FTP server.

"nknown Service" means somebody would have commented FTP service definitions in /etc/services.

Hope this helps

Vijay

Note:
Are you the one from SB? If yes, Nice to meet you here.

Known is a drop, unknown is ocean - visit me at http://vijay.theunixplace.com
Sunil Sharma_1
Honored Contributor

Re: ftp: ftp/tcp: unknown service

Hi,

there are 2 files which play main role in this.
1. /etc/services this file have a list of services and associated port number. this file is used to map service with port number
2. /etc/inetd.conf : this file used to start actually service.

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Berlene Herren
Honored Contributor

Re: ftp: ftp/tcp: unknown service

Remy, have your nsswitch.conf look something like this for services.

Example:
services: nis [NOTFOUND=continue] files


Berlene
http://www.mindspring.com/~bkherren/dobes/index.htm