File locking after NC33

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).

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 34.0.0
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debian trixie
  • Web server and version (e.g, Apache 2.4.25):
    • 2.4.67-1~deb13u3
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • N/A
  • PHP version (e.g, 8.3):
    • 8.4
  • Is this the first time you’ve seen this error? (Yes / No):
    • YEs
  • When did this problem seem to first start?
    • After upgrade to NC34
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • From downloaded ZIP file, directly, manually
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

When editing a Markdown file in my Notes folder, opened through the desktop client (using nautilus-nextcloud), the local file became read-only.

I later found it that the file was locked in NC through the files_lock app, which I don’t remember installing.

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

  1. Right-clink on a synchronised markdown file in Nautilus, chose Nextcloud → Open in browser

  2. Browser window opens, edit the file a bit.

  3. Notice that write permission disappears from the local file.

  4. Close the browser window, and notice that the file doesn’t return writeable.

The problem appears to be that the files_lock app has been activated, or changed, when upgrading from NC33 to NC34, and I found my files going read-only whenever I had opened a note in the Text app through the desktop client, but not if I opened it through the web interface.

A message appeared in the web interface that the file was locked by the Text app, but there was no obvious way of releasing the lock. Opening the Text app in the web interface, and exiting, didn’t release the lock.

If there is a bug in there, it seems to be in the interaction between the desktop client, the Text app, and the files_lock app. When the Text app is in a detached browser windows, it doesn’t release the lock when the window is closed.

I’ve disabled the files_lock app, and I can work as before, mostly on my local files, but opening the editor in NC through Nautilus and the desktop client, as I need.

This worked as expected in NC33, and the changed behaviour arrived with the upgrade to NC34.

Log entries

Nextcloud

Several messages of these types.

[notes] Error: Controller failed with OCP\Lock\ManuallyLockedException
	PUT /index.php/apps/notes/api/v1/notes/1044138?
	from 192.168.1.243 by historywalks at 13 Jun 2026, 08:59:21

[webdav] Error: Exception thrown: Sabre\DAV\Exception\Locked
	PUT /remote.php/dav/files/historywalks/Notes/Early%20history/Refugees.md
	from 192.168.100.10 by historywalks at 12 Jun 2026, 13:22:34

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!):

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "1": "ds.seindal.dk",
            "2": "cloud.historywalksvenice.com"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "34.0.0.12",
        "overwrite.cli.url": "http:\/\/ds.seindal.dk",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "default_phone_region": "IT",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "maintenance_window_start": 2,
        "theme": "",
        "loglevel": 2,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "dbindex": 15
        },
        "filelocking.enabled": true,
        "allow_local_remote_servers": true,
        "app_install_overwrite": [
            "maps",
            "metadata",
            "files_rightclick",
            "gpoddersync",
            "news"
        ],
        "updater.release.channel": "stable",
        "defaultapp": "dashboard",
        "config_preset": 1,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***"
    }
}

Apps

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

Please note that I have disabled files_lock to solve the problem. It was active when the problem persisted.

Enabled:
  - activity: 7.0.0
  - appstore: 1.0.0
  - bruteforcesettings: 7.0.0
  - cloud_federation_api: 1.18.0
  - comments: 1.24.0
  - cookbook: 0.11.7
  - dav: 1.39.0
  - federatedfilesharing: 1.24.0
  - files: 2.6.0
  - files_pdfviewer: 7.0.0-dev.0
  - files_reminders: 1.7.0
  - files_sharing: 1.26.0
  - files_trashbin: 1.24.0
  - files_versions: 1.27.0
  - gpoddersync: 3.16.0
  - logreader: 7.0.0
  - lookup_server_connector: 1.22.0
  - news: 28.6.0
  - notes: 6.0.0
  - notifications: 7.0.0-dev.1
  - notify_push: 1.3.3
  - oauth2: 1.22.0
  - office: 1.0.0
  - photos: 7.0.0
  - privacy: 6.0.0-dev.1
  - profile: 1.3.0
  - provisioning_api: 1.24.0
  - related_resources: 5.0.0-dev.0
  - serverinfo: 6.0.0
  - settings: 1.17.0
  - tables: 2.2.0
  - text: 8.0.0
  - text_templates: 1.4.0
  - theming: 2.9.0
  - twofactor_backupcodes: 1.23.0
  - twofactor_totp: 16.0.0
  - updatenotification: 1.24.0
  - viewer: 7.0.0-dev.0
  - webhook_listeners: 1.6.0
  - workflowengine: 2.16.0
Disabled:
  - admin_audit: 1.24.0
  - app_api: 34.0.0 (installed 4.0.6)
  - bookmarks: 16.1.4 (installed 16.1.4)
  - circles: 34.0.0 (installed 22.1.1)
  - contactsinteraction: 1.15.0 (installed 1.3.0)
  - dashboard: 7.14.0 (installed 7.14.0)
  - encryption: 2.22.0
  - federation: 1.24.0 (installed 1.20.0)
  - files_downloadlimit: 5.2.0-dev.0 (installed 3.0.0)
  - files_external: 1.26.0 (installed 1.22.0)
  - files_lock: 34.0.0 (installed 34.0.0)
  - firstrunwizard: 7.0.0-dev.0 (installed 2.11.0)
  - maps: 1.7.0 (installed 1.7.0)
  - nextcloud_announcements: 6.0.0 (installed 2.0.0)
  - password_policy: 6.0.0-dev.0 (installed 1.12.0)
  - recommendations: 7.0.0-dev.0 (installed 1.1.0)
  - sharebymail: 1.24.0 (installed 1.21.0)
  - support: 6.0.0 (installed 1.5.0)
  - survey_client: 6.0.0-dev.0 (installed 1.10.0)
  - suspicious_login: 12.0.0-dev.0
  - systemtags: 1.24.0 (installed 1.19.0)
  - testing: 1.23.0
  - twofactor_nextcloud_notification: 8.0.0
  - user_ldap: 1.25.0
  - user_status: 1.14.0 (installed 1.2.0)
  - weather_status: 1.14.0 (installed 1.10.0)
  - workflow_ocr: 1.33.1 (installed 1.33.1)
  - workflow_script: 4.0.0 (installed 4.0.0)

FYI: As of Nextcloud 34, files_lock is a shipped app:

It is only with the files_lock app that Nextcloud’s WebDAV becomes a full Class-2 WebDAV implementation. It is an important addition for preventing conflicts when multiple people are working on the same files.

But it requires some understanding of how it works,

Did you unlock the file using the three-dot menu like described in the manual?

Not every client supports all locking features. If you don’t like it, you can simply disable the app—as you have already done.

h.t.h.


ernolf

When opening the editor through the desktop client, there is no such unlock option available. You end up with a file which is locked indefinitely.

Disabling files_lock produces error messages left and right from the desktop client, so you’re forced into an unworkable situation. Either you get a message each and everything you open a file locally, or you end up have your files lock indefinitely.

In practice, opening the Text app through the desktop client has been rendered unsuable.

Tried to set the timeout to one minute, and the lock seems to disappear from the database, but the local file remains read-only.