I do not have a direct answer, but I can offer some background that might help.
.. As you do this stuff, it is important to know it is possible make your system unbootable with small mistake. Specifically, if you put a file into /Library/LaunchAgents that is writable by any account except the root account, the system will not boot with the volume containing that condition.
.. It is easy to learn and use the simple commands associated with file ownership and permissions. every file and directory is assigned and owner and group. A group is set of accounts put into a group for managing permissions. Permissions are set as some combination of read-write-execute for the owner, the group, and everyone else. As an example, the permissions might be set as read-write-execute (abbreviated rwx) for the owner, and rx for the group and just r or everyone else. That shows up in file listings as
rwxr-xr-- filename
The owner and group also can be included in the file listing... Here is a real sample
drwx------@ 65 dan staff 2080 Sep 23 17:23 ./
drwxr-xr-x+ 26 dan staff 832 Sep 26 06:43 ../
-rw-r--r--@ 1 dan staff 20484 Sep 19 03:03 .DS_Store
-rw-r--r-- 1 dan staff 0 Sep 9 13:25 .localized
drwxr-xr-x 6 dan staff 192 Sep 11 14:42 Accounts/
drwx------ 78 dan staff 2496 Sep 25 20:09 Application Scripts/
drwx------+ 50 dan staff 1600 Sep 26 02:13 Application Support/
drwxr-xr-x 11 dan staff 352 Sep 26 13:02 Assistant/
drwx------+ 2 dan staff 64 Sep 9 13:25 Assistants/
drwx------+ 5 dan staff 160 Sep 9 13:25 Audio/
drwx------+ 2 dan staff 64 Sep 20 22:47 Autosave Information/
drwx------+ 87 dan staff 2784 Sep 26 10:18 Caches/
drwxr-xr-x@ 14 dan staff 448 Sep 25 16:19 Calendars/
drwxr-xr-x 3 dan staff 96 Sep 9 13:26 CallServices/
The d at the start of most of these means "directory" same as a folder. The owner of all these files is dan. The group on all these is staff. The file/directory names are at the right end of each line. The numbers before the dates are file sizes in bytes.I don't know the meaning of the numbers before owner.
There are one commands for controlling the owner/group assignments and one comnmand for setting permissions.
chown sets owner
chmod sets permissions.
Say I wanted to change all these to be owned by you, with group localaccounts would be:
run this:
chown you:localaccounts *
now the file list looks like this:
-rw-r--r--@ 1 you localaccounts 20484 Sep 19 03:03 .DS_Store
-rw-r--r-- 1 you localaccounts 0 Sep 9 13:25 .localized
drwxr-xr-x 6 you localaccounts 192 Sep 11 14:42 Accounts/
drwx------ 78 you localaccounts 2496 Sep 25 20:09 Application Scripts/
drwx------+ 50 you localaccounts 1600 Sep 26 02:13 Application Support/
drwxr-xr-x 11 you localaccounts 352 Sep 26 13:02 Assistant/
drwx------+ 2 you localaccounts 64 Sep 9 13:25 Assistants/
drwx------+ 5 you localaccounts 160 Sep 9 13:25 Audio/
to set permissions, you have to translate the rwx for owner, group, everyone else using this:
r=4
w=2
x=1
you add those up for owner, group, and everyone, to give all rights to everyone
run this in a directory
chmod 777 *
Now the listing looks like this
-rwxrwxrwx 1 dan admin 396 Sep 25 02:54 0000_start*
-rwxrwxrwx 1 dan admin 107 Jun 16 20:10 000_runall*
-rwxrwxrwx 1 dan admin 478 Sep 9 16:58 001_air_force_as_catalina_singlelock*
drwxrwxrwx 5 dan admin 170 Sep 14 17:27 001_air_force_as_catalina_special_subscripts/
-rwxrwxrwx 1 dan admin 4904 Sep 9 17:54 001_air_force_as_catalina_specialscript*
-rwxrwxrwx 1 dan admin 5723 Sep 9 17:00 001_air_force_specialscript0*
-rwxrwxrwx 1 dan admin 439 Aug 13 03:17 002_first4tb_singlelock*
-rwxrwxrwx 1 dan admin 436 Aug 13 03:17 003_rocketboss01_singlelock*
Say only the owner should have write permission, do this
chmod 755 *
-rwxr-xr-x 1 dan admin 396 Sep 25 02:54 0000_start*
-rwxr-xr-x 1 dan admin 107 Jun 16 20:10 000_runall*
-rwxr-xr-x 1 dan admin 478 Sep 9 16:58 001_air_force_as_catalina_singlelock*
drwxr-xr-x 5 dan admin 170 Sep 14 17:27 001_air_force_as_catalina_special_subscripts/
-rwxr-xr-x 1 dan admin 4904 Sep 9 17:54 001_air_force_as_catalina_specialscript*
-rwxr-xr-x 1 dan admin 5723 Sep 9 17:00 001_air_force_specialscript0*
-rwxr-xr-x 1 dan admin 439 Aug 13 03:17 002_first4tb_singlelock*
-rwxr-xr-x 1 dan admin 436 Aug 13 03:17 003_rocketboss01_singlelock*
I know that is a lot to take in, but it's not as bad as it looks and it is intuitive.
You can set these same permissions using finder by get info
View attachment 863930
Only one more thing more. To apply this stuff to subdirectories at the same time, add -R to the commands like this
chmod -R 755 *
And the other last things:
Those @ signs on some of the file listings means there are extended attributes which means Apple has done mysterious overrides on the ownership and/or permissions. Sometimes they block your ability to change ownership and permissions and you just have to work around that
Last but not least. A lot of times you have to run these commands with root permissions. This applies to a lot of commands not just these. To do this, you precede the command with sudo. Sorry for the prefix, sudo. It means super user do. The first time you use it in a session, you will be prompted for your password.
One of the reasons this is worth learning, these rules and commands change very little over time. They have been in place for decacdes. Another reason is when you understand these schemes for ownership and permissions, it is a big part of everything there is to know about the operating system.
I hope it helps someone.