SOLVED - see next reply!
This is probably too niche to ask here, but:
#Windows11 users - have you ever run across a file or directory that you can't access, and can't change permissions on, as administrator? If so, how do you fix it?
I'm trying to transfer files from an old laptop to a new laptop using rsync in cygwin, and I used my standard rsync -avz approach, which works great in Linux, but apparently totally bollixes up #Windows.
The directory it created looks like it has correct permissions, but when I try to open it, access is denied. I tried the below suggestions from various Internet forums, and they claimed success but didn't solve the problem - and the robocopy actually made a *second* cursed directory!
C:\Users\Lisa\Backups>cd X250
C:\Users\Lisa\Backups\X250>cd Personal
Access is denied.
C:\Users\Lisa\Backups\X250>takeown -F Personal
SUCCESS: The file (or folder): "C:\Users\Lisa\Backups\X250\Personal" now owned by user "LISA-T14S\Lisa".
C:\Users\Lisa\Backups\X250>icacls Personal /grant Lisa:(oi)(ci)f /inheritance:e
processed file: Personal
Successfully processed 1 files; Failed processing 0 files
C:\Users\Lisa\Backups\X250>cd Personal
Access is denied.
C:\Users\Lisa\Backups\X250>robocopy Personal Personal-fix /COPYALL /SECFIX /SEC
[stuff happens here...]
C:\Users\Lisa\Backups\X250>cd Personal-fix
Access is denied.
I'm going to try the rsync again without preserving permissions ( -vzrlt ) but I'd love to be able to access - or at least delete - these directories!!