The Blog

Rsyncd with Cygwin Posted on

Configuration

Create the /etc/rsyncd.secrets file and add the user [xfloyd] with password [password] separated by a colon.

xfloyd:secretword

Set secure permissions on /etc/rsyncd.secrets

chown 18.544 /etc/rsyncd.secrets
chmod 660 /etc/rsyncd.secrets

Create the /etc/rsyncd.conf configuration file.

gid = 544
uid = 18
auth users = xfloyd
secrets file = /etc/rsyncd.secrets
read only = true
use chroot = no

[xfloyd]
path = /home/xfloyd
comment = xfloyd home dir

Install rsyncd as a service.

cygrunsrv --install "rsyncd" --path /usr/bin/rsync --args "--daemon --no-detach" \
--desc "Starts a rsync daemon for accepting incoming rsync connections" \
--disp "Rsync Daemon" --type auto

Start the rsyncd service

net start rsyncd 

Don’t forget to open port 873 for the IP address of the Affa server in the Windows firewall.

Security

The rsync daemon protocol does not provide any encryption of the data that is transferred over the connection. Use it only in the local net or VPN.

Uninstall

Login with the local Administrator account and run the Cygwin Bash Shell
Stop services

net stop sshd
net stop rsyncd 

Uninstall services

sc delete sshd
sc delete rsyncd

Remove local user sshd

net user /delete sshd

Remove local sshd_server (Windows 2003 server only)

net user /delete sshd_server

Optional

One can control access to rsync by IP address or hostname. To accomplish this, you can use either of the “hosts allow” or “hosts deny” directives. The line(s) should go in the block following the module name (in this case, somewhere after “[xfloyd]”), and take the format:

hosts allow = 192.168.0.0/24

And if you want to test it quickly just try this:

rsync rsync://rsync@HOST-NAME/

This should list all the modules available

This entry was posted in Cygwin. Bookmark the permalink.

Please Post Your Comments & Reviews

Your email address will not be published. Required fields are marked *



CAPTCHA
Change the CAPTCHA codeSpeak the CAPTCHA code