Skip to content

Owncloud doesn't create versions when syncing using different Webdav client (Goodsync) #18307

Closed as not planned

Description

@JH6

Steps to reproduce

  1. Setup Goodsync WebDav Client to sync with owncloud server
  2. Make one txt file containing some random text and save
  3. make sure Goodsync synced this file to the server.
  4. Change the text inside the txt file and save again
  5. make sure Goodsync synced the changed file to the server
  6. Login on the webinterface and browse to the file
  7. Check for excisting versions.
  8. Try the same thing but then with the owncloud client.

Expected behaviour

There should be multiple versions available when syncing using webdav using the goodsync client, the same as with the owncloud client.

Actual behaviour

There are no versions available when using the goodsync client but there are versions available when using the owncloud client.

Server configuration

Operating system: Ubuntu 14.04.3 server (with desktop environment installed on top)

Web server: Apache 2

Database: MySQL 5.5.44

PHP version: 5.5.9

ownCloud version: 8.1.1

Updated from an older ownCloud or fresh install: no

List of activated apps: Only the apps which are enabled by the default installation

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder
Enabled:
- activity: 2.0.1
- files: 1.1.10
- files_locking:
- files_mv: 0.8.1a
- files_pdfviewer: 0.7
- files_sharing: 0.6.2
- files_texteditor: 0.4
- files_trashbin: 0.6.3
- files_versions: 1.0.6
- files_videoviewer: 0.1.3
- firstrunwizard: 1.1
- gallery: 0.6.0
- provisioning_api: 0.2
- templateeditor: 0.1
Disabled:
- encryption
- external
- files_external
- user_external
- user_ldap
- user_webdavauth

The content of config/config.php:

'ocnbfbt1m77k', 'trusted_domains' => array ( 0 => '127.0.0.1', ), 'datadirectory' => '/ownclouddata/data', 'overwrite.cli.url' => 'http://127.0.0.1/owncloud', 'dbtype' => 'mysql', 'version' => '8.1.1.3', 'dbname' => 'owncloud', 'dbhost' => 'localhost', 'dbtableprefix' => 'oc_', 'dbuser' => 'oc_admin', 'logtimezone' => 'UTC', 'installed' => true, 'loglevel' => 0, ); **Are you using external storage, if yes which one:** no **Are you using encryption:** no **Are you using an external user-backend, if yes which one:** WebDav (goodsync) ### Client configuration **Browser: Google Chrome **Operating system:Windows 10 Pro ### Logs #### Web server error log How do I get those? Insert your webserver log here How do I get those? #### ownCloud log (data/owncloud.log) Is extremely large….. because a lot is syncing it’s difficult to find the correct sections.

Activity

  1. MorrisJobke commented on Aug 15, 2015

    @MorrisJobke
    Contributor

    @schiesbn @PVince81 Usually it shouldn't matter which webdav client is used to generate versions. Do you have any idea what this could have caused?

  2. PVince81 commented on Aug 17, 2015

    @PVince81
    Contributor

    Yes, it shouldn't matter which Webdav client is used.
    Simply using the Webdav interface to upload files should trigger version creation.

    It would be good to find out how GoodSync is uploading files.
    @JH6 can you run a single upload and provide the matching access.log entries ?

    Just guessing, maybe some clients have their own part files and instead of overwriting the files directly, they'd upload a copy into a temporary file (PUT to temp file) and then rename that file to the target file (MOVE temp file to final file). If they do that, then no versions will be created because the temp file itself didn't have any version. This is a situation that ownCloud cannot resolve because we cannot reliably decide whether overwriting a file should merge the versions or not. @schiesbn @karlitschek what do you think ?

  3. MorrisJobke commented on Aug 17, 2015

    @MorrisJobke
    Contributor

    Just guessing, maybe some clients have their own part files and instead of overwriting the files directly, they'd upload a copy into a temporary file (PUT to temp file) and then rename that file to the target file (MOVE temp file to final file). If they do that, then no versions will be created because the temp file itself didn't have any version. This is a situation that ownCloud cannot resolve because we cannot reliably decide whether overwriting a file should merge the versions or not. @schiesbn @karlitschek what do you think ?

    I also just thought about this way of handling uploads and the problems we will have with this approach.

  4. PVince81 commented on Aug 17, 2015

    @PVince81
    Contributor

    Or should we make file overwrite through MOVE automatically keep the old versions of the overwritten file ? Might be fine to do that in case someone wants to restore to an older state before the overwrite.

  5. JH6 commented on Aug 17, 2015

    @JH6
    Author

    Hi PVince81 and MorrisJobke

    I made a new folder in my owncloud account called test1. synced this folder using Goodsync. Added on my computer in the synced folder a file called test2.txt with random text in that folder. Waited till on my server the clock changed time and synced this single file using owncloud. I then copied all lines from the access.log in /var/log/apache2 from that time.
    I replaced my name with "user" and the IP of the server with "server_IP"

    server_IP - - [17/Aug/2015:10:36:06 +0200] "OPTIONS /owncloud/remote.php/webdav/test1/ HTTP/1.1" 401 2501 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:06 +0200] "OPTIONS /owncloud/remote.php/webdav/test1/ HTTP/1.1" 200 947 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:06 +0200] "PROPFIND /owncloud/remote.php/webdav/test1 HTTP/1.1" 207 1333 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:06 +0200] "PROPFIND /owncloud/remote.php/webdav/test1/ HTTP/1.1" 207 1267 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:06 +0200] "PROPFIND /owncloud/remote.php/webdav/test1/_gsdata_/lock.gsl HTTP/1.1" 404 1005 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:06 +0200] "PROPFIND /owncloud/remote.php/webdav/test1/_gsdata_/_file_state_v4._gs HTTP/1.1" 207 1267 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:06 +0200] "GET /owncloud/remote.php/webdav/test1/_gsdata_/_file_state_v4._gs HTTP/1.1" 200 1085 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:06 +0200] "PROPFIND /owncloud/remote.php/webdav/test1/_gsdata_/_file_state_v4._gs HTTP/1.1" 207 1267 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:06 +0200] "PROPFIND /owncloud/remote.php/webdav/test1/ HTTP/1.1" 207 1718 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:06 +0200] "PROPFIND /owncloud/remote.php/webdav/test1/ HTTP/1.1" 207 1267 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:06 +0200] "PROPFIND /owncloud/remote.php/webdav/test1/ HTTP/1.1" 207 1267 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - - [17/Aug/2015:10:36:09 +0200] "OPTIONS /owncloud/remote.php/webdav/test1/ HTTP/1.1" 401 2501 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:09 +0200] "OPTIONS /owncloud/remote.php/webdav/test1/ HTTP/1.1" 200 947 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:09 +0200] "PROPFIND /owncloud/remote.php/webdav/test1 HTTP/1.1" 207 1333 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:09 +0200] "PROPFIND /owncloud/remote.php/webdav/test1/_gsdata_/ HTTP/1.1" 207 1342 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:09 +0200] "PROPFIND /owncloud/remote.php/webdav/test1/_gsdata_/_file_state_v4._gs HTTP/1.1" 207 1267 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:09 +0200] "DELETE /owncloud/remote.php/webdav/test1/_gsdata_/_insync_v4.gsl HTTP/1.1" 204 718 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:10 +0200] "PROPFIND /owncloud/remote.php/webdav/test1/_gsdata_/lock.gsl HTTP/1.1" 404 1005 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:10 +0200] "PUT /owncloud/remote.php/webdav/test1/_gsdata_/lock.gsl HTTP/1.1" 201 835 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:11 +0200] "PROPFIND /owncloud/remote.php/webdav/test1/ HTTP/1.1" 207 1267 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:11 +0200] "PUT /owncloud/remote.php/webdav/test1/_gsdata_/f966ec44af959844944ff0f4e9598b3c._gstmp HTTP/1.1" 201 835 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:11 +0200] "MOVE /owncloud/remote.php/webdav/test1/_gsdata_/f966ec44af959844944ff0f4e9598b3c._gstmp HTTP/1.1" 201 748 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:12 +0200] "PROPFIND /owncloud/remote.php/webdav/test1/test2.txt HTTP/1.1" 207 1247 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:12 +0200] "PUT /owncloud/remote.php/webdav/test1/_gsdata_/_file_state_upload._gstmp HTTP/1.1" 201 835 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:12 +0200] "MOVE /owncloud/remote.php/webdav/test1/_gsdata_/_file_state_upload._gstmp HTTP/1.1" 204 751 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:14 +0200] "PROPFIND /owncloud/remote.php/webdav/test1/_gsdata_/_file_state_v4._gs HTTP/1.1" 207 1267 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:14 +0200] "PROPFIND /owncloud/remote.php/webdav/test1/_gsdata_/_cleanup.gss HTTP/1.1" 207 1259 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:14 +0200] "PROPFIND /owncloud/remote.php/webdav/test1/ HTTP/1.1" 207 1267 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:14 +0200] "MOVE /owncloud/remote.php/webdav/test1/_gsdata_/lock.gsl HTTP/1.1" 201 748 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:14 +0200] "PUT /owncloud/remote.php/webdav/test1/_gsdata_/_log._gstmp HTTP/1.1" 201 835 "-" "SibSocket/9.8.5.5 (Windows 8)"
    server_IP - user [17/Aug/2015:10:36:14 +0200] "MOVE /owncloud/remote.php/webdav/test1/_gsdata_/_log._gstmp HTTP/1.1" 201 748 "-" "SibSocket/9.8.5.5 (Windows 8)"
    
  6. JH6 commented on Aug 17, 2015

    @JH6
    Author

    I also noted that goodsync makes an folder with the name _gsdata. Probably to keep track of file changes.

  7. PVince81 commented on Aug 17, 2015

    @PVince81
    Contributor

    I see it's indeed doing PUTs and MOVEs. This confirms my theory above.
    The access.log doesn't show the MOVE destination because it's in a header "Destination" so it's not clean which one of the PUT/MOVE pairs is the one that affects the final file.

    Currently the only way to create versions is to do a PUT directly on the final file, which would be PUT /owncloud/remote.php/webdav/test1/test2.txt.

    Regardless, this shows that there is a need to merging versions on overwrite.

  8. JH6 commented on Aug 17, 2015

    @JH6
    Author

    If I see it correctly goodsync moves the file from the _gsdata folder. There is an option in owncloud to disable the use of the _gsdata folder. I will try this. Maybe with that it will work for now.

  9. JH6 commented on Aug 17, 2015

    @JH6
    Author

    Tested that. Doesn't work. Still get PUT and MOVE but then not from the _gsdata anymore but from the test1 folder.
    So I think that means there is currently no good solution?

  10. PVince81 commented on Aug 17, 2015

    @PVince81
    Contributor

    No solution that wouldn't involve changing OC's behavior regarding overwriting of files.

  11. JH6 commented on Aug 17, 2015

    @JH6
    Author

    Okay. Thanks for looking into this.
    I'm basically using GoodSync because it supports removable media on the client side. So that when a client removes a external harddrive goodsync doesn't try to sync and when connected (regardless of drive letter, it uses the drive name) the drive syncs. The owncloud client didn't support this as far as I know. I used Goodsync in the past and that worked well for that purpouse. If I really need versioning I will use the goodsync versioning if needed.

  12. PVince81 commented on Aug 17, 2015

    @PVince81
    Contributor
  13. JH6 commented on Aug 17, 2015

    @JH6
    Author

    Not yet. was still planing on doing so. Will do it now since I have time.

  14. 48 remaining items

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