Shane3673

Well-Known Member
Dec 20, 2013
96
1
58
cPanel Access Level
Root Administrator
I am using Rsync to backup files from my main Cpanel server to a failover Cpanel server. This is working fine. I am also trying to setup another CentOS server that is pretty much a file server for backups. I set Rsync up on this server the same way I did with the other 2. This server does not have Cpanel installed. When I try to Rsync the backups over I get permission denied errors. First I got the error of mkdir, so I copied the dirs/files over using scp which took a while. Now I get the error recv_generator: failed to stat: Permission denied (13).

I have looked all around the internet for a solution, but have had no luck. I have messed around using chown and chmod because that is what I found on the internet, but with still no luck. The cmd I am using is:

rsync -v -r /backup/ xx.xx.xx.xx::{site}/backup

This is the same cmd I am using to transfer from the first cpanel server to the second. It also works from the second cpanel server to the first. It will not work for either cpanel server to the CentOS backup file server.

I have created ssh keys for all of the servers and every one can ssh with root to the other two servers without a password.

Any Ideas?

Thanks
 

jpearl

Member
Oct 28, 2011
20
0
51
AZ
cPanel Access Level
Root Administrator
Hey, rsync to an empty partition. Here is what we do at my work. We boot into a live cd or other linux boot cd.

Create an ext3 partition.
Create /mnt/sysimage
Mount /dev/yourdev /mnt/sysimage

Then rsync to that folder.

It will create a nice image.

Add --exclude="proc" and --exclude="sys"

You can also use an auth ssh key to prevent the need for a password to let rsync do it's job.
 

Shane3673

Well-Known Member
Dec 20, 2013
96
1
58
cPanel Access Level
Root Administrator
Thanks for the suggestions. In the end I found that it was SELINUX that was affecting this. I disabled it and everything worked fine. Maybe during a Cpanel install something is changed with SELINUX because I had not problems with the CentOS machines with Cpanel on them, just the machine that didn't.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

I am happy to see the issue is now resolved. Thank you for updating us with the outcome. Note that cPanel does not recommend the use of SELinux and will not enable it during the installation.

cPanel Install - SELinux security feature

Thank you.