I also got a case where the clients report that some files are locked by the Nextcloud server. How to resolve this when running Nextcloud via the (official) Docker image? An update to the README or even some client-side "unlock" feature would be nice to have.
First, put nextcloud in maintenance mode
php occ maintenance:mode --on
then run this query on your nextcloud database
DELETE FROM oc_file_locks WHERE 1;
and you can disable the maintenance mode
php occ maintenance:mode --off
Thanks; for completeness, this is how I do it with my container(s):
docker exec --user www-data nextcloud php occ maintenance:mode --on
docker exec nextcloud-db mysql --user=root --password=$MY_MYSQL_ROOT_PASSWORD -D nextcloud -e 'delete from oc_file_locks where 1'
docker exec --user www-data nextcloud php occ maintenance:mode --off
Still, I'm missing a UI for this in the settings ...non-tech people might have trouble to resolve this otherwise.
If you want an UI for this, you should open an issue in https://github.com/nextcloud/server
Assuming that the question has been answered.
Most helpful comment
Thanks; for completeness, this is how I do it with my container(s):
Still, I'm missing a UI for this in the settings ...non-tech people might have trouble to resolve this otherwise.