Posted in

Nextcloud: How to unlock a file

When a file is locked you can’t do anything with it, including deleting it. All instructions tell you to wipe the locks table in your database or tweak your settings, but that doesn’t work.

How to undo the file lock

Find the file ID:

On a file go to ••• > Sharing options > Internal link > Copy button

That will give you a URL similar to this:

 
https://your.nextcloud/f/12345

Take the number at the end: 12345

On the terminal run this command:

 
php occ files:lock -u 12345 username

That’s all

Leave a Reply

Your email address will not be published. Required fields are marked *