I have a PC which has been upgraded from Windows 7 to Windows 10. At some point during one of the upgrades, some accounts have been “upgraded”. It all looks seamless until you take a look with Cygwin, which I use to make some backups.
And herein lies the problem.
$ ls -l d---r-xrwx+ 1 Unknown+User Unknown+Group 0 Apr 6 2014 '2007 Photos' d---r-xrwx+ 1 Unknown+User Unknown+Group 0 Apr 6 2014 '2008 Photos' d---r-xrwx+ 1 Unknown+User Unknown+Group 0 Apr 28 2014 '2009 Photos' d---r-xrwx+ 1 Unknown+User Unknown+Group 0 Jun 12 2014 '2010 Photos' drwxr-xrwx+ 1 Andy None 0 Apr 28 2018 '2011 Photos' d---r-xrwx+ 1 Unknown+User Unknown+Group 0 Nov 23 2014 '2012 Photos' d---r-xrwx+ 1 Unknown+User Unknown+Group 0 Mar 23 2016 '2013 Photos' d---r-xrwx+ 1 Unknown+User Unknown+Group 0 Dec 30 2014 '2014 Photos' drwxr-xrwx+ 1 Andy None 0 Jan 28 20:46 '2015 Photos' drwxr-xrwx+ 1 Andy None 0 Sep 24 2017 '2016 Photos' drwxr-xrwx+ 1 Andy None 0 Apr 28 2018 '2017 Photos' drwxr-xrwx+ 1 Andy None 0 Jan 9 16:58 '2018 Photos' drwxr-xrwx+ 1 Andy None 0 Jan 9 16:48 '2019 Photos'
All the above are really owned by user “Andy”, and have been since 2007, but somewhere along the line, maybe in a Win10 upgrade, they’be been re-owned by the operating system.
This is now a problem when I back up using a shell-script in Cygwin because I was using rsync
rsync -avz "${SOURCE_ROOT}/${DIR}/" "${REMOTE_USER}@${REMOTE_ADDR}:\"${DEST_ROOT}/${DIR}\""
This used to work, but now it doesn’t because the -a flag to rsync includes the instruction to
copy file permissions. which
A little look in the manual reminds me that -a is a combination of other
flags (-rlptgoD), and that includes the -p flag meaning “copy file permissions”. So
my rsync command now looks like this:
rsync -rltovz
I did also find a way of seeing these strange owners in Windows, but it was quite hidden: Right click on the folder in question and click “Properties”, then look in the “Sharing” tab:
Who’s that “Unknown Contact”? I suspect that’s actually the GUID of the original “Andy” account.