Lab can't even open notebooks/text files when .ipynb_checkpoints
directory lacks execute permissions
#12235
Labels
.ipynb_checkpoints
directory lacks execute permissions
#12235
Description
If the checkpoints dir happens to lack execute permissions, when trying to simply open any file with the text editor or the notebook client, the open operation crashes with a rather obscure message, and can't open the file at all.
Reproduce
On a *nix system, running
in a folder will remove the user's execute (access) permissions. This can be run from a notebook as
!chmod u-x .ipynb_checkpoints/
. Once this has been done, saving any already open notebook in that folder will produce this error, which at least is somewhat informative:Unfortunately if the user made the chmod change accidentally from a terminal without other open files there, instead what will happen is that when opening any file in that folder, they will get:
Which makes it much harder to debug what is going on.
Many thanks to @rcthomas for diagnosing this on a hosted hub!
Expected behavior
At a minimum, when the problem happens on open, we should be providing the same more informative dialog as when the problem happens on save of an existing file. That will already make it much easier for the user to understand what's happening and go fix it themselves. This is still suboptimal as the save operation won't succeed and there's a potential for data loss, but it's already a big improvement, and should be easier to make.
An even better fix would be to proceed with the local save, but exposing a warning that checkpointing has been disabled due to a non-accessible checkpoints directory. The user at least doesn't lose unsaved data, and can decide whether to fix the problem under the hood or live with the warning.
Context
The text was updated successfully, but these errors were encountered: