Cannot increase permissions

Hello everyone On my next cloud, something incomprehensible is happening. Users upload files when trying to create a public link, I get the message “Cannot increase permissions {PATH}” I tried to scan files, but it does not solve the problem.
files:scan --path=“$USERNAME$”
Operating system: Linux 5.14.0-427.24.1.el9_4.x86_64 x86_64
Accounting mechanism - Database /mnt/ncdata/$USERNAME$
Version - Nextcloud Hub 8 (29.0.4)

Tell me what the problem may be and what needs to be done to solve it.

Thanks

UPD: It was possible to find that for some reason when calling $userFolder->GetById($share->getNodeId()); in Manager.php it comes as an empty array and in this case the error I mentioned above falls. Why can it be empty?

Hi, got the exact same error message. See here

https://help.nextcloud.com/t/kann-die-berechtigung-von-xyz-nicht-erhohen/183132

Besides to this problem, it occurres that the activity log cannot be opened. The two problems may be connected

Greetings