FTP on Red Hat Linux

Posted on 2007-10-11
Last Modified: 2013-12-16
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?
Question by:pkowal74
    LVL 14

    Expert Comment

    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?

    Author Comment

    I get a:
    ftp: connect: Connection refused

    When I type ftp> open servername

    LVL 14

    Expert Comment

    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.
    LVL 30

    Expert Comment

    by:Kerem ERSOY
    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.

    Author Comment

    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.
    LVL 30

    Accepted Solution

    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
    LVL 14

    Expert Comment

    4) ftp isn't turned on on the remote side

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
    Configuring network clients can be a chore, especially if there are a large number of them or a lot of itinerant users.  DHCP dynamically manages this process, much to the relief of users and administrators alike!
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now