Hello everyone, I am trying to set up an rsync server for backups over the WAN for about 25 servers. I have been doing fine with the backups, if I am using the user root as my way to push the data from the clients to the rsync server. When I try and use any other user besides root, I get the error on the server saying @ERROR:failed to open lock file. I looked at the man pages for rsync 2.6.6, and it states to use the -e "ssh -l "userid" " option but I am still getting errors. Here's my layout.>From the client this is what I am running/usr/local/bin/rsync --partial --progress --stats -vvvvan -e "ssh -l userid" /directory rsync-user@"server ip address"::"module name" I get connection and I am able to login but that's it. I get the following error on the client side: rsync: connection unexpectedly closed (0 bytes received so far) [sender] _exit_cleanup(code=12, file=io.c, line=434): entered rsync error: error in rsync protocol data stream (code 12) at io.c(434) _exit_cleanup(code=12, file=io.c, line=434): about to call exit(12) here's my /etc/rsyncd.conf on the rsync server transfer logging = true log format = %h %o %f %l %b log file = /var/log/rsyncd.log pid file = /var/run/rsyncd.pid uid = nobody gid = nobody use chroot = no max connections = 4 address = 10.210.4.64 [es0028] path = /pc1/snapshot/hourly.0/infermos/ read only = false comment = es0028 backup I am running the server on the command line with /usr/local/bin/rsync --daemon --config /etc/rsyncd.conf , and I made the ssh user home dir /etc just to test. So it can see rsyncd.conf. Still befuddled at this point. Any assistance would be greatly appreciated. Tim Clashin -------------- next part -------------- HTML attachment scrubbed and removed
On Mon, Aug 29, 2005 at 05:10:21PM -0500, Tim.Clashin@calcucare.com wrote:> When I try and use any other user besides root, I get the error on the > server saying @ERROR:failed to open lock file.Keep in mind that the rsyncd.conf file that rsync uses when it is not logging in as root is the one in the user's home dir, not the one in /etc. If that file, you may need to specify a pid file, a lock file, and a log file that a non-root user can write: lock file = /home/user/rsyncd/rsyncd.lock log file = /home/user/rsyncd/rsyncd.log pid file = /home/user/rsyncd/rsyncd.pid Also, you'll need to omit "uid = nobody" since a non-root user can't change the uid of the running process.> I am running the server on the command line with /usr/local/bin/rsync > --daemon --config /etc/rsyncd.confThat has no bearing on the client rsync command you listed. When you combine daemon host-syntax with a remote shell, you get a single-use daemon spawned on the remote system just for that one copy. If you want to talk to the already-running daemon process and still send your data via ssh, you should use ssh's connection forwarding (or perhaps stunnel). If ssh isn't mandatory, just drop the -e option from your client command and let rsync talk to the daemon directly. ..wayne..