I can't rename files...(Não consigo renomear arquivos) Help me please!

Hello, I have a problem that every time I try to rename a file (even being an administrator) the error occurs in the log below:
*Note: This problem started out of nowhere.

How to solve? Can someone tell me? Please!

Portuguese: Olá, estou com um problema que toda vez que tento renomear qualquer arquivo (mesmo sendo administrador) ocorre o erro do log abaixo:
*Observação: Começou este problema de um dia para o outro.

Como resolver? Alguém consegue me dizer?

Error:

OCP\Lock\LockedException: “Comercial/Atualização Dos Leads.xlsx” is locked

/var/www/nextcloud/lib/private/Files/View.php - line 803:

OC\Files\View->changeLock()

/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Node.php - line 140:

OC\Files\View->rename()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php - line 153:

OCA\DAV\Connector\Sabre\Node->setName()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 612:

Sabre\DAV\Tree->move()

/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:

Sabre\DAV\CorePlugin->httpMove()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 472:

Sabre\DAV\Server->emit()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 253:

Sabre\DAV\Server->invokeMethod()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 321:

Sabre\DAV\Server->start()

/var/www/nextcloud/apps/dav/lib/Server.php - line 339:

Sabre\DAV\Server->exec()

/var/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:

OCA\DAV\Server->exec()

/var/www/nextcloud/remote.php - line 166:

require_once("/var/www/ne ... p")

Causado por OCP\Lock\LockedException: “files/78b71508eb1ee481f4031f48d3363985” is locked

/var/www/nextcloud/lib/private/Files/Storage/Common.php - line 817:

OC\Lock\DBLockingProvider->changeLock()

/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 632:

OC\Files\Storage\Common->changeLock()

/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 632:

OC\Files\Storage\Wrapper\Wrapper->changeLock()

/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 632:

OC\Files\Storage\Wrapper\Wrapper->changeLock()

/var/www/nextcloud/apps/files_sharing/lib/SharedStorage.php - line 476:

OC\Files\Storage\Wrapper\Wrapper->changeLock()

/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 632:

OCA\Files_Sharing\SharedStorage->changeLock()

/var/www/nextcloud/lib/private/Files/View.php - line 2006:

OC\Files\Storage\Wrapper\Wrapper->changeLock()

/var/www/nextcloud/lib/private/Files/View.php - line 803:

OC\Files\View->changeLock()

/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Node.php - line 140:

OC\Files\View->rename()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php - line 153:

OCA\DAV\Connector\Sabre\Node->setName()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 612:

Sabre\DAV\Tree->move()

/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:

Sabre\DAV\CorePlugin->httpMove()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 472:

Sabre\DAV\Server->emit()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 253:

Sabre\DAV\Server->invokeMethod()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 321:

Sabre\DAV\Server->start()

/var/www/nextcloud/apps/dav/lib/Server.php - line 339:

Sabre\DAV\Server->exec()

/var/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:

OCA\DAV\Server->exec()

/var/www/nextcloud/remote.php - line 166:

require_once("/var/www/ne ... p")

Hello,

Could you provide some more info?

What version of NC?
Is Redis enabled?
When did your last cronjob run ?
share your config.php ( remove sensitive parts )

HOW TO unlock files → File is locked - how to unlock

Definitely a right management for the folder data …

Check user:group and files access 0640 for data folder

Hello,

Version: Nextcloud Hub II 23.0.2

Redis is not activated, I didn’t know I needed it… I’ll research more, just install it?

I did the procedure yesterday in Mysql: DELETE FROM oc_file_locks WHERE 1

It worked! But today the problem came back… Is it because mine is in AJAX? Just switch to cron?

Hello,

I did the procedure yesterday in Mysql: DELETE FROM oc_file_locks WHERE 1

It worked! But today the problem came back… Is it because mine is in AJAX? Just switch to cron?

Cron has defintly got precedence over AJAX and useses less resources. Enabling Redis will most likely solve your issue.

Understood. I have activated cron and I will check how to activate Redis.

At the moment I just made an Event in Mysql that every 4 minutes activates this rule and is solving the problem.

I will check how to configure Redis, thanks!

Just to leave it as a record, Redis was already activated (I didn’t remember that I had already done the procedure) and putting it as cron made all users continue synchronizing directly without needing the files giving other errors. So I went back to AJAX and kept the Event inside Mysql by activating the rule I reported above every 4 minutes.

I made something that here in Brazil we call “gambiarra” lol

Thank you all…