rsync errors - even rsync can go bananas!

mail

rsync: failed to set times on "/path/to/file": Operation not permitted (1)

Situation

Details

This looks pretty similar to this error, albeit I've found no strict evidence / clear explanation yet. I can't either touch nor chmod files on the destination.
Only the file owner can change the file timestamp.

Solution

Workarounds :
mail

rsync: [generator] symlink failed: Operation not supported (95)

Situation

I got this error while rsyncing data from a local filesystem to a network share served by Samba :
rsync: [generator] symlink "/sambaMountPoint/symlink" -> "/sambaMountPoint/path/to/someFile" failed: Operation not supported (95)

Details

This is not an rsync bug / limitation : rsync can't create a symlink on a Samba share, and nobody could (at least, with current/default options ) : trying to create a symlink there manually would fail similarly.

Solution

How to enable support of symlinks on Samba shares ?
mail

rsync: failed to set permissions on "/path/to/file": Operation not permitted

Situation

It's all in the title :

Details

Solution

As a workaround, if you're not interested in preserving file permissions, you can disable rsync's -p with --no-perms.
mail

skipping directory .

While experimenting / debugging rsync commands, you may end with very basic commands such as :
rsync /src/foo /dest
actually transferring nothing and ending on :
skipping directory .
This is because -r (either explicit or implied by -a) is missing and rsync has nothing to transfer.
mail

Error reading response length from authentication socket.

Situation

This message looks more like a warning than an actual error (?). Anyway, it seems to be related to a local ssh agent issue

Details

Could be caused by :
I experimented a bit on the machine having the issue, but after playing around I've not been able to reproduce it anymore. So more details someday (... maybe )
mail

protocol version mismatch -- is your shell clean?

Situation

Full error message :
protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(176) [sender=3.1.1]

Details

man rsync + searching for mismatch gives further information : while trying to rsync over SSH, it seems that the remote shell opening returns some unexpected data. To figure this out :

ssh bob@remoteHost /bin/true

In normal situations, this should return nothing. Otherwise, the error message you'll see is the reason why rsync fails.
For instance, when it said This account is currently not available, it's because Bob had his shell set to /usr/sbin/nologin in /etc/passwd.

Solution

Changing Bob's shell to /bin/sh fixed the issue.
mail

Unexpected remote arg

The error has to do with how the nested double/single quotes are treated when the variables are expanded. Looks like rsync dislikes its arguments being quoted : rsync "--dry-run"
mail

ksh: rsync: not found when trying to rsync files between a Linux and a Solaris machine

Situation

The complete error message is :
ksh: rsync: not found
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: remote command not found (code 127) at io.c(600) [receiver=3.0.6]

Details

This is caused by the PATH variable not having the same value on both ends of the connection.

Solution

rsync --rsync-path=/usr/local/bin/rsync [other rsync parameters]

/usr/local/bin/rsync is the path to the rsync binary on the Solaris machine.