Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use the lftp in order to get the file.txt from Linux machine (red hat - 5.3)

 my linux login/password:

 login - diana
 password - diana123
 IP -

I have a problem that lftp can't get the file.txt , Please advise what I need to check? What could be the problem?

      lftp -u diana,diana123 -e "get file.txt ; exit "
     `file.txt' at 0 [Delaying before reconnect: 22]  


      lftp -d  -u diana,diana123 -e "get file.txt ; exit "
      ---- Connecting to ( port 21
      **** Socket error (Connection refused) - reconnecting
      ---- Closing control socket
     `file.txt' at 0 [Delaying before reconnect: 14]  

     I also performed:

     telnet  21
     telnet: connect to address Connection refused

     ftp: connect: Connection refused
     ftp> exit

     I check my machine -

    rpm -qa | grep ftp

    # ps -ef | grep ftp | grep -v grep
      root      2302     1  0 Oct27 ?         00:00:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf

Remark --> I have ping to linux machine , and also ssh/scp...etc !

view from the remote linux machine -

  [root@linux ~]# su - diana
  [diana@linux ~]$ pwd
  [diana@linux ~]$ ls
share|improve this question

The **** Socket error (Connection refused) - reconnecting message suggests that you don't have an ftp server running on your remote system. You should check that you do have a server installed and running.

rpm -qa | grep ftp


should list all the ftp related packages that are installed. As you can see I have vsftpd and proftpd installed on my system. To check which is running use ps to find out if one is running or not

ps -ef | grep ftp | grep -v grep

root   9028  1  0 12:00 ?  00:00:00 /usr/sbin/vsftpd /etc/vsftp /vsftpd.conf

I'm running vsftpd. If you don't have an ftp server running you will see then you will see no output above.

If you don't have an ftp server installed then you can install one with

sudo yum install vsftpd


sudo yum install proftpd

whichever you prefer. If you have an ftp server installed then you can start it with

sudo service vsftpd start 


sudo service proftpd start. 

whichever you installed.

share|improve this answer
hi lain , see my update I have all rpms and vsftpd.conf is runing so this is not the problem , any way for other machine its work but for lftp isnt work – Diana Nov 15 '11 at 12:14
what does the output of netstat -lnp | grep vsftp show? – Iain Nov 15 '11 at 12:28
but on machine --> ps -ef | grep ftp root 22757 22353 0 14:31 pts/1 00:00:00 grep ftp ( this mean that vsftpd not exist under /etc/init.d on – Diana Nov 15 '11 at 12:32
Does this mean that my answer is in fact correct ? – Iain Nov 15 '11 at 12:35
lain what I say is that on my machine ( I have vsftpd but on remote machine ( I dont have , so I need to install the vsftpd on the remote machine ( ? also ? – Diana Nov 15 '11 at 13:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.