File is locked – how to unlock

Searching: server replied locked owncloud

You can't access files because they are locked and you find such errors in your logfile:

{"reqId":"0DijSqEkfOg2iyh9VD8J","remoteAddr":"xx.xx.xx.xx","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 423 \\\"path\\\/file.extension\\\" is locked\",\"Exception\":\"OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Exception\\\\FileLocked\",\"Code\":0,\"Trace\":\"#0

If you're running the ownCloud 8.2.x branch make sure that you're using at least 8.2.2 (previous versions had a bug causing this issue).

Manually disable locking state:

  • put ownCloud in maintenance mode: edit config/config.php and change this line:
    'maintenance' => true,
  • Empty table oc_file_locks: Use tools such as phpmyadmin or connect directly to your database and run:
    DELETE FROM oc_file_locks WHERE 1
  • disable maintenance mode (undo first step).

Automatically reset locking state:

Normally ownCloud should reset the locked state on its own via background jobs. So make sure your cron-jobs run properly (you admin page tells you when cron ran the last time): https://doc.owncloud.org/server/9.0/admin_manual/configuration_server/background_jobs_configuration.html2.2k

Permanent solution (if it happens regularly)

  • on your own server: Use redis for this feature. It is faster and so far no problems have been reported. You can follow the instructions for memory-caching in the docs: https://doc.owncloud.org/server/9.0/admin_manual/configuration_server/caching_configuration.html#id41.7k
  • Shared hosting (others who can't install redis): You can disable the file locking, edit your configuration file config/config.php:
    'filelocking.enabled' => false,
  • Disabling is no solution. If you really need a real solution, please report this error to the bugtracker (https://github.com/owncloud/core/issues93). Or join the existing discussion (if the error matches): https://github.com/owncloud/core/issues/20380215

 

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *