{"id":755,"date":"2014-11-25T00:57:24","date_gmt":"2014-11-25T05:57:24","guid":{"rendered":"http:\/\/xfloyd.net\/blog\/?p=755"},"modified":"2014-12-20T11:00:17","modified_gmt":"2014-12-20T16:00:17","slug":"rsyncd-with-cygwin","status":"publish","type":"post","link":"https:\/\/xfloyd.net\/blog\/?p=755","title":{"rendered":"Rsyncd with Cygwin"},"content":{"rendered":"<h2><span id=\"Configuration\" class=\"mw-headline\">Configuration<\/span><\/h2>\n<p>Create the \/etc\/rsyncd.secrets file and add the user <strong>[xfloyd]<\/strong> with password <b>[password] <\/b>separated by a colon.<\/p>\n<p><!--more--><\/p>\n<pre>xfloyd:<b>secretword<\/b>\r\n<\/pre>\n<p>Set secure permissions on \/etc\/rsyncd.secrets<\/p>\n<pre>chown 18.544 \/etc\/rsyncd.secrets\r\nchmod 660 \/etc\/rsyncd.secrets\r\n<\/pre>\n<p>Create the \/etc\/rsyncd.conf configuration file.<\/p>\n<pre>gid = 544\r\nuid = 18\r\nauth users = xfloyd\r\nsecrets file = \/etc\/rsyncd.secrets\r\nread only = true\r\nuse chroot = no\r\n\r\n[xfloyd]\r\npath = \/home\/xfloyd\r\ncomment = xfloyd home dir\r\n<\/pre>\n<p>Install rsyncd as a service.<\/p>\n<pre>cygrunsrv --install \"rsyncd\" --path \/usr\/bin\/rsync --args \"--daemon --no-detach\" \\\r\n--desc \"Starts a rsync daemon for accepting incoming rsync connections\" \\\r\n--disp \"Rsync Daemon\" --type auto\r\n<\/pre>\n<p>Start the rsyncd service<\/p>\n<pre>net start rsyncd \r\n<\/pre>\n<p>Don&#8217;t forget to open port 873 for the IP address of the Affa server in the Windows firewall.<\/p>\n<h2><span id=\"Security\" class=\"mw-headline\">Security<\/span><\/h2>\n<p>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.<\/p>\n<h2><span id=\"Uninstall\" class=\"mw-headline\">Uninstall<\/span><\/h2>\n<p>Login with the local Administrator account and run the<span class=\"Apple-converted-space\">\u00a0<\/span><i>Cygwin Bash Shell<br \/>\n<\/i>Stop services<\/p>\n<pre>net stop sshd\r\nnet stop rsyncd \r\n<\/pre>\n<p>Uninstall services<\/p>\n<pre>sc delete sshd\r\nsc delete rsyncd\r\n<\/pre>\n<p>Remove local user sshd<\/p>\n<pre>net user \/delete sshd\r\n<\/pre>\n<p>Remove local sshd_server<span class=\"Apple-converted-space\">\u00a0<\/span><i>(Windows 2003 server only)<\/i><\/p>\n<pre>net user \/delete sshd_server\r\n<\/pre>\n<h2>Optional<\/h2>\n<p>One can control access to rsync by IP address or hostname. To accomplish this, you can use either of the &#8220;hosts allow&#8221; or &#8220;hosts deny&#8221; directives. The line(s) should go in the block following the module name (in this case, somewhere after &#8220;[xfloyd]&#8221;), and take the format:<\/p>\n<pre>hosts allow = 192.168.0.0\/24\r\n<\/pre>\n<p>And if you want to test it quickly just try this:<\/p>\n<pre>rsync rsync:\/\/rsync@HOST-NAME\/<\/pre>\n<p>This should list all the modules available<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Configuration Create the \/etc\/rsyncd.secrets file and add the user [xfloyd] with password [password] separated by a colon.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[],"_links":{"self":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/755"}],"collection":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=755"}],"version-history":[{"count":12,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/755\/revisions"}],"predecessor-version":[{"id":802,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/755\/revisions\/802"}],"wp:attachment":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=755"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}