Software⏱️ 2 min read📅 2026-05-31

How to Fix: rsync error: failed to set times on "/foo/bar": Operation not permitted

rsync error: failed to set times on "/foo/bar": Operation not permitted

Quick Answer: Try running rsync with the --set-times option, which forces rsync to update file timestamps regardless of permission issues.

The error 'Operation not permitted' when trying to set times on a file using rsync is often caused by the system's file system permissions. This error can occur even if the files are being transferred successfully.

💡 Why You Are Getting This Error

  • [Cause]

🔧 Proven Troubleshooting Steps

Method 1: Changing File Permissions

  1. Step 1: Open a terminal and navigate to the directory containing the file you're trying to transfer.

Method 2: Using rsync with --set-times Option

  1. Step 1: Run the following command to set the times on the file before transferring it: `rsync -a --set-times /source/path/ /destination/path/`

✨ Wrapping Up

[Wrap-up]

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions