FTP Client on CentOS 6.0

Issues related to applications and software problems

FTP Client on CentOS 6.0

Postby webtcetera » 2012/04/29 20:03:19

Hello,

In my previous server, I was using a script to make backups to another server.
In that script I user the ftp command.
ftp -n $ftpserver
user $ftpuser $ftppass

I noticed that my script wasn't working in the new server.
The error is:
bash: ftp: command not found

I checked and I only have the ftp server (proftpd) installed. I need to install ftp client but I wasn't able to use this command:
yum install ftp
Code: Select all
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: mirror.duomenucentras.lt
 * extras: mirror.duomenucentras.lt
 * rpmforge: archive.cs.uu.nl
 * updates: mirror.duomenucentras.lt
Setting up Install Process
No package ftp available.
Error: Nothing to do


How can I install this package?

Regards
webtcetera
 
Posts: 5
Joined: 2012/04/29 19:50:24

Re: FTP Client on CentOS 6.0

Postby TrevorH » 2012/04/29 20:22:10

Is this a system you installed yourself? There should be a package 'ftp' available, I see it here when I do

Code: Select all
# yum provides \*/bin/ftp

ftp-0.17-51.1.el6.x86_64 : The standard UNIX FTP (File Transfer Protocol) client
Repo        : base
Matched from:
Filename    : /usr/bin/ftp


Do you have any exclude= lines in /etc/yum.conf or /etc/yum.repos.d/*.repo?
User avatar
TrevorH
Forum Moderator
 
Posts: 9168
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: FTP Client on CentOS 6.0

Postby webtcetera » 2012/04/29 20:34:42

My datacenter installed the OS.
In /etc/yum.conf I have this:
Code: Select all
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
exclude=apache* httpd* mod_* mysql* MySQL* da_* *ftp* exim* sendmail* php* bind$

May I remove the *ftp*?
webtcetera
 
Posts: 5
Joined: 2012/04/29 19:50:24

Re: FTP Client on CentOS 6.0

Postby TrevorH » 2012/04/29 20:41:38

Oh dear :-( The fact that they are excluding so much implies that they have butchered it and installed non-standard versions of all packages that match those patterns. You'll need to find out what they've changed and how it affects things before you can decide if you can remove any of those matches. Hopefully they are a reputable bunch who are going to maintain up to date versions of all the things they've replaced as security vulnerabilities are found in them. You might want to consider identifying all the changes they've made to the o/s and installing vanilla CentOS versions of them all - but you need to know what they've done and why and the best people to answer that are the DC themselves. A quick look at the output of `uname -a` might be interesting too since they may also have replaced the kernel.
User avatar
TrevorH
Forum Moderator
 
Posts: 9168
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: FTP Client on CentOS 6.0

Postby webtcetera » 2012/04/29 20:56:57

Ok, thank you very much.
I will talk to them.
webtcetera
 
Posts: 5
Joined: 2012/04/29 19:50:24

FTP Client on CentOS 6.0

Postby vonskippy » 2012/04/29 21:03:43

With all the repo restrictions, it looks like a Control Panel is installed. So doing a straight up "yum update" would bork the control panel, hence the restrictions.

As to using FTP.

DON'T (do NOT) use.

FTP sends everything including the username/password in clear text. You're just begging to have your box compromised (if it's not already).

Use RSYNC, it's secure, it's quick (because you can setup compression), and it's easy. Did I mention it's SECURE.

FTP, like TELNET is a dinosaur that should be scrubbed from all the systems on the planet.
User avatar
vonskippy
 
Posts: 686
Joined: 2006/12/30 03:00:04
Location: Western Slope Colorado

Re: FTP Client on CentOS 6.0

Postby webtcetera » 2012/04/29 21:17:28

FTP sends everything including the username/password in clear text. You're just begging to have your box compromised (if it's not already).

Use RSYNC, it's secure, it's quick (because you can setup compression), and it's easy. Did I mention it's SECURE.

FTP, like TELNET is a dinosaur that should be scrubbed from all the systems on the planet.


My actual script works this way (sending the sql backups to another host):
Code: Select all
    # Upload the backup
    ftp -n $ftpserver <<!EOF!
    user $ftpuser $ftppass
    binary
    prompt
    mput *.sql.gz
    quit
    !EOF!


Is it simple to adapt it to RSYNC commands?
Can you help in the code?
webtcetera
 
Posts: 5
Joined: 2012/04/29 19:50:24

Re: FTP Client on CentOS 6.0

Postby webtcetera » 2012/04/29 23:07:23

Is there any other protocols that I can use to transfer files to another server? (excluding rsync and ftp)
webtcetera
 
Posts: 5
Joined: 2012/04/29 19:50:24

Re: FTP Client on CentOS 6.0

Postby AlanBartlett » 2012/04/30 01:34:55

Perhaps scp will be something to consider?

Code: Select all
[b]man scp[/b]
User avatar
AlanBartlett
Forum Moderator
 
Posts: 8975
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk

Re: FTP Client on CentOS 6.0

Postby jlehtone » 2012/04/30 07:47:40

scp, sftp, and rsync (now by default) actually all use same protocol for authentication and transfer: ssh. That is secure.

A radically different protocol would be mounting the remote filesystem via NFS, sshfs, samba. Then you would do a "local copy". I'd use rsync for that too.

There is a lot of text about rsync on the net and its manpage is extensive too.
User avatar
jlehtone
 
Posts: 1431
Joined: 2007/12/11 08:17:33
Location: Finland

Next

Return to CentOS 6 - Software Support

Who is online

Users browsing this forum: Google [Bot] and 10 guests