Skip to content

Commit

Permalink
Change /tmp/raylogs permissions so multiple users can log there. (ray…
Browse files Browse the repository at this point in the history
  • Loading branch information
robertnishihara authored and pcmoritz committed May 9, 2017
1 parent 0681107 commit 1f991b6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/ray/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,9 @@ def new_log_files(name, redirect_output):
logs_dir = "/tmp/raylogs"
if not os.path.exists(logs_dir):
os.makedirs(logs_dir)
# Change the log directory permissions so others can use it. This is
# important when multiple people are using the same machine.
os.chmod(logs_dir, 0o0777)
log_id = random.randint(0, 100000)
log_stdout = "{}/{}-{:06d}.out".format(logs_dir, name, log_id)
log_stderr = "{}/{}-{:06d}.err".format(logs_dir, name, log_id)
Expand Down

0 comments on commit 1f991b6

Please sign in to comment.