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

Permission issue with file deletion within Jupyter environment on dali #45

Open
basderonde opened this issue Feb 19, 2024 · 3 comments
Open
Assignees

Comments

@basderonde
Copy link

Deleting a file from within the Jupyter environment can give a permission error, under certain conditions. The error is as follows:
error

This happens both for deleting newly created files as well as existing files. I have checked the permissions of these files from the command line when I am logged into dali. I can delete files directly from the terminal.

I start the Jupyter environment by calling the "start_jupyter.py" script on the dali cluster. I am using the latest version from the master branch. I am calling the script from within my own folder on dali (/dali/lgrandi/bderonde) with the following command:

python3 /dali/lgrandi/bderonde/env_starter/start_jupyter.py --tag 2023.11.1 --partition dali --cpu 6 --ram 45000 --exclude_node dali001

Using the stable env_starter branch located in "/project2/lgrandi/xenonnt/development/env_starter/start_jupyter.py" gives the same problem.

Supposedly, the issue arises from the fact that the Jupyter environment tries to move a file to the dali trash folder, which I don't have permission to, rather than actually deleting the file. A similar issue is discussed here: (jupyter-server/jupyter_server#1338).

A solution to the problem was suggested on the linked github page as well: adding the "--FileContentsManager.delete_to_trash=False" option to the line of code that calls Jupyter changes the behaviour of Jupyter, where files are now directly deleted instead of moved to a trash folder. This line of code is in the "start_notebook_dali.sh" shell script; the suggested change is highlighted in the picture below:

suggested_change

I tested this solution myself on a local copy of the scripts and this resolved the issue.

@yuema137 yuema137 self-assigned this Mar 15, 2024
@yuema137
Copy link
Contributor

Is it still an issue in the current master branch? I cannot reproduce it at least

@basderonde
Copy link
Author

Is it still an issue in the current master branch? I cannot reproduce it at least

It is! I just tested it with the latest version

@yuema137
Copy link
Contributor

yuema137 commented Jun 11, 2024

Hi, @basderonde. Thanks for spotting and providing a solution! However, after debugging for a while, I found that there is an issue within the Jupyterlab configuration regarding access to file systems. If you use VSCode to connect to the server, or rm on your console, it should be fine. As this issue also affects file creation, I will hold off on implementing the delete_to_trash trick until I understand it better.
In general, I would suggest using VSCode for better access management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants