Previous Section  < Day Day Up >  Next Section

Recipe 16.6. Building an Anonymous Public rsync Server

16.6.1 Problem

You want to distribute software or other files, using an rsync-enabled server to conserve bandwidth. So you'll need anonymous access for downloads, and restrictions on who can upload files to the server.

16.6.2 Solution

First, build an rsync server as described in Recipe Recipe 16.4. Then make all public modules read-only, and be sure that permissions on directories do not allow write access to anyone but user and group owners. To upload files to your server, use rsync over ssh.

16.6.3 Discussion

To make a module read-only, add this line to the section for the module in rsyncd.conf:

read only = yes

Remember, the syntax for uploading files via ssh is a little different than the syntax for uploading files when rsync is running in daemon mode. You'll want to specify the true directory name, not the module name, and use only a single colon:

$ rsync -av -e ssh  /webfiles  rsyncadmin@stinkpad.test.net:/www/public

Password:

16.6.4 Discussion

If you want to automate nightly uploads over ssh, see Recipe Recipe 16.9.

16.6.5 See Also

    Previous Section  < Day Day Up >  Next Section