• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1182
  • Last Modified:

FTP on Red Hat Linux

I have a RHEL 4 box here that I am trying to set up
FTP on.  I can set up SFTP no problem, however, plain
old FTP won't connect.

The firewall on this server id disabled.

I can get a ftp> prompt when I type 'ftp' on the host
but I'm having luck. I am trying to connect through the
LAN at this point.

Any suggestions?
  • 3
  • 2
  • 2
1 Solution
First off, are you familiar with how to use command-line ftp?  You can either type "ftp sernamename" or just ftp and then type "open servername" at tht the ftp> prompt.

If you are trying that what is the response you get?
pkowal74Author Commented:
I get a:
ftp: connect: Connection refused

When I type ftp> open servername

that means that it can't connect, which could be any of the following:

1) your local firewall is blocking outgoing ftp (which you say isn't even turned on - type "iptables --list" to check)
2) a firewall in the middle is blocking ftp (you say its on the same lan, so that eliminates this)
3) a firewall on the remote side is block ftp
4) ftp isn't turned on on the remote side

sftp uses ssh, which runs on a different port that is more commonly opened up.  normal un-encrypted ftp uses completely different software and different ports.
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Kerem ERSOYPresidentCommented:
then it means that there's no ftp server listening at the server end. Can you check that your "servername" serwere that you want to connect is having ftp server active:
#  netstat -anpt | grep ":21 "

This must show something like that:
tcp        0      0        *                   LISTEN      18921/vsftpd

here at the last column we see the process id of the FTP process and the name of your ftp daemon called "vsftpd"

If this command does not return anything it means that your ftp server si not funning. Here I am assuming that you are using vsftpd. please check the status of your vsftpd like that:
# chkconfig --list vsftpd

If you see something like that as an output:
vsftpd          0:off   1:off   2:off   3:off   4:off   5:off   6:off

it will mean that your ftp server is not set to run when your system is up automatically. To run your vsftp for this session (till you reboot)

issue this command:
service vsftpd start

to set automatic startup you issue this command:
chkconfig vsftpd on

Please check your /evar/log/messages and /var/log/xferstats (if exists)  to check for any transmiison problems ooccured during transmit.
pkowal74Author Commented:
This is the type of stuff I'm getting:

[root@oratest1 /]# netstat -anpt | grep ":21 "
[root@oratest1 /]# chkconfig --list vsftpd
error reading information on service vsftpd: No such file or directory
[root@oratest1 /]# service vsftpd start
vsftpd: unrecognized service
[root@oratest1 /]# service ftpd start
ftpd: unrecognized service
[root@oratest1 /]# service ftp start
ftp: unrecognized service
[root@oratest1 /]#

I don't have anything, yet I do get a ftp> prompt.
Kerem ERSOYPresidentCommented:
yeah but lets put it ths way:
when you query the service with chkconfig it is the ftp server.
When you run ftp you get the "ftp>" prompt from the ftp client. Ftp client comes with every linux distro (the client).

But for server you need to set-up the server first. So the first part which can not find or activate any ftp service simple means that you don't have an operational ftp server (daemon) nor it is installed.

So install it first with a command such as:
up2date install vstpd

then run it the way told you earlier

So just
4) ftp isn't turned on on the remote side
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now