-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
[Bug]: File sharing on External Storage isn't working anymore since NC 26 upgrade (PHP 8.2) #37414
Comments
I have exactly the same problem. I've tried everything, it feels like. |
Oh, update. I have found a workaround for myself. If you create the share not in the "User" area but "Admin" area (and make it available to the users), everything works. |
Same problem here: |
Umm, I have to extend the problem: regular file-shares are (partially) not working, too: on another machine with Nextcloud 26 some regular public-shares are not available any more. On one password-protected share the password is requested but after the password is typed in the message "Page not found: The page could not be found on the server.". Another public-link is working fine. On this machine I'm not using SMB/CIFS but regular ext4-file-system. Some other weired things:
So there seems to be a problem with the shares and maybe rights-problem: when trying to change the password on the damaged public-share an error-message is shown: Any suggestions? |
Another update and how I fixed the problem: Somehow the IDs of some folders changed. The folder where I had problems on sharing had a non-working "internal file-link" that directed to a totally different folder that was an external FTP-share. I removed the external sharepoint and suddenly Nextcloud lost the information about my problematic folder, too, and reindexed everything resulting in a new ID for this folder and losing ALL shares... All connected clients deleted the removed folder, too. Now I had to update all shares using phpMyAdmin and direct the shares in the table "oc_share" to the updated IDs in the columns "item_source" and "file_source" manually. Now all shares are working again with the original token and password... This is working on one of my machines where only few users are installed... But for my larger installation I cannot do this yet. There seems to be a general bug in Nextcloud 26 using file-links: the internal links should be resolved like this: But for mounted external storages (only using personal setup - administration setup is working) the following will happen: |
The same thing seems to have happened on my instance: This is a pretty big issue imo... |
I'm still searching the code for an issue and maybe the culprit lies here: This file has been updated and is directly related to the UserMount-Points... tomorrow I will try to find a solution... |
I can reproduce the issue where the "internal link" somehow points to that external drive: Fetching the internal share link for which is completely the wrong location and obviously doesn't exist... |
Maybe problem is related to issue #21049 |
I did a bit of sniffing around my database and the entries in the tables appear to be perfectly fine at first glance. |
ok, I now see why you think the issue might lie in https://github.com/nextcloud/server/commits/master/lib/private/Files/Config/UserMountCache.php EDIT: This is probably not the underlying issueI was able to trace the issue to this function: server/lib/private/Files/Config/UserMountCache.php Lines 340 to 358 in fc371fa
In here, in my case, the query returns two elements: the home mount (correct) and the external mount (not correct).
still investigating... |
I think I see it now... In the DB table this by coincidence overlaps with the This also explains why all your main storage was truncated when you deleted the mount: server/lib/private/Files/Cache/Storage.php Lines 222 to 255 in fc371fa
I'm going to investigate some backups to see if this has been introduced by the upgrade to version 26 |
Interesting... If I manually adjust the |
Ok, I was able to verify in a DB backup that the |
Here a warning to all of us that enabled ServerSide-Encryption: disabling my external FTP-Storage changed the sotrage_id of the home-drive in database and lead to a resync of all of my files to all connected machines. Obviously this storage_id/mount_id-bug disabled the recognition that the files on my Nextcloud-drive were encrypted using ServerSide-encryption. All of my files on the remote-clients had been overwritten with the encrypted files... Luckily, I did a fresh Backup of all of my files - so I'm fine - but be carful out there when larger directorys are syncing without reason! |
Nextcloud updated to v26 this morning and my external mounts broke. Just found this. Do we have any progress or fixes for this? |
For now, the only way to get the external-mounts back to work is to use the "Administrator"-panel instead of the "User"-panel in the Nextcloud-settings. User-space mounts are not working at least for SMB/CIFS- and FTP-mounts. We are waiting for a reacting in this issue here: #37473 After migrating to the Administrator-space-mounts you will lose all shares. You have to recreate them and - if nescessary - rename the tokens with the ShareRenamer-App from https://apps.nextcloud.com/apps/sharerenamer |
Looks like 26.0.1 did fix it |
@waja Did it also fix the wrong ids in the database? |
I did not investigate this, but as 26.0.1 was deployed in the affected setup and users reported that the issue went away, I thought it would be good to report it here too. |
No it didn't, the problem still occure today even after the update. :/ |
So we are just lucky? Hmm ... the external (smb) storages are mounted and I can download files there ... |
We can download files but not share them. Desktop.20-04-2023.16-02-25.mp4 |
But is this related to the reported issue? |
Yes, this issue is explicitly regarding creating share links. Downloads were never impacted. |
thanks man, you've rescued me today. I have exactly the same issue on my instance running 26.0.1 on PHP8.1 |
I got hit with the same issue after upgrading my instance to 26.0.1 as well, although I found it in slightly different way. In my case I could edit Draw.io and OnlyOffice docs on internal storage, but not on SMB mounted external storage. Moving the SMB shares from Personal settings to Administrative settings allows editing from these two add-ons to work again. Thanks much! |
Be careful with this. "Moving" an external storage might add further harm, like broken Shares for other users of your instance. See #37473 (comment). |
I just found another symptom (maybe), which involves the audio player addon. The audio files for it come from an external storage and cannot be played back anymore. Furthermore they dissapear from the player all together. They appear after a rescan but are still not functional afterward. Is it possible that it is related to this? |
I have the same issue unfortunately. I am on 26.0.1 |
Same error "Error while creating the share" here when clicking on "share link", either with external S3 storage or with local files or folders. Should I create another issue as it also affects local files and folders ? (fresh nextcloud 26.0.1 / php8.1 / MariaDB manual install) EDIT : When mounting the S3 external storage from the admin set-up page and not from the user set-up page, the problem is gone for both local and external files/folders. |
…unt.php so that it doesn't override `numericStorageId` in the `MountPoint` baseclass fixes nextcloud#37473 fixes nextcloud#37414 Signed-off-by: Daniel <[email protected]>
…unt.php so that it doesn't override `numericStorageId` in the `MountPoint` baseclass fixes #37473 fixes #37414 Signed-off-by: Daniel <[email protected]>
Bug description
Since I upgraded to Nextcloud 26, the file sharing for external storage is broken. An error message that simply say "Error while creating the share" appear on the screen, and a detailed error log shows up in the console. This one told us that the POST query result in a 404 error.
Then, when we goes to the logs page in the admin dashboard, a very simple message about the error appear:
Share type does not allow to emit interaction event
.But, if we refresh the page on the same folder, we will see that the file/folder is now shared. But we can't copy it link. And if we have it (because the link was shared before this problem occured), the link ends in a 404 error page.
This error only occurs on external storage (smb, sftp & ftp), not on /data storage.
Steps to reproduce
Expected behavior
A link for this file is created and accessible to the public.
Installation method
Community Web installer on a VPS or web space
Operating system
Debian/Ubuntu
PHP engine version
Other
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Updated to a major version (ex. 22.2.3 to 23.0.1)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
This a not a permission issue, the sharing right is checked in the admin dashboard. If we uncheck it, an error message that tolds us we don't have the permission shows up.
I am now on PHP 8.2 and
php8.2-smbclient
is installed.The text was updated successfully, but these errors were encountered: