4

When I try to install ftp:

$ sudo yum install ftp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
No package ftp available.
Error: Nothing to do

When I try to connect to my ftp:

$ ftp 10.2.4.202
-bash: ftp: command not found

Searching for ftp via yum:

$ sudo yum search ftp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
====================================================================== N/S Matched: ftp ======================================================================
curl.x86_64 : A utility for getting files from remote servers (FTP, HTTP, and others)
wget.x86_64 : A utility for retrieving files using the HTTP or FTP protocols

  Name and summary matches only, use "search all" for everything.

Trying the recommended following: yum install lftp, list *ftp*, install ncftp (same results):

$ sudo yum install lftp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
No package lftp available.
Error: Nothing to do

Trying lftp:

$ lftp 10.2.4.202
-bash: lftp: command not found

Output of yum repolist:

$ sudo yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
repo id                repo name                         status
CactiEZ                CactiUsers Cactiez Repo           30
pgdg93                 PostgreSQL 9.3 6 - x86_64         195
repolist: 225
9
  • 2
    az93 since yesterday you have shown no search skills at all a simple lmgtfy.com/?q=ftp+client+centos would give you the answer on the second link. please start thinking instead of only relying on other's skill. Please reinstall your OS or try to express your issue being precise refer to stackoverflow.com/questions/how-to-ask – Kiwy Jan 16 '14 at 14:33
  • Kiwy >> I tried this. It doesn't work as I said before – az93 Jan 16 '14 at 14:43
  • What is your Linux distribution? If it is RHEL, CentOS, or Fedora, there should be an "ftp" RPM with a ftp command. It's not necessarily the most user-friendly choice, but it's there. Something else is wrong on your system. – mattdm Jan 16 '14 at 14:50
  • It's CentOS 6.3 – az93 Jan 16 '14 at 14:51
  • 1
    I'm a little tempted to reopen this, because the issue isn't really with FTP per se. It's that the system is very messed up. You should have at least a centos repository enabled. No wonder yum can't find anything -- all it has are the postgresql repo and this cactus thing. – mattdm Jan 16 '14 at 16:42
4

The output of this command sequence:

$ sudo yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
repo id                repo name                         status
CactiEZ                CactiUsers Cactiez Repo           30
pgdg93                 PostgreSQL 9.3 6 - x86_64         195
repolist: 225

Would seem to indicate that your YUM installation and repositories is severely damaged. To debug this further I'd need to see what repository files you actually do have in your /etc/yum.repos.d directory.

The standard YUM repository .repo files should be owned by a package called centos-release-*. You can confirm like so:

$ rpm -qf /etc/yum.repos.d/CentOS-Base.repo

If this directory has been damaged, you could manually re-add these files or re-install using the appropriate CentOS .rpm file.

3

Follow the steps below to configure your FTP server:

First Solution:

1. Install vsftpd

$ sudo yum -y update

Then install vsftpd server (very secure FTP daemon) and any required packages:

$ yum -y install vsftpd

2. Configure vsftpd

Open the file below with any TextEditor you're comfortable with. My choice is always vi or vim.

$ vi /etc/vsftpd/vsftpd.conf

You need do disallow unidentified users:

anonymous_enable=NO

Allow local users:

local_enable=YES

If you wanna let local users write to a directory, use:

write_enable=YES

When the line below is set to Yes, all the local users will be jailed within their chroot and will be denied access to any other part of the server:

chroot_local_user=YES

Great, you can now restart the service to apply changes:

$ service vsftpd restart     /*CentOS 6*/
$ chkconfig vsftpd on        /*To set the service to start at boot*/

OR

$ systemctl restart vsftpd   /*CentOS 7*/
$ systemctl enable vsftpd    /*To set the service to start at boot*/

N.B. If you're on CentOS 7, you need to allow it through the firewall:

$ firewall-cmd --permanent --add-port=21/tcp
$ firewall-cmd --reload

D.M. FTP is inertially insecure, so consider using it over SSL/TLS via sFTP command, unless you really have to use FTP.

Second Solution:

If the above instruction couldn't help, do the following:

On 64-bit:

wget -c http://mirror.centos.org/centos/6/os/x86_64/Packages/ftp-0.17-51.1.el6.x86_64.rpm

On 32-bit:

wget -c http://mirror.centos.org/centos/6/os/i386/Packages/ftp-0.17-51.1.el6.i686.rpm

Then, install it:

rpm -ivh ftp-0.17-51.1.el6.x86_64.rpm     /*64-bit*/

OR

rpm -ivh ftp-0.17-51.1.el6.i686.rpm       /*32-bit*/

I hope I could help.

0
1

Install FTP client for CentOS 7:

# wget -c http://mirror.centos.org/centos/6/os/x86_64/Packages/ftp-0.17-54.el6.x86_64.rpm
# rpm -ivh ftp-0.17-54.el6.x86_64.rpm

Usage:

# ftp -h

        Usage: { ftp | pftp } [-Apinegvtd] [hostname]
           -A: enable active mode
           -p: enable passive mode (default for ftp and pftp)
           -i: turn off prompting during mget
           -n: inhibit auto-login
           -e: disable readline support, if present
           -g: disable filename globbing
           -m: don't force data channel interface to the same as control channel
           -v: verbose mode
           -t: enable packet tracing [nonfunctional]
           -d: enable debugging
0

There are many different ftp clients. To get a list of them, do

yum list \*ftp\*

Two common ones are lftp and ncftp. TO install either of them, do

yum install ncftp

or

yum install lftp

Then use whichever one you installed, by using the command lftp or ncftp instead of just ftp.

10
  • I tried all of these. Always same result "Error: Nothing to do" – az93 Jan 16 '14 at 14:34
  • What is your $PATH? – Jenny D Jan 16 '14 at 14:38
  • /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin – az93 Jan 16 '14 at 14:41
  • What happens if you type ncftp? – Jenny D Jan 16 '14 at 14:44
  • command not found – az93 Jan 16 '14 at 14:47
-1

There is no rpm package called ftp. To see all packages that contain ftp you type :

yum search ftp

If you want a ftp client you could use lftp. To install it:

yum install lftp

Then use it :

lftp 10.2.4.202
1
  • See the edit. It doesn't work. – az93 Jan 16 '14 at 14:33
-1

You need to install FTP. To install ftp , run the below command.

# yum -y install ftp

For more please click here.

-2

I recommend you to use

$:yum search ftp

it will show you all the packages containing ftp word. I believe that the one you have to install is

yum install ftp.x86_64

good luck!

1
  • 1
    How about reading the question, especially the part that says "Searching for ftp via yum"... – don_crissti Aug 2 '16 at 18:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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