question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Permission denied issue when writing to `/tmp/.tensorboard-info`

See original GitHub issue
  • TensorBoard version (from pip package, also printed out when running tensorboard) 1.13.1
  • TensorFlow version if different from TensorBoard 1.13.1
  • OS Platform and version (e.g., Linux Ubuntu 16.04) Ubuntu 16.04
  • Python version (e.g. 2.7, 3.5) 2.7

Please describe the bug as clearly as possible, and if possible provide a minimal example (code, data, and/or command line) to reproduce the issue. Thanks!

The writing of tensorboard info files introduced in https://github.com/tensorflow/tensorboard/pull/1806 can cause permission problem under multi-user scenario. It directly create .tensorboard-info directory under /tmp as in https://github.com/tensorflow/tensorboard/blob/5fc3c8cea4b5f79c738345686a218f089b58ddba/tensorboard/manager.py#L237 . If the dir has already been created by an user, it will not be writable to other users.

image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:18
  • Comments:24 (9 by maintainers)

github_iconTop GitHub Comments

139reactions
noisychannelcommented, Apr 18, 2019

My workaround while this issue is resolved involves setting the TMPDIR environment variable. Since tensorboard uses tempfile which will respect user set environment variables (TMPDIR, TMP, etc.), this is possible. Make sure that the directory which TMPDIR points to exists!

You can change and test the new temp directory by running the following (which sets it to /tmp/$USER instead of /tmp).

export TMPDIR=/tmp/$USER; mkdir -p $TMPDIR; python -c "import tempfile; print(tempfile.gettempdir())"

A safe tensorboard invocation is:

export TMPDIR=/tmp/$USER; mkdir -p $TMPDIR; tensorboard --logdir $LOGDIR
9reactions
wchargincommented, May 8, 2019

@reactivetype: Thanks. It looks like your .tensorboard-info directory was created with an older version of TensorBoard, before the fix went in. You’ll need to manually change its permissions just this once:

sudo chmod 777 /tmp/.tensorboard-info
Read more comments on GitHub >

github_iconTop Results From Across the Web

2 Answers - 2 - Stack Overflow
This issue occurs because you do not have a permission to access /tmp/.tensorboard-info/ directory which already exists, but tensorboard ...
Read more >
Permission denied writing to `/tmp/.tensorboard-info`
If you are working in a server shared by many users, you have have faced an issue of denying permission to /tmp/.tensorboard-info when...
Read more >
解决tensorboard使用时的Permission denied issue ... - 简书
该链接中有详细的说明及解决办法:https://github.com/tensorflow/tensorboard/issues/2010#issuecomment-4846...
Read more >
Permission denied in /tmp - ubuntu - Unix Stack Exchange
To anyone having the same problem in the future, /tmp is a sticky folder by default, meaning only the file owner can modify...
Read more >
时光碎了天 - CSDN博客
在使用Tensorboard过程中,突然遇到报错现象:PermissionError: [Errno 13] Permission denied: '/tmp/.tensorboard-info/pid-46614.info' 解决办法: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found