rsync Errors — Permission Denied, Connection Failed, and Partial Transfer Fixes
About rsync Errors
Fix rsync errors including permission denied, connection refused, partial transfer, and SSH authentication failures during file synchronization. This guide covers everything you need to know about this topic, including common causes, step-by-step solutions, and answers to frequently asked questions.
Here are the key things to understand: rsync synchronizes files between local and remote systems efficiently using delta encoding. Remote rsync uses SSH by default — SSH authentication must be configured. Permission issues are common when syncing as root vs normal user or across different systems. The --delete flag removes files from destination that do not exist in source — use with caution. Partial transfers can be resumed with --partial and --append-verify flags. Understanding these fundamentals will help you diagnose and resolve this issue more effectively.
The most common reasons this occurs include: SSH key authentication not configured for the remote server. File permissions or ownership differing between source and destination systems. Disk space exhaustion on the destination causing partial transfer. Network interruption during large file transfer. Identifying the root cause is the first step toward finding the right solution.
To resolve this, follow these recommended steps: Test SSH first: 'ssh user@remote-host' to verify authentication works before using rsync. Preserve permissions: 'rsync -avz --no-perms --no-owner --no-group source/ user@host:dest/'. Resume interrupted transfer: 'rsync -avz --partial --progress source/ user@host:dest/'. Dry run first: 'rsync -avzn --delete source/ dest/' — the -n flag shows what would happen without doing it. For large transfers: use --bwlimit=1000 to limit bandwidth to 1000 KB/s and avoid saturating the network. If these steps do not resolve the issue, consider consulting additional resources or a qualified professional.
This article is part of our Linux Error Codes collection on Error Codes Wiki. We provide comprehensive, up-to-date information to help you find solutions quickly.
Quick Answer
What does rsync -avz mean?
-a is archive mode (preserves permissions, timestamps, symlinks, recursion). -v is verbose output. -z enables compression during transfer. This is the most common rsync flag combination.
Overview
Fix rsync errors including permission denied, connection refused, partial transfer, and SSH authentication failures during file synchronization.
Key Details
- rsync synchronizes files between local and remote systems efficiently using delta encoding
- Remote rsync uses SSH by default — SSH authentication must be configured
- Permission issues are common when syncing as root vs normal user or across different systems
- The --delete flag removes files from destination that do not exist in source — use with caution
- Partial transfers can be resumed with --partial and --append-verify flags
Common Causes
- SSH key authentication not configured for the remote server
- File permissions or ownership differing between source and destination systems
- Disk space exhaustion on the destination causing partial transfer
- Network interruption during large file transfer
Steps
- 1Test SSH first: 'ssh user@remote-host' to verify authentication works before using rsync
- 2Preserve permissions: 'rsync -avz --no-perms --no-owner --no-group source/ user@host:dest/'
- 3Resume interrupted transfer: 'rsync -avz --partial --progress source/ user@host:dest/'
- 4Dry run first: 'rsync -avzn --delete source/ dest/' — the -n flag shows what would happen without doing it
- 5For large transfers: use --bwlimit=1000 to limit bandwidth to 1000 KB/s and avoid saturating the network