Out of sync and cannot move, delete, or rename folders in Nextcloud

Moved folders on desktop that did not sync with NextCloud. Now I cannot move, delete, or rename Nextcloud folders through browser and desktop files not syncing. How do I get this synced?

Nextcloud version: 17.01
Server operating system and version: Ubuntu 18.04
Nginx version: 1.16.1
PHP version: 7.3
Desktop operating system and version: Windows 10 Pro v 1809
FireFox version: 72.0.1

When I try to move, delete, or rename a folder using browser I get error message “Could not move ‘foldername]’”; “Error deleting file ‘[foldername]’” (Yes, error says deleting file when I attempted to delete a folder); or “Could not rename ‘foldername]’” respectively.

Steps to replicate it:

Might have been caused by any one or more of the following (I don’t know which if any, but each is a possibility at the time I was moving files):

  1. moving folders on desktop when Nextcloud was not running;
  2. nextcloud running but moving so many files that screen went to sleep before completing copy; or
  3. using xcopy from command prompt rather than windows explorer to move files.

The output of my Nextcloud log:

Fatal	webdav	OCP\Lock\LockedException: "[Path to folder]" is locked	
2020-01-14T21:44:05-0800
[lots more like above]

The output of my config.php file:

<?php
$CONFIG = array (
  'passwordsalt' => '[pwsalt]',
  'secret' => '[secret]',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '[my.domain.com]',
    2 => '[IPV4]',
    3 => '[IPV4]',
    4 => '[IPV4]',
    5 => '[IPV4]',
  ),
  'datadirectory' => '/mnt/[mypath]',
  'overwrite.cli.url' => 'https://localhost',
  'trashbin_retention_obligation' => '180, auto',
  'dbtype' => 'mysql',
  'version' => '17.0.1.1',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '[username]',
  'dbpassword' => '[dbpw]',
  'installed' => true,
  'instanceid' => 'ocflfrurabky',
  'mail_domain' => '[mydomain]',
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => '[MailFrom]',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'updater.release.channel' => 'stable',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_smtphost' => '[maildomain]',
  'mail_smtpport' => '465',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => '[emailAddress]',
  'mail_smtppassword' => '[emailPW]',
  'twofactor_enforced' => 'false',
  'twofactor_enforced_groups' => 
  array (
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
  ),
  'mysql.utf8mb4' => true,
  'updater.secret' => '[bigSecret]',
);

The output of my var/log/syslog:

Jan 14 06:28:24 [servername] CRON[11820]: (CRON) info (No MTA installed, discarding output)
Jan 14 06:28:24 [servername] kernel: [104885.687726] [UFW BLOCK] IN=eth0 OUT= MAC=[mac address] SRC=[ip v4] DST=[ip v4] LEN=40 TOS=0x00 PREC=0x00$
[more like line above]
Jan 14 06:39:01 [servername] CRON[12510]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Jan 14 06:39:02 [servername] systemd[1]: Starting Clean php session files...
Jan 14 06:39:02 [servername] systemd[1]: Started Clean php session files.
Jan 14 06:28:24 [servername] kernel: [104885.687726] [UFW BLOCK] IN=eth0 OUT= MAC=[mac address] SRC=[ip v4] DST=[ip v4] LEN=40 TOS=0x00 PREC=0x00$
[more like line above]

Have you tried removing locks?
On your server:

  1. take a backup of your database
  2. take your server into maintenance mode
  3. remove locks, if you’re running MySQL in MySQL DELETE FROM oc_file_locks WHERE 1 ;
  4. Turn maintenance mode off.

If you’re not running a redis on your server, I would set it up. It might make your life easier.

Thank you! That allowed me to rename, delete, and move files through web interface.