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

Reconsider options for deleting non-empty folders? #2829

Closed
LeahJB opened this issue Nov 23, 2019 · 2 comments
Closed

Reconsider options for deleting non-empty folders? #2829

LeahJB opened this issue Nov 23, 2019 · 2 comments

Comments

@LeahJB
Copy link

LeahJB commented Nov 23, 2019

I'm running JupyterHub on Kubernetes based on the z2jh tutorial.

There is quite a bit of discussion online regarding options for deleting non-empty folders (e.g. here). My understanding is that currently deleting non-empty folders works in JupyterLab if you have send2trash installed, but since we don't have "trash" on JupyterHub this feature is disabled and the best option is rm -rf when necessary (reference here).

We've been using this approach for a while, but one of our less experienced users has just accidentally executed rm -rf /* in their terminal and deleted everything in their personal file space, plus most of the files on our shared drive! Luckily we have some snapshots for recovery, but I think an "Are you really sure?" warning message in the UI would actually be less dangerous than rm -rf, given that many JupyterHub users are not necessarily familiar with the Linux terminal.

I guess an ideal solution would be some kind of trash/recycle bin, but I guess this may be tricky to setup for JupyterHub on Kubernetes?

@Dmitry1987
Copy link

it'll work if you'll patch the notebook itself, having same problem myself, solved only yesterday

jupyter/notebook#4916

patch the filemanager.py by deleting send2trash related code so it goes straight to delete. i can share a diff if you want (i use notebook=6.0.3).

@manics
Copy link
Member

manics commented Feb 17, 2021

I'm closing this as it's quite old and it's a support issue. If you're still having problems please post on the Jupyter Community Forum. Thanks!

@manics manics closed this as completed Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants