The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Permission Denied (13) Rsync

Discussion in 'Data Protection' started by Shane3673, Feb 4, 2014.

  1. Shane3673

    Shane3673 Well-Known Member

    Joined:
    Dec 20, 2013
    Messages:
    96
    Likes Received:
    1
    Trophy Points:
    8
    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
     
  2. jpearl

    jpearl Member

    Joined:
    Oct 28, 2011
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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.
     
  3. Shane3673

    Shane3673 Well-Known Member

    Joined:
    Dec 20, 2013
    Messages:
    96
    Likes Received:
    1
    Trophy Points:
    8
    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.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page