1836574 Members
2405 Online
110102 Solutions
New Discussion

Re: Cannot FTP

 
David Connolly
Regular Advisor

Cannot FTP

Hi,

When I try to FTP to my server, it immediately responds with "Connection Refused" - no pause, no delay, no prompt for username, nothing.

I tried kill -s SIGHUP pid where pid what the process of the inetd daemon.

I also checked /etc/ftpusers, and tried removing all entries. It made no difference,

I know it's not a router or firewall issue, because I'm FTPing from a machine on the local subnet.

When I ftp to the machine from the machine itself, I get
"421 Service not available, remote server has closed connection"

Any help would be appreciated - This is out web server, and I cannot copy files to it!
15 REPLIES 15
Pete Randall
Outstanding Contributor

Re: Cannot FTP

Have you checked /etc/services? You should have:

ftp-data......20/tcp...... # File Transfer Protocol (Data)
ftp...........21/tcp...... # File Transfer Protocol (Control)
tftp..........69/udp...... # Trivial File Transfer Protocol
sftp..........115/tcp...... # Simple File Transfer Protocol
bftp..........152/tcp...... # Background File Transfer Protocol
ftp-ftam.....8868/tcp...... # FTP->FTAM Gateway


Pete

Pete
David Connolly
Regular Advisor

Re: Cannot FTP

Pete

Yes, thanks. I have all those services.

Dave
Bart_6
Advisor

Re: Cannot FTP

And make sure the /etc/inetd.conf file contains an entry for ftp.
oh no.... not THAT again
John Bolene
Honored Contributor

Re: Cannot FTP

Has it worked before and just stopped working?

Maybe ftpd has died, maybe it is a DNS issue, maybe the IP or name of the machine was changed.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
T G Manikandan
Honored Contributor

Re: Cannot FTP

1.What port have you configured for ftp.
Please make sure that the port is not used by any other process

2.Are you running any TCP Wrappers?

3.Do you have /etc/shells file which restricts the user from login.

4.Does other services like telnet work fine?
check for any duplicated ip.

Revert
Jean-Louis Phelix
Honored Contributor

Re: Cannot FTP

hi,

- check in sam, Networking and Communications, Network services that FTP is really enabled

- check that the user you are using to transfer has a 'standard' login shell. If it's not the cas, you should create a /etc/shells file, then list all default shells (see man getusershell) and finally add yours.

Regards.
It works for me (© Bill McNAMARA ...)
Adam J Markiewicz
Trusted Contributor

Re: Cannot FTP

try:

netstat -a | grep LISTEN

then look for port .21 or .ftp.
If you cannot find it - inet.d is not waiting for ftp requests.

Good luck

Adam
I do everything perfectly, except from my mistakes
David Connolly
Regular Advisor

Re: Cannot FTP

netstat -a |grep LISTEN shows
*.ftp *.* LISTEN


David Connolly
Regular Advisor

Re: Cannot FTP

ignore that - it's since the machine started that P_client is there. My issue began on 14th of this month
David Connolly
Regular Advisor

Re: Cannot FTP

what's a p_client? I have a bunch of them holding IP sessions in a close_wait state (according to LSOF)around the time of the error.
David Connolly
Regular Advisor

Re: Cannot FTP

The FTP listener is there. I can see it using both netstat -an and lsof -i. When I try to connect locally, I get the following

$ ftp lcalhost
Connected to localhost. 421 Service not available, remote server has closed connection
ftp>

Any thoughts?
Krenzer
Advisor

Re: Cannot FTP

Have you checked the post from B.H.E.Salden ?
-----------------------------------------------
And make sure the /etc/inetd.conf file contains an entry for ftp.

---

There must be an entry like this:

ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l

If there isn't an entry, create it and then stop and start inetd.
David Connolly
Regular Advisor

Re: Cannot FTP

Sorry,

Yes - it's there, and I've restarted inetd to no avail.

ftp stream tcp nowait root /usr/lbin/ftpd ftpd -ld -t 300
Adam J Markiewicz
Trusted Contributor

Re: Cannot FTP

I discovered problem was continued and solved in as new thread.
I do everything perfectly, except from my mistakes
David Connolly
Regular Advisor

Re: Cannot FTP

Adam,

Yes, my apologies - the issue was inetd.sec in /var/adm contained a restriction that prevented FTP from any address other than my router. The router is the issue.

Dave