nextcloud / nextcloud/files_lock
[Bug]: New version of an existing file cant be uploaded while the file is locked
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 39
- Forks
- 10
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 48
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
When a file is locked and you have to upload a new version of the same file, you´ve to unlock it and upload the new version when before the user who blocked it could overwrite it while being blocked

Steps to reproduce
- A file exists
- File is locked while editing
- Upload the file again edited
- Failed to upload the new version of the file
Expected behavior
The file should be overwritten by the user who blocked it when a new version is uploaded
Installation method
Manual installation
Operating system
RHEL/CentOS
PHP engine version
PHP 7.4
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
No response
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
No response
List of activated Apps
--
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files, tests, logs, or entry points are named. Start by reproducing the locked-file upload flow described in steps 1–4, then trace the files_lock handling for uploads by the user who holds the lock. Done means that user can upload a new version without unlocking it, with regression coverage for the reported steps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mariadb, php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100