Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion jupyter_rsession_proxy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ def _get_cmd(port, unix_socket):

# use mkdtemp() so the directory and its contents don't vanish when
# we're out of scope
server_data_dir = tempfile.mkdtemp()
# we create the server_data_dir inside another temp dir,
# as rserver seems to insists on changing its permissions to 777.
# wrapping it in the first tempdir insists the contents of server_data_dir stay secure.
server_data_dir = tempfile.mkdtemp(dir=tempfile.mkdtemp())
database_config_file = db_config(server_data_dir)

cmd = [
Expand Down