rsync as root (Was: [CentOS-mirror] New Mirror)

Wed Jul 30 06:02:56 UTC 2008
Brandon Davidson <brandond at uoregon.edu>

> rsync does not have any code to listen on a socket. The only way it has to 
> communicate is using pipe with STDIN/STDOUT. Network connection are done 
> either by ssh/rsh, either by (x)inetd.

Have you read the man page lately?

        Rsync can also be run as a daemon, in which case the following 
options are accepted:

             --daemon                run as an rsync daemon
             --address=ADDRESS       bind to the specified address
             --bwlimit=KBPS          limit I/O bandwidth; KBytes per second
             --config=FILE           specify alternate rsyncd.conf file
             --no-detach             do not detach from the parent
             --port=PORT             listen on alternate port number
             --log-file=FILE         override the "log file" setting
             --log-file-format=FMT   override the "log format" setting
             --sockopts=OPTIONS      specify custom TCP options
         -v, --verbose               increase verbosity
         -4, --ipv4                  prefer IPv4
         -6, --ipv6                  prefer IPv6


>> What do you guys do?

I run it via inetd, with inetd spawning as root and uid=rsync gid=rsync 
in rsyncd.conf.

I also run my pull as the rsync user, via a crontab entry.

-Brandon