Cygwin rsync breaks NTFS file permissions (Windows 7, 8 and 10)

Copying Files Using rsync

I installed a new hard drive and used rsync in cygwin to copy everything from my two old hard drives to the new one using the command: rsync -ravu --progress /cygdrive/d /cygdrive/e /cygdrive/n

However, when I tried to update Steam, it complained about a network error - which was odd. I then tried to install something else to that drive and the installer said it could not access a file within a folder it had just created.

After a bit of searching I found that it was something to do with cygwin and POSIX not having a concept of inheriting permissions with NTFS. This meant I did not have any permissions on newly created directories or files!

Prevention

To prevent this issue I now use robocopy to copy files from one hard drive to another.

Solution

To solve this issue:

  • Open My Computer
  • Right click on the drive
  • Properties
  • Security tab
  • Advanced
  • Change Permissions…
  • Ensure all the permissions look ok
  • Check “Replace all child object permissions with inheritable permissions from this object” then
  • Press “OK”.

permission-screenshot-min

I waited a little while for all the file permissions to be changed and voilĂ !