It works. Thanks a lot! Wenjie
On 5/10/07, Matt McCutchen <[EMAIL PROTECTED]> wrote:
On 5/10/07, wenjie zheng <[EMAIL PROTECTED]> 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 > [EMAIL PROTECTED] ~]# ssh crcdev1 "su virtual -c > \"/usr/local/fenbu/replication/bin/rsync -v --daemon > --bwlimit=1000 > --config=/usr/local/fenbu/replication/conf/email_rsyncd.conf\" > " > > @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 . Matt
-- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html