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

Browse above starting folder #2032

Closed
amueller opened this issue Jan 9, 2017 · 10 comments
Closed

Browse above starting folder #2032

amueller opened this issue Jan 9, 2017 · 10 comments

Comments

@amueller
Copy link

amueller commented Jan 9, 2017

I frequently run into issues (when giving workshops) of people opening a jupyter notebook in one folder, and trying to browse to another folder that is somewhere above it in the folder structure.
That's currently impossible with the jupyter file browser (not sure what your name for that view is).

Is that a conscious design choice?
If so, why? Or what is in the way of implementing this?
Is this a security feature?

Thanks!

@blink1073
Copy link
Member

Idle thought: this could be solved by having a switch (and config option) that starts the server itself in the user's home directory, but then changes to the directory where the command is launched for the tree view.

@takluyver
Copy link
Member

It is deliberate, and it is a sort-of security measure. We don't want to expose your whole filesystem over HTTP. It's not a real security boundary, because someone with full access to the server can start a kernel and read files through that, but it means someone needs more than a simple HTTP GET to read files above the directory where you launched it.

@amueller
Copy link
Author

amueller commented Jan 9, 2017

Yeah that was sort-of my expectation.
How do you feel about changing the behavior for a local-only server? Too magic?

There could be an "read anywhere if local" config flag (that I would have like to be on by default because I'm mostly thinking about beginners).

@takluyver
Copy link
Member

I don't want to assume that even a server running on loopback is totally safe. We recently had to fix a nasty issue which could potentially have let a webpage attack a local server through the browser. That also addressed a long-standing concern about other users on the same system using your server. Those examples are hopefully no longer problems, but I don't want to rely entirely on an outer shell of defenses.

@amueller
Copy link
Author

amueller commented Jan 9, 2017

Yeah, that makes sense. Thanks for the explanation.

FYI I asked (before I opened this) the anaconda folks to make the startup menu "Jupyter Notebook" button launch jupyter in the homefolder. That fix will probably solve most of my use-case.

@amueller amueller closed this as completed Jan 9, 2017
@takluyver
Copy link
Member

Yep, nbopen also launches has a default option to launch a notebook server in the home folder.

@minrk minrk added this to the No Action milestone Feb 1, 2017
@10247bit
Copy link

So, is their anyway to open jupyter notebook located in a directory other than the present working directory?
or
I have to start another terminal with the directory having notebook as home directory

@takluyver
Copy link
Member

To control it temporarily, run jupyter notebook --notebook-dir /path/to/wherever. To set it for every launch, search for notebook_dir in the config file.

@Madhu94
Copy link
Contributor

Madhu94 commented Oct 16, 2017

@IntenseRave @takluyver #351 has a related discussion, but it ended in deciding to give the users a way to type in file paths as a start.

(I'll get started on it in a week or two :))

@yoderj
Copy link

yoderj commented Jun 22, 2018

@takluyver On Windows, this only works if you are running Jupyter Notebook from the command prompt. If you want to change it when launching from the Start Menu, follow this Stack Overflow answer

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants