NC file deletion: Difference between revisions

From Newroco Tech Docs
Jump to navigationJump to search
(Created page with "If you have problem deleting a file/folder in nextcloud here is a list of things to try. ==PHP memory limit== If in you have something like this in /var/log/apache2/error.log...")
 
 
Line 19: Line 19:
Run this command in /var/www/nextcloud
Run this command in /var/www/nextcloud
<pre>sudo -u www-data php occ files:scan --all</pre>
<pre>sudo -u www-data php occ files:scan --all</pre>
You can also do this just for specific users, and do groupfolders via
sudo -u www-data php occ files:scan --path=/user/files/my_groupfolder_path


==Disable file locking(untested)==
==Disable file locking(untested)==
Put this in /var/www/nextcloud/config/config.php
Put this in /var/www/nextcloud/config/config.php
<pre>'filelocking.enabled' => false,</pre>
<pre>'filelocking.enabled' => false,</pre>

Latest revision as of 12:06, 4 September 2019

If you have problem deleting a file/folder in nextcloud here is a list of things to try.

PHP memory limit

If in you have something like this in /var/log/apache2/error.log

PHP Fatal error:  Allowed memory size of 792723456 bytes exhausted (tried to allocate 72 bytes) in /var/www/nextcloud/lib/private/Files/Cache/Cache.php on line 620

you can change the value of memory_limit in /var/www/nextcloud/.htaccess

Install Redis for file locking

Instruction here: Redis

Manually delete locks from database

Put nextcloud in maintenance mode, by changing maintenance to true in /var/www/nextcloud/config/config.php

Connect to nextcloud database and run this:

DELETE FROM oc_file_locks WHERE lock=1;

Disable maintenance mode by changing maintenance back to false

Scan the nextcloud filesystem

Run this command in /var/www/nextcloud

sudo -u www-data php occ files:scan --all

You can also do this just for specific users, and do groupfolders via

sudo -u www-data php occ files:scan --path=/user/files/my_groupfolder_path

Disable file locking(untested)

Put this in /var/www/nextcloud/config/config.php

'filelocking.enabled' => false,