Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


linux ftp problem

Posted on 2010-11-29
Medium Priority
Last Modified: 2012-05-10
I am using centos 5.4 with plesk 10.0.1 and when i try to connect to ftp i got the following error :

421 Service not available, remote server has closed connection

i have tryed to ping and resolve domain domain both of them has been succed and i 've checked what if  a program listen 21 port :
lsof -i tcp:21
but it seems ok as described here
what should be the problem
Question by:3XLcom
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
LVL 30

Expert Comment

by:Britt Thompson
ID: 34233093
Can you telnet into the server on port 21:

telnet 21

If not, then it's likely the service is not running or it's firewalled

Assisted Solution

by:Kailash Aghera
Kailash Aghera earned 600 total points
ID: 34233175
It seems some firewall issue. Can you ftp locally? I mean does it ask for username if you type ftp localhost on your server (via SSH)?

Author Comment

ID: 34233298
yes i tryed locally but it does not work  and also i have checked what if it listen 21 port but it seems every thing is ok.
10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

LVL 30

Expert Comment

by:Britt Thompson
ID: 34233317
So it does connect when you telnet into port 21?

Author Comment

ID: 34233362
no it does not server closes connection directly

Author Comment

ID: 34233441
Microsoft Telnet> open
( to )
Connecting To not open connection to the host, on port 23
: Connect failed
Microsoft Telnet>
LVL 30

Expert Comment

by:Britt Thompson
ID: 34233579
the syntax should be exactly like so:

telnet 21

Author Comment

ID: 34233605
same result
LVL 30

Accepted Solution

Britt Thompson earned 1400 total points
ID: 34233637
Same's either being blocked by a firewall or the ftp service is not running. You need to check your router/firewall settings and make sure port 21 is open and forwarded to the correct IP and also check your software firewall if you have one.

Try running a telnet on the local server from the terminal:

telnet localhost 21

If it connects, it's a firewall issue.

Author Closing Comment

ID: 34233664
Thanks for all your help i have found the answer :

if inetd not working try to use the proftp

edit /etc/proftpd.conf

change Servetype from inetd to Standalone

kill first the current ftp process

linux:# lsof -i tcp:21
inetd 25261 root 0u IPv4 452954 TCP *:ftp (LISTEN)

linux:# kill 25261

then run the proftp

linux:# /usr/sbin/proftpd

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Introduction This article is intended for those who are new to PHP error handling (  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question