FTP Client on CentOS 6.0

Issues related to applications and software problems
webtcetera
Posts: 5
Joined: 2012/04/29 19:50:24

FTP Client on CentOS 6.0

Post by 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]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[/code]

How can I install this package?

Regards

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: FTP Client on CentOS 6.0

Post by 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]
# 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
[/code]

Do you have any exclude= lines in /etc/yum.conf or /etc/yum.repos.d/*.repo?

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

Re: FTP Client on CentOS 6.0

Post by webtcetera » 2012/04/29 20:34:42

My datacenter installed the OS.
In /etc/yum.conf I have this:
[code]# 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$[/code]
May I remove the *ftp*?

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: FTP Client on CentOS 6.0

Post by 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.

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

Re: FTP Client on CentOS 6.0

Post by webtcetera » 2012/04/29 20:56:57

Ok, thank you very much.
I will talk to them.

User avatar
vonskippy
Posts: 839
Joined: 2006/12/30 03:00:04
Location: Western Slope Colorado

FTP Client on CentOS 6.0

Post by 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.

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

Re: FTP Client on CentOS 6.0

Post by webtcetera » 2012/04/29 21:17:28

[quote]
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.[/quote]

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

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

Post by 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)

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: FTP Client on CentOS 6.0

Post by AlanBartlett » 2012/04/30 01:34:55

Perhaps [b]scp[/b] will be something to consider?

[code]
[b]man scp[/b]
[/code]

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: FTP Client on CentOS 6.0

Post by 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.

Post Reply