I have similar troubles with a Nextcloud installation that I migrated from an Owncloud installation that Iām running on a Synology diskstation.
This is the database command that I tried:
DELETE FROM owncloud.file_locks WHERE file_locks.lock=1;
but this did not work, so later on I tried:
sudo -u http php56 occ files:scan --all
(note that I had to use the āhttpā for username instead of āwww-dataā and that I had to explicitely state the version in the php56 command.)
The scan resulted also in exceptions while scanning:
Exception while scanning: "files/0e3e13890e7b79a0edc572f53b262079" is locked #0 /volume1/web/nextcloud/lib/private/Files/Storage/Common.php(680): OC\Lock\DBLockingProvider->acquireLock('files/0e3e13890...', 1) #1 /volume1/web/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(588): OC\Files\Storage\Common->acquireLock('files/Familie/B...', 1, Object(OC\Lock\DBLockingProvider)) #2 /volume1/web/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(588): OC\Files\Storage\Wrapper\Wrapper->acquireLock('files/Familie/B...', 1, Object(OC\Lock\DBLockingProvider)) #3 /volume1/web/nextcloud/lib/private/Files/Cache/Scanner.php(148): OC\Files\Storage\Wrapper\Wrapper->acquireLock('files/Familie/B...', 1, Object(OC\Lock\DBLockingProvider)) #4 /volume1/web/nextcloud/lib/private/Files/Cache/Scanner.php(420): OC\Files\Cache\Scanner->scanFile('files/Familie/B...', 3, '157625', NULL, true) #5 /volume1/web/nextcloud/lib/private/Files/Cache/Scanner.php(388): OC\Files\Cache\Scanner->handleChildren('files/Familie', true, 3, '157625', true, 53184942) #6 /volume1/web/nextcloud/lib/private/Files/Cache/Scanner.php(391): OC\Files\Cache\Scanner->scanChildren('files/Familie', true, 3, 157625, true) #7 /volume1/web/nextcloud/lib/private/Files/Cache/Scanner.php(391): OC\Files\Cache\Scanner->scanChildren('files', true, 3, 23, true) #8 /volume1/web/nextcloud/lib/private/Files/Cache/Scanner.php(322): OC\Files\Cache\Scanner->scanChildren('', true, 3, 21, true) #9 /volume1/web/nextcloud/lib/private/Files/Utils/Scanner.php(196): OC\Files\Cache\Scanner->scan('', true, 3) #10 /volume1/web/nextcloud/apps/files/lib/Command/Scan.php(159): OC\Files\Utils\Scanner->scan('/jan') #11 /volume1/web/nextcloud/apps/files/lib/Command/Scan.php(227): OCA\Files\Command\Scan->scanFiles('jan', '/jan', false, Object(Symfony\Component\Console\Output\ConsoleOutput), false) #12 /volume1/web/nextcloud/3rdparty/symfony/console/Command/Command.php(256): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /volume1/web/nextcloud/core/Command/Base.php(161): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /volume1/web/nextcloud/3rdparty/symfony/console/Application.php(818): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /volume1/web/nextcloud/3rdparty/symfony/console/Application.php(186): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /volume1/web/nextcloud/3rdparty/symfony/console/Application.php(117): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /volume1/web/nextcloud/lib/private/Console/Application.php(169): Symfony\Component\Console\Application->run(NULL, NULL) #18 /volume1/web/nextcloud/console.php(90): OC\Console\Application->run() #19 /volume1/web/nextcloud/occ(11): require_once('/volume1/web/ne...') #20 {main}
My Nextcloud client is still giving errors like:
Error transferring - server replied: Locked
Do you have any suggestions?