setuid rsync

Daniel S. Cohen dsc at technocraft.com
Fri Feb 27 01:30:47 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I trying to create an automated backup from one machine to the other via
SSH.  I have setup ssh keys and so on, so everything is pretty much
working.  The only thing is, I am trying to perserve file ownership.  I
don't want to use ssh keys w/o a password (for obvious reasons), so I
what I did was this:

I setup a chrooted account called backup (using JAIL), and installed
rsync in the chrooted directory as setuid.  I changed some permissions
at the directory level so only backup has access to this directory (so
non-chrooted users can't access /backup/usr/local/, etc...).  Now, when
I run rsync from the remote server, it logins and creates all the files
with ownership "root" instead of "backup."

I am using rsync 2.6.0 with the following options:

rsync -a -v -e "ssh -l backup" --ignore-errors --delete --numeric-ids
- --link-dest=/backup/yesterday/ <source> <server>:/backup/machine/today/

Anyone have any ideas why the setuid rsync is not perserving ownership?
Any help or suggestions would be greatly appreciated.

Thanks,


Dan


- --
PGP Key: http://machine.technocraft.com/~dsc/pgpkey.html
- --

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAPp3H4CrJ04+9SNURAhAlAJ9/uqPWNJVuW/6GyFYZcSGcexmI7ACfZ+wU
WM+defub6nIR2t3TjIVV/uU=
=GAFT
-----END PGP SIGNATURE-----



More information about the rsync mailing list