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.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With