mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-17 06:52:56 +00:00
Add NB_UMASK flag to modify default umask
This commit is contained in:
@@ -37,3 +37,10 @@ if 'GEN_CERT' in os.environ:
|
||||
# Restrict access to the file
|
||||
os.chmod(pem_file, stat.S_IRUSR | stat.S_IWUSR)
|
||||
c.NotebookApp.certfile = pem_file
|
||||
|
||||
# Change default umask if set using flag
|
||||
if 'NB_UMASK' in os.environ:
|
||||
try:
|
||||
os.umask(int(os.environ['NB_UMASK'], 8))
|
||||
except:
|
||||
raise
|
Reference in New Issue
Block a user