Rsync: error starting client-server protocol (code 5)

While setting up a new server, I encountered the, sometime vague, “error starting client-server protocol (code 5)” when trying to rsync the files from the box to be replaced.

On the source server, the in /var/log/messages, I found:

Apr 12 08:59:09 REDACTED rsyncd[19871]: auth failed on module etc from REDACTED (REDACTED): invalid challenge response

I was confident that the credentials were good, as I was using a copy of a script that worked.

I started poking around on the source server and found that the secrets file had permissions that allowed all users to read it. I’ve seen this type of issue before, I thought. I set the user and group for the secrets file to root.root. Then set it so only the user could write and the group could only read: chmod 0640 secrets. Now, I have this:

-rw-r—– 1 root root 14 Dec 20 2017 pwd
-rw-r—– 1 root root 21 Apr 12 08:48 secrets

And blessings be, it worked! Yay!

Happy Slacking!

Leave a Comment