User cannot delete and move folders

Hello folks,

Since few weeks I am having strange behaviour with one of the users of our home nc server. What happened is that one user cannot delete and move folders any more (empty and with files). File moves and deletion works. This issue persists only with this specific user, with all others there is no issue noticed.

Nextcloud version: 13.0.5
Operating system and version: Ubuntu 16.04
Apache version: 2.4.18
PHP version: 7.0.30

Steps to replicate it:

  1. Move or delete existing folders is not working
  2. Same as above with newly created empty or not empty folders

By doing the above operations, the output in the Nextcloud log is always the same:

Error PHP
Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) at /var/www/nextcloud/lib/private/Files/Cache/Cache.php#166

Same error appears in the apache error log as well.

Hello @yens77

Try to rescan all files, maybe that helps.
https://docs.nextcloud.com/server/13/admin_manual/configuration_server/occ_command.html#file-operations

Cheers, Flavio

Dear Flavio, thanks for the answer. Unfortunately there was no success with the files operation, I already tried it.

OK, I think after some hours of trying I found a solution.
Prehistory: The user having the issues is actually user where we keep all our family photos (user is called “family”). We have around 300 GB of photos there and recently we were sorting them in folders (year, event, etc.) This was working fine for 2-3 months till the moment we got the issue with the folders not moving and not being deleted any more (php error memory exhausted …).
My solution: from my experience I noticed that the app Gallery is usually consuming lots of resources, and since the error is about memory, I disabled the app. Then to be on safe side I did files:scan for the problematic user and files:cleanup (no errors). Now everything works fine, even with the app enabled again, hope everything will be fine in the future.
Possible recommendation: in case you have large number of photos and you plan to move/sort/relocate/etc., it is better to disable first the gallery app. In fact I moved already some folders with the app disabled and it works faster.
I assume it is may be similar case with music files and other stuff.