Skip to content
Latchkey

rsync Exit Code 23: Partial Transfer in CI

rsync exit code 23 means "partial transfer due to error": rsync finished but some files or attributes did not transfer.

Code 23 is the most common non-fatal rsync failure in CI. The transfer mostly worked, so the message is easy to miss until the job fails.

What it does

Exit 23 is reported as "rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c". It means rsync completed but at least one file or attribute (permission, owner, time) could not be applied. Earlier lines in the log name the specific files that failed.

What triggers it

CauseTypical fix
Cannot set owner (not root)Drop -o, or use --rsync-path="sudo rsync"
Cannot set times on mountAdd --no-t or -O / --omit-dir-times
A file vanished mid-transferRe-run; or exclude volatile paths
Permission denied on a fileFix source perms or destination ACLs
Read error on a source fileInvestigate the named file

Common usage

Terminal
# Find the real cause: read the lines BEFORE the code 23 line
rsync -av dist/ user@host:/var/www/app/
# rsync: chown "/var/www/app/x" failed: Operation not permitted (1)
# rsync error: some files/attrs were not transferred (code 23)

In CI

Do not blanket-ignore code 23; read the preceding error lines. If the only failures are harmless attribute sets (owner or times you do not need), suppress just those with --no-o --no-t / -O so the run exits 0. Otherwise the failing files are a real problem.

Common errors in CI

The headline line is always "rsync error: some files/attrs were not transferred (see previous errors) (code 23)". The actionable detail is above it, for example "failed to set times ... Operation not permitted" or "chown ... Operation not permitted". Fix the named cause rather than the exit code.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →