Locking files for editing (browser / desktop client)

Hi,

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,
CGS

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.