Locking files for editing (browser / desktop client)


we are using Nextcloud either via the browser or via the desktop client in our company. For now we have the problem, that it is possible that user A is editing a file and user B is editing the same file at the same time and therefore one user can overwrite the changes of the other user.

Is it possible to lock a file for editing regardless a user is using the browser or the desktop client? I think if all users are using the browser there is no problem. Our users aren’t online / connected with Nextcloud all the time, so a lock on a file has to be transferred to the user at the time on which a user will be online / connected.

How are other companies treating with this problem?

Kind regards,

I don’t think that there is a built-in way to lock files, because the promoted tools like Nextcloud Text and OnlyOffice / Collabora support all collaborative live editing of the same document.

Maybe the “W2G2” app from the app store is something for you? I’m not sure though if it also blocks the sync via WebDAV (“desktop clients”) or only within the Web UI :man_shrugging:.

There is a lock file app from Nextcloud, but it doesn’t work with the sync clients, only with the web interface. I guess for file locking there’s no support in the client’s, which makes sense since they’re polling in 30nd intervals. Race conditions can’t be prevented this way.

Can someone confirm that file locking through desktop clients is going to be introduced with NC 25 ?

There are a lot of (meanwhile closed) threats on Github regarding this. But I did not really understand after all when this is going to come. Much improved file locking was already advertized for NC 24. But turned out only manual in the web client.

File locking through the desktop client would be a long awaited feature which would make our everyday work so much easier.