Software⏱️ 3 min read📅 2026-06-11

How to Fix: How to always let rsync continue when (permission denied) error occurs

Rsync permission denied error fix

Quick Answer: Use the --ignore-existing and --skip-permissions options with rsync to continue the transfer even if a file cannot be accessed due to permissions.

The rsync error 'Permission denied' can occur when the script is trying to copy files from a directory that does not have the necessary permissions. This issue affects users who are using rsync to synchronize files between different locations, such as syncing files between a local machine and a remote server.

This error can be frustrating because it prevents the rsync process from completing successfully. However, there is an alternative approach to resolve this issue: instead of stopping the process, we can let rsync continue and output the error protocol.

🔍 Why This Happens

  • The primary reason for this error is that the script is trying to copy files from a directory that does not have the necessary permissions. This can happen when the user has changed ownership or permissions of the directory without updating the rsync script accordingly.
  • Alternatively, it could be due to the fact that the script is running as a different user than the one who owns the directory.

🚀 How to Resolve This Issue

Use the --ignore-existing and -avz flags

  1. Step 1: To resolve this issue, you can use the '--ignore-existing' flag with rsync to ignore any files that already exist in the destination directory. This will prevent the script from stopping when it encounters a file that does not have the necessary permissions.
  2. Step 2: Additionally, using the '-avz' flags will allow rsync to continue even if some files cannot be transferred due to permission issues. The 'a' flag stands for 'archive', which enables the creation of archive files, while the 'v' flag increases verbosity and displays more detailed information about the transfer process.
  3. Step 3: This approach will let rsync continue running, but it may produce a longer log output with error messages.

Use the --ignore-permissions flag

  1. Step 1: Alternatively, you can use the '--ignore-permissions' flag with rsync to ignore any permission errors that occur during the transfer process. This will prevent the script from stopping when it encounters a file that does not have the necessary permissions.
  2. Step 2: However, using this flag may lead to security issues if the script is transferring sensitive data or accessing unauthorized directories.

💡 Conclusion

By using either of these methods, you can resolve the rsync error 'Permission denied' and let the process continue running even when encountering permission errors. Remember to always review your log output carefully to ensure that the transfer was successful and to identify any potential security issues.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions