Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

owncloud reverts files while no one else is modifying them #4222

Closed
mortee opened this issue Nov 30, 2015 · 3 comments
Closed

owncloud reverts files while no one else is modifying them #4222

mortee opened this issue Nov 30, 2015 · 3 comments

Comments

@mortee
Copy link

mortee commented Nov 30, 2015

My setup is one windows desktop client, and one server which mostly serves as an automated backup (and primitive versioning) for my work files. This also lets me easily migrate my work stuff to another desktop if necessary - but this happens very rarely, and most of the time the only client that accesses the server is my desktop.

Actual behaviour

Given this setup, I'd expect to never experience conflicts. What happens instead is that in a lot of cases, a conflict arises from reasons involving mostly "Not allowed to upload this file because it is read-only on the server, restoring". This occurs mostly in Eclipse project folders, especially with .classpath files (dunno why), which revert my developments in unpredictable ways.

While I understand that OC is primarily a collaborative tool, I think the below guidelines should be seriously considered, to prevent loss of data/work:

Expected behaviour

When the local computer is the only source of updates on the server, then the client should never, ever overwrite any local file from the server, in any case whatsoever. How this circumstance can be verified is a separate topic - but I think this outcome should be mandatory.

When there's a conflict, then the local file should be left unchanged, the server version downloaded into a tagged filename, and the user notified.

Especially if the conflict is caused by a failure to sync, like when the client thinks the file is read-only on the server.

(How can a file become read-only on the server, when it's uploaded from a local, non-read-only file, and there are no other sources of updates on the server?)

The local file should never be overwritten/reverted if it's been changed locally since the last sync. Even in a collaborative environment this implies "I know you've been working on this file, but the server version is obviously more important than your work, so I set yours aside".

Actually, it should only be overwritten from the server when the local version has already been successfully synced/uploaded, it has been changed on the server since then, and the local file does not have local changes. If it does, it should be treated as a conflict, and handled as written above.

Steps to reproduce

I think the only-client-and-still-conflicting behavior might be triggered by a large shared folder which takes long to even discover, and local changes which happen on a much faster pace than the client can keep up.

So I'd reproduce it by setting up a server with only one client accessing it, sharing a big folder with lots of files, putting an Eclipse workspace inside, starting to do work on it, and then watching the project settings and possibly source files being reverted.

Server configuration

Operating system: NetBSD
Web server: Apache 2.2.31
Database: MySQL 5.5.45
PHP version: 5.4.45
ownCloud version: 8.1.3 (stable)

Client configuration

Client version: 2.0.2
Operating system: Windows 8.1

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/28730766-owncloud-reverts-files-while-no-one-else-is-modifying-them?utm_campaign=plugin&utm_content=tracker%2F216457&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F216457&utm_medium=issues&utm_source=github).
@guruz guruz added this to the 2.1.1-nextpatch milestone Dec 1, 2015
@tps800
Copy link

tps800 commented Dec 15, 2015

Seeing this too. Maybe these bugs are related: #4272 files get "readonly" on server, but without any idea why, because there is only one client. The chance seeing this bug is high if you change the file locally fast. Idealy while the client was in a sync cycle and before the client starts to sync this particular file. Looks like there is a time window between checking if a file has to be synced and the file really being synced. Changing the file within this window seems to disturb syncing and make the file "read only" on the server until something further happens, resetting the "read only" state.

@ogoffart
Copy link
Contributor

So the client belieave that the directory and files are read only.
There could be because of a bug in the client which would understand the permissions wrong, or a bug in the server which would report the wrong permission. I tend to think this is the later.
The client log should tell use what are the permission sent by the server.

So i believe this is a server bug.
May also be related to owncloud/core#20426

@dragotin dragotin modified the milestones: 2.2-nextminor, 2.1.1-current Jan 7, 2016
@guruz guruz removed this from the 2.2.0-current milestone Feb 23, 2016
@ogoffart
Copy link
Contributor

ogoffart commented Dec 5, 2017

Closing this old issue.
Maybe it is a duplicate of #5106

@ogoffart ogoffart closed this as completed Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants