Setting "umask" might gradually break your macOS
I had a hard time as I misconfigured “umask” setting on macOS.
So, I want to leave a note.
It was happened about 1 month after I setup “umask” on my Mac.
I didn’t understand what is happening as I already forgot about that.
1st error
I saw the 1st error when I updated Slack.app on AppStore.
Library not loaded: @rpath/libffmpeg.dylib
It says, I felt, one of the required libs:
- was deleted; or
- was not included when bundle the app;
Nothing tell me about misconfiguration of “umask”
I found an GigHub ISSUE on Signal Desktop.
As both of Slack and Signal Desktop are using Electron,
I suspect the Electron framework might be the cause.
I Googled, but I couldn’t find any related information about that.
I, still, could use Slack.app if I install it from web without AppStore. So, I leave the error at that time.
Real cause of this error
More time passed, and, more apps suffered this error.
And not only apps using Electron.
I also found:
- some processes are not responding; and
- cannot open “Security & Privacy” pane on Setting.app;
- /Application directory freeze Finder.app;
Why, why, why??
Hints from Console.app’s log
So, I checked Console.app, and I found a lot of Permission denied
errors.
I fixed those errors by fixing permission of files.
And also found logs like following
fault 00:00:00.000000+0000 sysextd bad ownership/permissions on sysextd staging area
And I remember that “I set up umask before!!”
Solution
Execute the following command & restart, and fix broken permission using chmod
.
sudo launchctl config system umask 022
Or, delete UMASK
section from plist
/private/var/db/com.apple.xpc.launchd/config/system.plist
We should be super careful when change umask on macOS, as described here.