Recipe 16.6. Building an Anonymous Public rsync Server

 < Day Day Up > 

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

  • rsync(1), rsyncd.conf(5)

  • Chapter 17

  • The rsync home page (http://rsync.samba.org)

  • Recipe 16.4, Chapter 16

     < Day Day Up > 


    Linux Cookbook
    Linux Cookbook
    ISBN: 0596006403
    EAN: 2147483647
    Year: 2004
    Pages: 434

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net