online icon indicating copy to clipboard operation
online copied to clipboard

"Document cannot be saved, please check your permissions"

Open techadmin-localbit opened this issue 1 year ago • 11 comments

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

  1. as Nextcloud user go to your folder you want share by link with external users.
  2. Click on Share button
  3. share link, add a password, with full write permissions
  4. use generated link in a different browser
  5. open your .ods file in the folder
  6. Change content and click on save button
  7. 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

Screenshot from 2024-06-22 11-50-20

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]

techadmin-localbit avatar Jun 22 '24 09:06 techadmin-localbit

I've tried these exact steps, but have been unable to reproduce the issue. Is it consistently reproducible for you with the steps?

thebearon avatar Jun 24 '24 22:06 thebearon

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.

techadmin-localbit avatar Jun 25 '24 09:06 techadmin-localbit

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.

techadmin-localbit avatar Jun 25 '24 16:06 techadmin-localbit

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

jonasgarstick avatar Jul 09 '24 12:07 jonasgarstick

@juliushaertl Thoughts appreciated =) looks like an easy fix - superficially - thanks so much @jonasgarstick for the analysis & ticket !

mmeeks avatar Jul 16 '24 09:07 mmeeks

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.

juliusknorr avatar Jul 18 '24 19:07 juliusknorr

@juliushaertl As I can see, the fix is part of 29.0.5, is that correct?

thebearon avatar Aug 27 '24 02:08 thebearon

Yes

juliusknorr avatar Aug 28 '24 14:08 juliusknorr

This also affects group folders - will the fix work for this too?

tatrapikao avatar Sep 05 '24 08:09 tatrapikao

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.

tatrapikao avatar Sep 12 '24 07:09 tatrapikao

@juliushaertl can we move this ticket to richdocuments somehow ? =)

mmeeks avatar Sep 12 '24 10:09 mmeeks

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.

juliusknorr avatar Jan 16 '25 10:01 juliusknorr