Failed starting rsync daemon from a remote server(ssh)
hashproduct+rsync at gmail.com
Thu May 10 20:42:06 GMT 2007
On 5/10/07, wenjie zheng <wenjie.zheng at gmail.com> wrote:
> Has anyone tried to start a rsync daemon from a remote server?
> I tried to execute the following command from a remote server A, but failed
> [root at A ~]# ssh crcdev1 "su virtual -c
> \"/usr/local/fenbu/replication/bin/rsync -v --daemon
> @RSYNCD: 29
The trouble is that the stdin that sshd provides to rsync is a socket,
and when rsync's stdin is a socket, rsync assumes it is supposed to
handle a single request over that socket instead of entering the
background and listening for any number of requests on the port given
in the configuration file. To make rsync listen for requests,
redirect its stdin from /dev/null by adding </dev/null to the remote
command (it shouldn't matter whether the redirection is inside or
outside the su).
The special behavior when stdin is a socket was done so that "rsync
--daemon ..." would work as an xinetd command. However (attn. Wayne),
it seems to me that there's no need for the behavior because the
administrator could get the same effect by passing --server .
More information about the rsync