-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
can not copy or move directory between different external file storage, but files work fine #14743
Comments
Hi! The same issue here. I can provide additional info, but don't to, which. |
Perhaps the 'Invalid cross-device link' is the main clue in error message. I have external storage pointing to local directory, which is binded from another /dev/ |
@danaivehr would you mind to share the stacktrace (the log message) from 16.0.2? That makes it easier to locate the error. |
server/lib/private/Files/Storage/Local.php Lines 259 to 270 in 81339c7
There is code to handle this case. Not sure why you reach line 272. Looks like the is_dir does not return true. Could you add the code below before
https://www.php.net/manual/en/function.rename.php#117590 |
I have this similar issue when i delete a folder I get this issue consistently always #289. I have docker version of 16.0.5 for Nextcloud and I am using local as type for external storage plugin and the shares are being mapped through docker volume paths.
What is very peculiar is that although i get this error and I also get an error pop up on the top if I refresh the site I don't see the file anymore and if I visit the trash bin i don't see the file there at all either. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Detected this issue in |
Still the same issue in 21.0.0 ( on docker nextcloud:21) Happens while moving a directory from external storage to my user storage. When trying to delete the directory from external storage, I get a popup: ' Error deleting file "<folder_name>" ' |
I believe this issue causes permanent file deletion in current Nextcloud versions. Attempts to move files to the recycle bin are regarded as a success even though they fail. Without backups you will lose data. I ran into this issue attempting to move a directory from a VirtualFiles backed local folder. |
Seems like is_dir doesn't return true in all cases |
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions. |
Please reopen this ticket! |
I agree. The issue still exists in 22.1.0 |
Same problem. Any solution here? |
Same here? |
The ability to move folders to external folders is crucial, especially considering you can't upload to external storage from official Windows Nextcloud app. The only way to do so currently is through web interface, which isn't optimal in many use cases to say the least. |
Can confirm the issue on 23.0.0. Removing a folder from external storage (local type) gives those errors:
And leads to permanent removal instead of moving to the trashbin. |
Any progress on this issue? I am still having the same issue on nextcloud 26 |
I'm too facing the same issue on Nextcloud 25.0.6. Any leads will be helpfull |
Same issue here whenever I try to delete any directory. It gets deleted even though the error message is shown and it isn't present in the trash bin. Version 26.0.1. I don't have external storages mounted, just a normal setup. |
Also experiencing the same issue, this makes Nextcloud unusable on a Raspberry Pi since you're practically only able to use an external drive for file storage. (Using Portainer/Nextcloud and an 8TB external drive) "Invalid cross-device link at "<path/of/drive/mount"> |
Okay I was looking at #38569 then I realized it was a dup of #37741. Then I realized this was the real original issue so I'm moving my comments here rather than post them there. Any chance any of you (@mebtte included) have symbolic links involved with some of these mount points/folders? Or maybe the underlying mounts are SMB/CIFS (not in NC, but at the OS level)? Something is not right here. That was a good catch on the PHP bug note @rbeier, but we definitely go out of our way to not do a regular PHP (one has to dig through the classes to see it, but it looks alright to me - note: I think what is happening is these folders are either not getting detected as such (the It could also be some other variations on these theme, but those are the two that are most obvious. server/lib/private/Files/Storage/Local.php Lines 363 to 378 in c392182
So we have one of the following scenarios:
|
You bet! 😅 I had this issue with the following setup:
So, I had a docker It worked... sort of, the only problem is the one described in OP. Keeping everything in the docker volume, i.e. removing the second Hope this is useful. I can setup a VPS with a reproduction of the problem, if useful, and give you access. Thank you,
|
The issue in my case is using the official docker image nextcloud:latest, currently 26.0.2. The external storage directory (Shared) is mounted to the docker container as /mnt/Shared. File system is zfs. The Shared directory is and its contents is owned by www-data, which is uid 33 both inside and outside the container. I am receiving an error when moving a directory, however copying a directory works fine, as does moving files to and from the external storage. Moving folders within the external storage also does not work.
|
Feel free to try #38623 |
How to use GitHub
Steps to reproduce
I can not copy or move directory between different external file storage, but normal files work fine. How can I get this working?
The first argument to copy() function cannot be a directory at
Moving a normal file works but still gives this message:
{"reqId":"XJAmBLAHf2Bocyt--HDF@gAAAAA","level":3,"time":"2019-03-18T23:13:08+00:00","remoteAddr":"80.127.158.83","user":"jdejong","app":"PHP","method":"MOVE","url":"\/nextcloud\/remote.php\/dav\/files\/jdejong\/Communications\/communication-jdejong\/communicaton-jdejong.txt","message":"rename(\/\/mnt\/nfs\/communications\/communication-jdejong\/communicaton-jdejong.txt,\/\/mnt\/nfs\/programmes\/communicaton-jdejong.txt): Operation not permitted at \/var\/www\/html\/nextcloud\/lib\/private\/Files\/Storage\/Local.php#272","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:60.0) Gecko\/20100101 Firefox\/60.0","version":"15.0.4.0"}
The setup:
The text was updated successfully, but these errors were encountered: