rsync reports "some files could not be transferred" (code 23) when problems occur with password-file

Bas van Schaik bas at
Thu Nov 1 11:59:32 GMT 2007

Hi all,

I think I just found a small bug in rsync... It has costed me about half
an hour searching for a problem which actually didn't exist!

If you use rsync like this:
> rsync --password-file=/tmp/non-existing-file /tmp/somefile foo at bar::tmp/

Rsync will ask for the password since the supplied file doesn't exist:
> rsync: could not open password file "/tmp/non-existing-file": No such
> file or directory (2)
> Password:
> rsync error: some files could not be transferred (code 23) at
> main.c(977) [sender=2.6.9]

But actually, the file '/tmp/somefile' did get transferred to server
'bar'. When not supplying the bogus password file, rsync will again ask
for the password, but not report the code 23.

Bottom line: rsync reports a code 23 when there's a problem with the
password file, even when the right password is supplied and files are


  -- Bas van Schaik

More information about the rsync mailing list