"Document cannot be saved, please check your permissions"
Describe the Bug
If I share a document/folder like .odt or .ods with an external user by link. After you open the shared link and modify the document (with full write permissions), it shows you the following message: "Document cannot be saved, please check your permissions". Even than, it saves the document.
Steps to Reproduce
- as Nextcloud user go to your folder you want share by link with external users.
- Click on Share button
- share link, add a password, with full write permissions
- use generated link in a different browser
- open your .ods file in the folder
- Change content and click on save button
- message: "Document cannot be saved, please check your permissions"
Expected Behavior
No error message, or save confirmation message
Actual Behavior
message: "Document cannot be saved, please check your permissions"
Screenshots
Desktop
- Collabora version: [24.04.4.2]
- OS and version: [Linux Debian 11]
- Browser and version: [Chrome 125.0.6422.76]
- Nextcloud: [28.0.6]
I've tried these exact steps, but have been unable to reproduce the issue. Is it consistently reproducible for you with the steps?
I missed one important information. I use "External storage", where the file is saved. Only in this combination do I have this problem, otherwise it is working. I made some changes on the properties of "External storage", but no success.
When I check the logs on Nextcloud, I see the following error:
Uncaught error: Call to a member function getUID() on null in file '/var/www/nextcloud/lib/private/FilesMetadata/FilesMetadataManager.php' line 125"
If I comment the line 125 in the file FilesMetadataManager.php the error seems to be gone away:
//$this->jobList->add(UpdateSingleMetadata::class, [$node->getOwner()->getUID(), $node->getId()]);
I guess that it could be a problem when you are an external user that hasn't a specific UID, since the error only shows when you are an external user and not one in the LDAP.
We receive the same error messages for all guest users, even if they have the appropriate permissions.
- Nextcloud v28.0.7
- richdocuments v8.3.8
- Collabora Online Development Edition 24.04.5.1 48bf0bf
- guests v3.0.1
@juliushaertl Thoughts appreciated =) looks like an easy fix - superficially - thanks so much @jonasgarstick for the analysis & ticket !
We had a fix for this scenario for upcoming Nextcloud 30 with https://github.com/nextcloud/server/pull/44294. I'll see if we can get a patch without the public API change backported.
@juliushaertl As I can see, the fix is part of 29.0.5, is that correct?
Yes
This also affects group folders - will the fix work for this too?
We now (NC 29.0.6 / COOLWSD 24.04.7.1) get the error also in some Folders that are shared from the same instance. This pretty much renders Collabora useless as the message appears on every autosave and makes it nearly impossible to edit the document.
Also it seems that not all group folders are affected. Those that have only one member (group or user) and don't use advanced permissions work fine. Also those with two members with different permission sets and no advanced permissions work fine. Group Folders that either use advanced permissions and or have two users or groups with identical permissions still throw the error.
@juliushaertl can we move this ticket to richdocuments somehow ? =)
This should be fixed with the latest releases of nextcloud/gropufolders with https://github.com/nextcloud/server/pull/44294
We noticed another case now with share links in similar constellations but a fix is pending at https://github.com/nextcloud/groupfolders/pull/3538.
This ticket seems a bit of a mix but no clear reports of a full Nextcloud log message so it is hard to tell if all cases have been addressed.
Anyone still encountering issues with this that are not the above cases, please file a new issue at the richdocuments repository with clear steps to reproduce and the full json log message.