My machine:
System Version: macOS 10.15.4 (19E287)
Kernel Version: Darwin 19.4.0
So here is what I did,
run compaudit
and it will give you a list of directories it thinks are unsecure.
run sudo chmod -R 755 target_directory
(example: sudo chmod -R 755 /usr/local/share/zsh
)
Exmaple:
compaudit
returns:
/usr/local/share/zsh
so I run
sudo chmod -R 755 /usr/local/share/zsh