PermissionError: [Errno 13] Permission denied: '/tmp/jupyter_cookie_secret' w/ Py3.10

Hi folks,

I am using Jupyter on a shared environment. I am using Python 3.10 when this error comes up. The error is reproducible in Notebook and Jupyterlab.

Seems like someone has previously set their JUPYTER_RUNTIME_DIR=/tmp and generated a cookie_secret.

Now, I am trying to launch Jupyter, and even through I set JUPYTER_RUNTIME_DIR=/scratch/$(whoami)/my_jupyter_runtime, I keep persistently getting the error below:

PermissionError: [Errno 13] Permission denied: '/tmp/jupyter_cookie_secret'

How can I get jupyter to ignore anything in /tmp, and only look at the path I set?

Thank you in advance!