Not able to delete from Remote Storage location (Locked Files)

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • Nextcloud Hub 9 (30.0.4)
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04
  • Web server and version (e.g, Apache 2.4.25):
    • 2.4.58-1ubuntu8.5
      • Reverse proxy and version _(e.g. nginx 1.27.2)
    • replace me
  • PHP version (e.g, 8.3):
    • 8.3.6
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • When I tried to delete a file
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • VM
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • Yes - Cloudflare

Summary of the issue you are facing:

When I try to delete a file from either of 2 remote TrueNAS Scale remote storage locations, I am unable to do so.
[…]

Steps to replicate it (hint: details matter!):

  1. Create a test Document, Text file on remote storage
  2. Try to Delete, Get error

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

{"reqId":"zTRxKO30qOJFIhiHWBcx","level":3,"time":"2024-12-18T16:03:41+00:00","remoteAddr":"10.0.0.203","user":"Dino","app":"webdav","method":"MOVE","url":"/remote.php/dav/files/Dino/Remote%20Missions%20Team%20Share/Missions%20Photo%20Memories/Untitled.docx","message":"\"Remote Missions Team Share/Missions Photo Memories/Untitled.docx\" is locked, existing lock on file: 2 shared locks","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/6.1.9","version":"30.0.4.1","exception":{"Exception":"OCP\\Lock\\LockedException","Message":"\"Remote Missions Team Share/Missions Photo Memories/Untitled.docx\" is locked, existing lock on file: 2 shared locks","Code":0,"Trace":[{"file":"/var/www/nc.wisdomtechnow.com/lib/private/Files/View.php","line":756,"function":"changeLock","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/apps/dav/lib/Connector/Sabre/Node.php","line":133,"function":"rename","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/3rdparty/sabre/dav/lib/DAV/Tree.php","line":171,"function":"setName","class":"OCA\\DAV\\Connector\\Sabre\\Node","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":612,"function":"move","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/apps/dav/lib/Connector/Sabre/Server.php","line":43,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/apps/dav/lib/Server.php","line":371,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/apps/dav/appinfo/v2/remote.php","line":19,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/remote.php","line":146,"args":["/var/www/nc.wisdomtechnow.com/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nc.wisdomtechnow.com/lib/private/Files/View.php","Line":2001,"Previous":{"Exception":"OCP\\Lock\\LockedException","Message":"\"files/19e74fda73df86af9327ff88e1dc96d4\"(\"Missions Photo Memories/Untitled.docx\") is locked, existing lock on file: 2 shared locks","Code":0,"Trace":[{"file":"/var/www/nc.wisdomtechnow.com/lib/private/Files/Storage/Wrapper/Wrapper.php","line":614,"function":"changeLock","class":"OC\\Files\\Storage\\Common","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/lib/private/Files/Storage/Wrapper/Wrapper.php","line":614,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/lib/private/Files/Storage/Wrapper/Wrapper.php","line":614,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/lib/private/Files/View.php","line":1992,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/lib/private/Files/View.php","line":756,"function":"changeLock","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/apps/dav/lib/Connector/Sabre/Node.php","line":133,"function":"rename","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/3rdparty/sabre/dav/lib/DAV/Tree.php","line":171,"function":"setName","class":"OCA\\DAV\\Connector\\Sabre\\Node","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":612,"function":"move","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/apps/dav/lib/Connector/Sabre/Server.php","line":43,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/apps/dav/lib/Server.php","line":371,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/apps/dav/appinfo/v2/remote.php","line":19,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/remote.php","line":146,"args":["/var/www/nc.wisdomtechnow.com/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nc.wisdomtechnow.com/lib/private/Files/Storage/Common.php","Line":766,"Previous":{"Exception":"OCP\\Lock\\LockedException","Message":"\"files/19e74fda73df86af9327ff88e1dc96d4\" is locked, existing lock on file: 2 shared locks","Code":0,"Trace":[{"file":"/var/www/nc.wisdomtechnow.com/lib/private/Files/Storage/Common.php","line":764,"function":"changeLock","class":"OC\\Lock\\MemcacheLockingProvider","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/lib/private/Files/Storage/Wrapper/Wrapper.php","line":614,"function":"changeLock","class":"OC\\Files\\Storage\\Common","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/lib/private/Files/Storage/Wrapper/Wrapper.php","line":614,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/lib/private/Files/Storage/Wrapper/Wrapper.php","line":614,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/lib/private/Files/View.php","line":1992,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/lib/private/Files/View.php","line":756,"function":"changeLock","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/apps/dav/lib/Connector/Sabre/Node.php","line":133,"function":"rename","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/3rdparty/sabre/dav/lib/DAV/Tree.php","line":171,"function":"setName","class":"OCA\\DAV\\Connector\\Sabre\\Node","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":612,"function":"move","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/apps/dav/lib/Connector/Sabre/Server.php","line":43,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/apps/dav/lib/Server.php","line":371,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/apps/dav/appinfo/v2/remote.php","line":19,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nc.wisdomtechnow.com/remote.php","line":146,"args":["/var/www/nc.wisdomtechnow.com/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nc.wisdomtechnow.com/lib/private/Lock/MemcacheLockingProvider.php","Line":126}},"message":"\"Remote Missions Team Share/Missions Photo Memories/Untitled.docx\" is locked, existing lock on file: 2 shared locks","exception":[],"CustomMessage":"\"Remote Missions Team Share/Missions Photo Memories/Untitled.docx\" is locked, existing lock on file: 2 shared locks"},"id":"67637a3adf13e"}

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

PASTE

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' =>
  array (
    0 => 'nc.wisdomtechnow.com',
  ),
  'datadirectory' => '/var/www/nc.wisdomtechnow.com/data',
  'dbtype' => 'mysql',
  'version' => '30.0.4.1',
  'overwrite.cli.url' => 'https://nc.wisdomtechnow.com',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => ',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'default_phone_region' => 'US',
  'mail_domain' => 'comcast.net',
  'mail_from_address' => 'whitedinotech',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'maintenance_window_start' => 1,
  'theme' => '',
  'loglevel' => 2,
  'mail_smtpauth' => 1,
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
  'maintenance' => false,
  'app_install_overwrite' =>
  array (
    0 => 'news',
    1 => 'maps',
    2 => 'officeonline',
    3 => 'occweb',
  ),
  'mail_smtphost' => 'smtp.comcast.net',
  'mail_smtpport' => '587',
  'memories.db.triggers.fcu' => true,
  'memories.exiftool' => '/var/www/nc.wisdomtechnow.com/apps/memories/bin-ext/exiftool-amd64-glibc',
  'memories.vod.path' => '/var/www/nc.wisdomtechnow.com/apps/memories/bin-ext/go-vod-amd64',
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\Image',
    1 => 'OC\\Preview\\HEIC',
    2 => 'OC\\Preview\\TIFF',
    3 => 'OC\\Preview\\Movie',
  ),
  'memories.exiftool_no_local' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (

Apps

The output of occ app:list (if possible).

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

Does no one have any input? Am I giving enough info?