Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not accept an ipython_dir that's not writeable #669

Closed
fperez opened this issue Aug 3, 2011 · 2 comments · Fixed by #670
Closed

Do not accept an ipython_dir that's not writeable #669

fperez opened this issue Aug 3, 2011 · 2 comments · Fixed by #670
Milestone

Comments

@fperez
Copy link
Member

fperez commented Aug 3, 2011

As reported by Eric Jones, a colleague found himself with this problem:

Pylab failed to start after an EPD install, and he was dead in the water.

After poking around, he has a HOMESHARE variable that is set to some strange directory he doesn't know about and also that he does not have write access to. As a result, ipython will not start up. This is a show stopper.

We should add a patch that checks if the get_ipython_dir() is writable. If it isn't, we should use the temp dir or something, or we should not try to write the ipythonrc file, or something. We want to ensure that file permissions don't result in the inabliity to start using the app.

Jason reported progress on the issue:

Ilan and I just looked at it and it appears to be a simple fix. path.py get_home_dir() checks a bunch of environment variables on different platforms looking for a home directory. It checks that the directory exists, but not that it's writable. We can just add check to issue a warning if a given directory isn't writable and move on to the next option.

minrk added a commit to minrk/ipython that referenced this issue Aug 3, 2011
replaces various calls to os.path.isdir and os.path.exists with _writable_dir.

closes ipythongh-669
@minrk
Copy link
Member

minrk commented Aug 3, 2011

See PR #670

minrk added a commit to minrk/ipython that referenced this issue Aug 3, 2011
add test for ipythongh-669, and ignore nonexistent toy paths in other path tests.
@epatters
Copy link
Contributor

@minrk fixed this, but issue was never closed. Just cleaning up here...

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
replaces various calls to os.path.isdir and os.path.exists with _writable_dir.

closes ipythongh-669
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
add test for ipythongh-669, and ignore nonexistent toy paths in other path tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants