You have apparently played with
sudo in improper ways. The MacTeX version of TeX Live stores generated files on a user basis in
and subdirectories thereof. These should have full access by the user, of course.
A simple strategy for resetting the ownership of the directories and files to the user is
sudo chown -R <user> /Users/<user>/Library/texlive
<user> into your name as shown by
whoami, hit Return and all should be well.
A good general method on Unix systems to see what's the involved directory is to issue
On a standard TeX Live this might return
<year> corresponding to the currently installed and active distribution). With MacTeX it returns
but running the
chown command on the top level is probably better in order to reshape everything to normal.
Other Unix flavors of TeX Live might use