Why does chunkwm fail with "Permission denied" error for .chunkwmrc
You have accidentially gone done a wrong path in trying to fix the bug. The error message does not mean that the user does not have permission to read the .chunkwmrc file - instead it means that the user does not have permission to execute the file.

The configuration file for chunkwm (.chunkwmrc) is actually a shell script that is run with bash (in your case). Therefore it needs to be executable. 

You have set the permissions so that it is not executable, and that's why it fails. You need to run the following command:

chmod +x ~/.chunkwmrc


This will set the executable bit so that you are allowed to execute the file.

To answer your other questions about determining current uid for a process - the easiest way to do that is run the following command in Terminal:

ps xau | grep chunkwm


You'll see the username (or uid) as the first column of the result.

The /proc file system is Linux specific and doesn't exist in macOS (nor in many other operating systems). That's why the commands you have found regarding /proc do not work for you.

The /dev directory holds device nodes. macOS does not create device nodes for each running process that could give the uid of the running process. This is similar to other operating systems such as Linux, FreeBSD, etc. as this is simply not how /dev is meant to be used.

All in all remember that your specific problem here had nothing to do with uid's being changed, so there was no reason to lookup the uid's or trying to "stop" them being changed.