Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rsync SERVER fails

I have set up a rsync server -> /etc/rsyncd.conf

max connection = 5  
log file = /var/log/rsync.log  
[web]  
path = /srv/www/html  
read only = false  
list = yes  
hosts allow = 127.0.0.1  
uid = nobody  
gid = nobody  

[root@localhost www]# ls -l /srv/www/html/  
-rwxrwxrwx. 1 amit amit 8 Apr 28 10:37 index.html  

If I do

$rsync 127.0.0.1::
$web  

then it correctly shows the module name but if I do

$rsync 127.0.0.1::web  
@ERROR: chroot failed  
rsync error: error starting client-server protocol (code 5) at main.c(1503) [receiver=3.0.6]

I dont know why? I am testing working of rsync first on localhost as it failed rsync remotely.

like image 874
script_kiddie Avatar asked Apr 28 '13 20:04

script_kiddie


2 Answers

The solution is
In /etc/rsyncd.conf on server add

use chroot = false

I have no clue why its true by default. Got to the solution by luck while browsing rsync documentation. Hope this saves time for others.
Cheers

like image 171
script_kiddie Avatar answered Oct 05 '22 02:10

script_kiddie


I faced the same issue and noticed the path I was giving in the rsyncd.conf at the server end was wrong. Actual path was path=/usr/share/tomcat/webapps/folder but I was giving path=/usr/share/tomcat6/webapps/folder when I corrected the path is worked.So ensure that your path is correct has right ownership and permissions.

like image 28
aastha Avatar answered Oct 05 '22 03:10

aastha