-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
file deletion fails: invalid cross-device link #5781
Comments
A general google of the exception gives this SO answer: https://stackoverflow.com/questions/42392600/oserror-errno-18-invalid-cross-device-link
So, maybe the solution is for |
@vidartf Using More generally, though, for cross-device and permissions errors while trying to put a file in the "Trash" directory, it seems like it would be better to just delete (perhaps with a prompt). Note that this is related to #3793 and #4318 and jupyter/notebook#3304 . |
It sounds like there is nothing for us to do in JupyterLab, but it is an error in the server-side libraries? Is that right? |
@jasongrout I think it depends on the resolution. If it's decided that there should be a dialog box saying something like "This can't be moved to the Trash, but instead will be permanently deleted--OK?", perhaps that has to go in the the Lab code? (I'm not sure how it all fits together.) |
It is unknown if |
That is a fix for the server then. Do you want to open an issue in the notebook server repo? |
@jasongrout , thanks for your answer. I assumed you meant the repo https://github.com/jupyterlab/jupyterlab_server/ and has created an issue there: |
@alfonsomhc The behavior of |
In tracking down a user problem just now, realized that it's this same bug. :-( |
Since this was linked in recent issues/PRs over at https://github.com/arsenetar/send2trash letting you guys know there is a pre-release package published at https://pypi.org/project/Send2Trash/1.8.1b0/ which should address the issues reported here based on the information I have. If there are still issues, I will need more information on the environments (mount points and paths involved). I will move this to a release if I can get some confirmation on if this resolves the issues over here as jupyter seems to be the main source of these reports. |
@arsenetar It might be a bit before I can test this, but eyeballing the commit (arsenetar/send2trash@5e4517a), it appears reasonable. I'm wondering, though, why not just invoke |
@michaelkarlcoleman The reason as to why
Until the recent change (4) was not part of the implementation by send2trash although part of the freedesktop.org Trash spec. Some other programs implementing trashing do not appear to support (4) either in some cases. Additionally, the behavior of other programs that send to trash on similar platforms appear to follow the restrictions of With this flow if we use The change made is attempting to follow the spec without entering the gray area of what to do where |
@arsenetar I see. Thanks for the detailed explanation. FWIW, our use case is a multi-user Linux system (OOD on HPC). At least in our shop, the only plausible locations for a One troublesome case would be if the trashed file is huge, especially if a copy attempt is made (though even renames might lead to quota issues). That might be more of a problem for users of "send2trash" to deal with, though. |
@michaelkarlcoleman I would be okay with adding a flag to the send2trash call for this implementation to only allow trashing to the user's home trash if that would be helpful. Of course depending on the usage environment this may cause copies to happen more "aggressively" into the user's home trash. I am also considering a flag to prevent copies (i.e. the current behavior without this fix) as well as potentially throwing a better error up to allow calling programs to handle this (like asking the user if they would be okay with hard delete since it could not go to trash). |
Describe the bug
When working remotely on the Cheyenne compute facility I can make files but not delete them. The error message is
The preceding question is:
The console output shows:
See full output below.
This may be related to the fact that the space where I'm working is a symbolic link, deep down:
To Reproduce
On my workstation, I can delete files from a symbolically linked folder without problems.
Expected behavior
The file should be deleted.
Desktop (please complete the following information):
server:
0.35.4
from conda.client:
Additional context
I wonder why the question reads: "permanently delete" but nevertheless tries to move the file to the Trash. This is not permanent deletion IMO.
Command Line Output
In the terminal windows where JupyterLab is running I see this:The text was updated successfully, but these errors were encountered: