mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-11 12:02:56 +00:00
Only apply custom umask if NB_UMASK is set
This commit is contained in:
@@ -35,7 +35,6 @@ ENV CONDA_DIR=/opt/conda \
|
||||
NB_USER=$NB_USER \
|
||||
NB_UID=$NB_UID \
|
||||
NB_GID=$NB_GID \
|
||||
NB_UMASK=0022 \
|
||||
LC_ALL=en_US.UTF-8 \
|
||||
LANG=en_US.UTF-8 \
|
||||
LANGUAGE=en_US.UTF-8
|
||||
|
@@ -38,5 +38,7 @@ if 'GEN_CERT' in os.environ:
|
||||
os.chmod(pem_file, stat.S_IRUSR | stat.S_IWUSR)
|
||||
c.NotebookApp.certfile = pem_file
|
||||
|
||||
# Change default umask if set using flag
|
||||
os.umask(int(os.environ['NB_UMASK'], 8))
|
||||
# Change default umask for all subprocesses of the notebook server if set in
|
||||
# the environment
|
||||
if 'NB_UMASK' in os.environ:
|
||||
os.umask(int(os.environ['NB_UMASK'], 8))
|
Reference in New Issue
Block a user