Permissions errors after weird Time Machine restored backup

I made a time machine backup of everything that was in /Mac/Users/MYUSER/ and nothing else.

I then erased my drive and reinstalled MacOS.

When I tried to restore from my Time Machine Backup, it made a directory /Mac/2020-09-05-185317/ and did not place the files in the correct places, but instead put the file hierarchy inside /Mac/2020-09-05-185317/ so all my files were in /Mac/2020-09-05-185317/Mac/Users/MYUSER/. There are not a lot of files, so I decided to start moving them from that directory to their proper places manually myself.

Now when my ~/Music dir finished moving, I tried to open iTunes and I get "The folder “iTunes” is on a locked disk or you do not have write permissions for this folder.".

I've checked the permissions in the finder and the iTunes permissions says "MYUSER | Read & Write, staff | Read only, everyone | Read only". I then tried to rename the /Mac/Users/MYUSER/Music/iTunes directory and when doing so, it asks for my root/user password, which I thought was weird/unusual. After renaming the dir, I then opened iTunes and it created a new /Mac/Users/MYUSER/Music/iTunes directory so I compared an ls -la of the newly generated iTunes directory and the renamed copied directory and they matched/were the same.

I've read a few guides and see now that I did not copy over the /Mac/Users/Shared directory with my backup, and I cannot go back and grab it since I wiped my computer. Is this the problem?

I've also tried following This guide, and this guide but nothing has helped.

How do I fix the permissions problem?

NOTE: I am running Mac OS Sierra 10.12.6


Solution 1:

It ends up that you need to use the Mac Finder UI to set the permissions of the whole user home directory and not just the Music directory. I was able to fix the issue using the following steps:

  1. Opening Finder, navigate to my user/home directory (/Mac/Users/MYUSER) and show the "Get Info" pane
  2. Open the "Sharing and Permissions" drop down
  3. Clicking the Lock Icon and entering the User password
  4. Clicking the Gear Icon and selecting "Apply to enclosed items..."

This fixed all permissions issues I saw and iTunes was able to view and play music again.