Commit fbba48c4 authored by Peter Parente's avatar Peter Parente

Only apply custom umask if NB_UMASK is set

parent 1ec114a8
...@@ -35,7 +35,6 @@ ENV CONDA_DIR=/opt/conda \ ...@@ -35,7 +35,6 @@ ENV CONDA_DIR=/opt/conda \
NB_USER=$NB_USER \ NB_USER=$NB_USER \
NB_UID=$NB_UID \ NB_UID=$NB_UID \
NB_GID=$NB_GID \ NB_GID=$NB_GID \
NB_UMASK=0022 \
LC_ALL=en_US.UTF-8 \ LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \ LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 LANGUAGE=en_US.UTF-8
......
...@@ -38,5 +38,7 @@ if 'GEN_CERT' in os.environ: ...@@ -38,5 +38,7 @@ if 'GEN_CERT' in os.environ:
os.chmod(pem_file, stat.S_IRUSR | stat.S_IWUSR) os.chmod(pem_file, stat.S_IRUSR | stat.S_IWUSR)
c.NotebookApp.certfile = pem_file c.NotebookApp.certfile = pem_file
# Change default umask if set using flag # Change default umask for all subprocesses of the notebook server if set in
os.umask(int(os.environ['NB_UMASK'], 8)) # the environment
\ No newline at end of file if 'NB_UMASK' in os.environ:
os.umask(int(os.environ['NB_UMASK'], 8))
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment