Skip to content

Add Webdav property to advise the sync clients to not sync this entry #26311

Closed

Description

@PVince81

There are several tickets that propose different approaches and different criteria for sync exclusions.
Regardless of the criteria, I think the basic mechanism should be that the server returns an extra Webdav property <oc:do-not-sync>1</oc:do-not-sync> to tell the client to not sync this item.

It is then the responsibility of apps or whichever code that decides what the exclusion criteria is to set the property on the entries.

This is purely the backend/protocol level.

Some proposed criteria that would need to be implemented separately:

@owncloud/filesystem @guruz @ogoffart @dragotin @davivel @DeepDiver1975 @butonic

Activity

  1. added this to the backlog milestone on Oct 7, 2016
  2. PVince81 commented on Oct 7, 2016

    @PVince81
    ContributorAuthor

    I'd even go as far as to say that these different criteria should be implemented / implementable as apps, which means that core needs to provide hooks (for sabre plugins?) for apps to be able to decide which entries to exclude.

  3. PVince81 commented on Oct 7, 2016

    @PVince81
    ContributorAuthor

    then people can really go crazy with any custom use cases 😄

  4. PVince81 commented on Oct 7, 2016

    @PVince81
    ContributorAuthor
  5. mmattel commented on Oct 7, 2016

    @mmattel
    Contributor

    Thanks for taking care of !
    When going for an implementation, an idea is to (re)use this mechanism with federated sharing where you can forward the webdav property from the source - end to end. Like a fed-sharing checkmark in administration "forward no-sync webdav property". (Sorry full of ideas 😄)

  6. AnrDaemon commented on Oct 8, 2016

    @AnrDaemon

    Keep It Simple and Stupid.
    Return HTTP/1.1 403 forbidden for files you deem undesirable for sync. You could add a header explaining the reason, so that a compatible client don't frek out and reduce this specific issue to a mere notice instead of sync error. But the first reaction must be clear that the action attempted is not permitted.

  7. PVince81 commented on Oct 10, 2016

    @PVince81
    ContributorAuthor

    @AnrDaemon The problem with 403 is that not only sync clients use Webdav. And I don't think we should do user agent checking to do conditional blocking.
    Also in some cases a client could want to still get the metadata to be able to display it in some way without syncing, like for the folder selection dialog in the desktop client or like for the mobile client which only syncs whatever was marked as "make available offline".

    Another name for this new Webdav property could be "sync permission" for people who prefer that name. 😄

  8. dragotin commented on Oct 10, 2016

    @dragotin
    Contributor

    We could do that, but my concern is that people will fail to understand why some things are synced and others not. How do we get that reasoning to the clients?

    First reaction might be to add a string to the XML explaining that. That is hard to do because of translations. It would mean that clients need to send an accept-language header with propfinds and the server needs to parse it in case. Not sure if that is expensive or not. Probably we can do that, but I am not sure if there aren't better alternatives.

    ...

  9. PVince81 commented on Oct 10, 2016

    @PVince81
    ContributorAuthor

    people

    Who ? The sysadmins, the developers from third party clients, or the people using the desktop client ?
    For the desktop client, there's the sync tab about "Not synced", so the skipped entries could be added there with the reason "because the server told us so!".

  10. pmaier1 commented on Oct 10, 2016

    @pmaier1
    Contributor
  11. ogoffart commented on Oct 10, 2016

    @ogoffart

    So we would check this property only for new folders? and we would still allow the user to check it in the selective sync? So it would be a default off for selective sync?

  12. PVince81 commented on Oct 10, 2016

    @PVince81
    ContributorAuthor

    @ogoffart hmm, good point. I actually forgot about selective sync and was thinking of a "hard" way of blocking syncing, basically that the desktop client would refuse syncing any of these folders.

    Yeah, but maybe you're right that it should rather be a suggestion that preselects (or pre de-selects) folders using the selective sync feature.

  13. PVince81 commented on Oct 10, 2016

    @PVince81
    ContributorAuthor

    added these to the list in the main post:

    excluding federated share individually from sync: #14727
    excluding individual ext storages from syncing: #12216 (see sync option)

    That's already quite a few use cases 😄

  14. PVince81 commented on Oct 10, 2016

    @PVince81
    ContributorAuthor

    Seems there was already a client ticket, linking here owncloud/client#4621 😄

  15. 30 remaining items

  16. mmattel commented on Oct 26, 2016

    @mmattel
    Contributor

    Most of us look to the examples from a very high knowledge and experiene level. Ordianry users do not use curl or any other technology which needs deep knowledge and understanding. They do not even know that these things exist, and just use it and want to use it as a no-brainer. Give them access with the browser, they use it, give them access with a client (sync or dav), they use it. They do not want to spend a lot of brain into it that is not their focus. All users do understand if the admin says, use the browser, use the (dav) client, this is what you can post configure and this is restricted and you can not change for what reason ever. 99.9% of the users do not change or try to fake the standard settings, maybe they ask to be granted access but not more. This causes much less post work to the admin and the users as they just work and do not want to tinker. Just my opinion, based on experience.

  17. AnrDaemon commented on Oct 26, 2016

    @AnrDaemon

    That's how the fall starts. First you separate people into "ordinary" and "some other", then you point to a chosen group and say "look, they are not complaining and very content with features we provide, we should continue in this direction". That's how Windows 10 was born.

  18. guruz commented on Feb 7, 2017

    @guruz
    Contributor

    FYI The 2.3 client has an option now "Ask for confirmation before synchronizing external storages" which should already help for a lot of scenarios.
    https://cloud.githubusercontent.com/assets/2644445/22258989/e928fa92-e263-11e6-9c70-575316035231.png

  19. mmattel commented on Feb 7, 2017

    @mmattel
    Contributor

    This is very good and useful !!

    From the client side, clients (human) do not know and/or care if the storage behind is external or not, they just see "folders". And client side choices are, by design, not oC admin driven.

  20. guruz commented on May 11, 2017

    @guruz
    Contributor

    an extra Webdav property oc:do-not-sync1</oc:do-not-sync> to tell the client to not sync this item.

    @PVince81

    Would it be easier for all implementations to get a new flag inside the oc:permissions?

    soft: Something like an "advisory soft don't sync"?

    hard: We of course return a 403 for that file/folder. However I think there should also be a flag in permissions being returned so that the clients can avoid even doing those unsucessful network requests?

    So two new permissions in

    public function getDavPermissions() {

  21. PVince81 commented on May 11, 2017

    @PVince81
    ContributorAuthor

    New property or not doesn't affect server implementation that much. Not sure about clients...

  22. moscicki commented on May 11, 2017

    @moscicki

    Yes. I agree that there are two cases: soft and hard "do-not-sync". This will provide a general framework to fit most of the applications.

    Soft is anything that is just advisory and may be overriden by the client settings.
    One application for soft is just a global exclude list maintained by the server and it may be overriden by the local client settings.

    However hard means that the server will return 403 (or equivalent) when the client tries to access the subfolder. Therefore it does not make any sense for the client to try (or retry) to access this.

    It makes sense to have this as a webdav property to avoid calls which we know will return 403. The client side logic could be the following:

    • soft-dont-sync property in PROPFIND response: do not sync unless locally overriden by the user
    • hard-dont-sync property in PROPFIND reposnse: do not try to sync at all

    You may take into account that this property may be modified in the future. So you should not cache forever (if at all) the value of this property on the client side.

    If a request fails with 403 then one should see the property of enclosing parent folders. You can imagine that X/Y/Z fails with 403 but also X/Y fails with 403 because X is hard-do-not-sync. This can happen in the middle of the sync run if server property is modified but the subsequent sync run should handle it well.

    My particular use-case for this is hard: a part of the tree is not readible by the current user.

  23. ownclouders commented on Dec 21, 2017

    @ownclouders
    Contributor

    Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

    (This is an automated comment from GitMate.io.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions