read-only access without rsyncd?

Wayne Davison wayned at samba.org
Wed Jan 12 17:20:29 GMT 2005


On Wed, Jan 12, 2005 at 02:53:47PM +0100, Martin Schr?der wrote:
> Can I limit the rsync command on the server to read-only?

The "resources" page of the rsync website mentions Joe Smith's perl
script that lets you do what you want:

    http://www.inwap.com/mybin/miscunix/?rrsync

You'll need to put a command like this into your .ssh/authorized_keys
file:

    command="rrsync -ro /" ssh-rsa AAAAB3NzaC1yc2E...

The "rrsync" is the name of the script, -ro means read-only, "/" is a
directory for restricted access (since you wanted no restrictions), and
the rest is the ssh-key info.

Caveats: the script as written does not let you specify names with
spaces nor multiple items to fetch.  Also, the pathnames it constructs
when you restrict the path to "/" will begin with "//", so as long as
that doesn't cause problems on your OS, it should work OK for you.  I'm
working on some changes that should resolve these minor issues.

..wayne..


More information about the rsync mailing list