First, I know that it was discussed before but I cannot seem to find a reliable solution for this...
I have CentOS 5 with Plesk panel on my remote server where I have sites that need to be backed up. Then I have a local CentOS 6 server with no cpanel (just Webmin installed if it maters).
I am trying to back up my sites from remote server to local server using rsync. It works ok with some new folders from server root but I cannot get into the www directory. I am getting permission errors.
Command is:
rsync -avz --progress [email protected]:/var/www/vhosts/site.com/httpdocs/ /_backups
Then it asks for password, I am entering it and after login it says:
rsync: link_stat "/var/www/vhosts/site.com/httpdocs/." failed: Permission denied (13)
Normally when I login by ssh to remote server I cannot login directly with "root"
but I login with "adrian"
and shows adrian@site in ssh window and then I type "su"
and it asks for password again, then I see root@site in ssh window.
So I assume is because of this I cannot do rsync directly with [email protected]
Any ideas?
Would it work to create a user adrian_rsync that has its home directory inside the www folder? If so, how can I do that?
Or maybe is there a way to pass the "su" and its password to the rsync command?
adrian
has permissions to read/var/www/vhosts/site.com/httpdocs/
? Have you tried after an ssh login, ifadrian
can navigate that directory?