Desktop folder having my username cannot be deleted
In the process of setting up my new iMac, I had to run the Migration Assistant more than once. The upshot of this was a folder in "Deleted Users" having my username, which is "gws". There were other folders in Deleted Users having other user names, which I was able to delete. The folder-in-question's icon is faded whereas the other username folders which I easily deleted were normal.
I can move this folder to the trash, but emptying the trash pops the error message that it cannot be deleted because it's needed by the OS: "“uux” can’t be modified or deleted because it’s required by macOS". A similar message appears for the next directory in the folder when I click "skip" in the error dialog, and indeed for many many "skips" until I click "stop" to dispose of the message.
I pulled it back out and onto my desktop and have backed it up on an external drive.
I used "Get Info" to change the permissions to read & write for "everyone".
Here is how it looks in Terminal (this is in /Users/gws/Desktop):
drwxrwxr-x@ 12 root wheel 384 Mar 17. 13:35 gws
I noted that despite Get Info showing the permissions for "everyone" are read & write, the above file had no "w" in the 3rd permissions group. Using "sudo chmod 777 /Users/gws/Desktop/gws" did add the missing "'w", so the file then looked like:
drwxrwxrwx@ 12 gws staff 384 Mar 17 13:35 gws
This also failed with the same error dialog as described above.
My proper user directory is like this in Terminal (this of course is in /Users):
drwxr-xr-x@ 75 gws staff 2400 Mar 19 16:24 gws
I have tried booting in Recovery mode and disabling CIP then restarting. Same failure to delete.
I tried changing my username in "Users & Groups" and also renaming the "/Users/gws" folder to match, then restarting and logging in with the new user name without problem, yet trying to delete the desktop "gws" folder again failed with the same message.
How can I get rid of the "gws" folder from my Desktop folder?
Thanks!
iMac Line (2012 and Later)