core icon indicating copy to clipboard operation
core copied to clipboard

Client won't sync when files are put in a shared folder

Open jmary opened this issue 11 years ago • 13 comments

Situation : Create two groups : group1 and group2 useradmin belong to both groups. user2 belong to group2. Folder2 belong to group2 and can be accessed read/write by useradmin.

If user2 places a file into folder2, then folder2 won't be synced on useradmin client. Sync will happen if useradmin is doing something inside folder2.

That's a nasty bug, adoption blocker indeed.

I noticed this since 7.03, it affects 7.04 also.

Julien

jmary avatar Dec 09 '14 06:12 jmary

@dragotin @DeepDiver1975 @PVince81 Wasn't there something that a via web uploaded files in a shared folder isn't synced to the clients?

MorrisJobke avatar Dec 09 '14 09:12 MorrisJobke

@jmary Can I ask you for more details? What sync client version. How is the file put into the folder (via client, via web)? Can you fill out the issue template https://github.com/owncloud/core/blob/master/issue_template.md ?

MorrisJobke avatar Dec 09 '14 09:12 MorrisJobke

The first statement is correct. The bug appears when the file is uploaded threw the web interface, and not when it has been sync by the client from user2 desktop.

jmary avatar Dec 10 '14 02:12 jmary

Steps to reproduce

  1. Create 2 groups : group1 and group 2
  2. useradmin belongs to both groups
  3. user2 belongs to group2
  4. folder2 belongs to group2 and can be accessed read/write by useradmin
  5. If user2 is placing a file in folder2 from the web interface, the file won't be sync by useradmin desktop client
  6. However sync will operate is useradmin is himself doing something in folder2, like inserting a file from his desktop.

Expected behaviour

When user2 is placing a file in folder2 from the web interface, the useradmin desktop client should sync this file within his desktop.

Actual behaviour

The file isn't synced at all, until useradmin is interacting with the content of folder2

Server configuration

Operating system: Debian 7.7. Web server: Apache/2.2.22 (Debian) Database: mysql Ver 14.14 Distrib 5.5.40, for debian-linux-gnu (x86_64) using readline 6.2 PHP version: PHP 5.4.35-0+deb7u2 (cli) (built: Nov 19 2014 ownCloud version: (see ownCloud admin page) ownCloud 7.0.4 (stable) Updated from an older ownCloud or fresh install: updated from 7.0.1, 7.0.2, 7.0.3 List of activated apps: Files Activity Documents Pictures Calendar Contact The content of config/config.php:

<?php
$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'trusted_domains' => 
  array (
    0 => 'owncloud.alchem-it.com',
  ),
  'datadirectory' => '/var/www/owncloud/data',
  'dbtype' => 'sqlite3',
  'version' => '7.0.4.2',
  'installed' => true,
  'forcessl' => true,
  'theme' => '',
  'maintenance' => false,
  'mail_from_address' => 'owncloud',
  'mail_smtpmode' => 'php',
  'mail_domain' => '',
  'secret' => '',
);

Are you using external storage, if yes which one: local/smb/sftp/... No Are you using encryption: yes/no Yes

Client configuration

Browser: Firefox Operating system: Ubuntu 14.10

Logs

Web server error log

[Tue Dec 09 21:54:52 2014] [error] [client xxx.xxx.xxx.xxx] Negotiation: discovered file(s) matching request: /var/www/owncloud/settings/admin (None could be negotiated)., referer: https://owncloud.alchem-it.com/index.php/apps/files/
[Tue Dec 09 21:54:53 2014] [error] [client yyy.y.y.y] client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt
[Tue Dec 09 21:55:05 2014] [error] [client xxx.xxx.xxx.xxx] Negotiation: discovered file(s) matching request: /var/www/owncloud/settings/ajax/checksetup (None could be negotiated)., referer: https://owncloud.alchem-it.com/index.php/settings/admin

ownCloud log (data/owncloud.log)

{"app":"core","message":"App \"music\" is using a not allowed call \"OC_Helper::\". Installation refused.","level":3,"time":"2014-09-03T03:06:52+00:00"}
{"app":"core","message":"App can't be installed because of not allowed code in the App","level":3,"time":"2014-09-03T03:06:52+00:00"}
{"app":"PHP","message":"Call to a member function getOwner() on a non-object at \/var\/www\/owncloud\/lib\/private\/files\/filesystem.php#786","level":3,"time":"2014-10-22T13:25:54+00:00"}
{"app":"documents","message":"Pure configuration issue. Missing open office binary that is mandatory for conversion.","level":2,"time":"2014-10-22T13:32:13+00:00"}
{"app":"core","message":"Login failed: 'admin' (Remote IP: '88.175.80.136', X-Forwarded-For: '')","level":2,"time":"2014-11-14T08:58:56+00:00"}
{"app":"core","message":"Login failed: 'julien' (Remote IP: '88.175.80.136', X-Forwarded-For: '')","level":2,"time":"2014-11-14T08:59:09+00:00"}
{"app":"webdav","message":"Sabre\\DAV\\Exception\\BadRequest: expected filesize 3323575 got 1114112","level":4,"time":"2014-11-14T16:14:59+00:00"}
{"app":"webdav","message":"Sabre\\DAV\\Exception\\BadRequest: expected filesize 4585102 got 3211264","level":4,"time":"2014-11-14T16:15:00+00:00"}
{"app":"webdav","message":"Sabre\\DAV\\Exception\\BadRequest: expected filesize 6452685 got 4374528","level":4,"time":"2014-11-14T16:15:00+00:00"}
{"app":"PHP","message":"Declaration of OCA\\TemplateEditor\\Controller\\AdminSettingsController::render() should be compatible with OCP\\AppFramework\\Controller::render($templateName, array $params = Array, $renderAs = 'user', array $headers = Array) at \/var\/www\/owncloud\/apps\/templateeditor\/controller\/adminsettingscontroller.php#31","level":3,"time":"2014-11-14T17:02:59+00:00"}
{"app":"search_lucene","message":"Cross-reference streams are not supported yet. Trace:\\n#0 \/var\/www\/owncloud\/apps\/search_lucene\/3rdparty\/Zend\/Pdf\/Parser.php(460): Zend_Pdf_Parser->_loadXRefTable('1852997')\n#1 \/var\/www\/owncloud\/apps\/search_lucene\/3rdparty\/Zend\/Pdf.php(318): Zend_Pdf_Parser->__construct('%PDF-1.5\\n%\\xD0\\xD4\\xC5\\xD8\\n...', Object(Zend_Pdf_ElementFactory_Proxy), false)\n#2 \/var\/www\/owncloud\/apps\/search_lucene\/3rdparty\/Zend\/Pdf.php(255): Zend_Pdf->__construct('%PDF-1.5\\n%\\xD0\\xD4\\xC5\\xD8\\n...', NULL)\n#3 \/var\/www\/owncloud\/apps\/search_lucene\/document\/Pdf.php(21): Zend_Pdf::parse('%PDF-1.5\\n%\\xD0\\xD4\\xC5\\xD8\\n...')\n#4 \/var\/www\/owncloud\/apps\/search_lucene\/document\/Pdf.php(69): OCA\\Search_Lucene\\Document\\Pdf->__construct('%PDF-1.5\\n%\\xD0\\xD4\\xC5\\xD8\\n...', false, false)\n#5 \/var\/www\/owncloud\/apps\/search_lucene\/lib\/indexer.php(94): OCA\\Search_Lucene\\Document\\Pdf::loadPdf('%PDF-1.5\\n%\\xD0\\xD4\\xC5\\xD8\\n...')\n#6 \/var\/www\/owncloud\/apps\/search_lucene\/ajax\/lucene.php(44): OCA\\Search_Lucene\\Indexer::indexFile('\/ownCloudUserMa...', 'julien')\n#7 \/var\/www\/owncloud\/apps\/search_lucene\/ajax\/lucene.php(76): index()\n#8 \/var\/www\/owncloud\/lib\/base.php(796): require_once('\/var\/www\/ownclo...')\n#9 [internal function]: OC::loadAppScriptFile(Array)\n#10 \/var\/www\/owncloud\/lib\/private\/route\/router.php(227): call_user_func(Array, Array)\n#11 \/var\/www\/owncloud\/lib\/base.php(704): OC\\Route\\Router->match('\/apps\/search_lu...')\n#12 \/var\/www\/owncloud\/index.php(28): OC::handleRequest()\n#13 {main}","level":3,"time":"2014-11-14T17:04:39+00:00"}
{"app":"search_lucene","message":"need mimetype for content extraction","level":3,"time":"2014-11-14T17:04:43+00:00"}
{"app":"documents","message":"Pure configuration issue. Missing open office binary that is mandatory for conversion.","level":2,"time":"2014-11-21T16:47:12+00:00"}
{"app":"PHP","message":"Array to string conversion at \/var\/www\/owncloud\/lib\/private\/l10n\/string.php#57","level":3,"time":"2014-11-21T17:51:13+00:00"}
{"app":"webdav","message":"Sabre\\DAV\\Exception\\BadRequest: expected filesize 20971520 got 15122432","level":4,"time":"2014-11-27T06:18:31+00:00"}

jmary avatar Dec 10 '14 03:12 jmary

The filesize problem reminds me of that caching issue https://github.com/owncloud/core/pull/9453

oparoz avatar Dec 11 '14 01:12 oparoz

I've tested with ownCloud 7.0.4 and SyncClient 1.6.3. And it works for me.

dttpy avatar Dec 11 '14 14:12 dttpy

@lmaestro could you verify this with 1.7.1 beta? Thanks!

dragotin avatar Dec 11 '14 14:12 dragotin

Tested with ownCloud 7.0.4 and SyncClient 1.7.0. Also works for me

dttpy avatar Dec 11 '14 15:12 dttpy

I just observed the same buggy behaviour using owncloud 7.0.4 (linux host) and client 1.7.0 (build 4162) on windows. In the log window the etag-query returns the same values (indicating nothing has changed) when users 2 has already added a file to a shared folder. The Server should indicate that a sync is necessary instead.

12-13 23:36:24:388 0x1a7e988 folder.cpp:319 * Compare etag with previous etag: last: ""548cbebb392aa""5488c2bd0772b""54254d42d1299""53d7f344b4876""53f519bb05896""5436bee12e2ae""548cbebb39c45""5489dd034a6fa""548c7001ead1e""548cb8374874d"" , received: ""548cbebb392aa""5488c2bd0772b""54254d42d1299""53d7f344b4876""53f519bb05896""5436bee12e2ae""548cbebb39c45""5489dd034a6fa""548c7001ead1e""548cb8374874d""

After user1 (owner of the folder) has added a file:

12-13 23:37:24:430 0x1a7e988 folder.cpp:319 * Compare etag with previous etag: last: ""548cbebb392aa""5488c2bd0772b""54254d42d1299""53d7f344b4876""53f519bb05896""5436bee12e2ae""548cbebb39c45""5489dd034a6fa""548c7001ead1e""548cb8374874d"" , received: ""548cbfa4ab548""5488c2bd0772b""54254d42d1299""53d7f344b4876""53f519bb05896""5436bee12e2ae""548cbfa4ac6a5""5489dd034a6fa""548c7001ead1e""548cb8374874d""

(has changed etags)

Faldrian avatar Dec 13 '14 22:12 Faldrian

@Faldrian can you confirm that you are using the same steps as @jmary ? I suspect that the steps might not be 100% accurate which is why we aren't able to reproduce the issue locally.

Can you also post your owncloud.log so we can find out what @jmary and you have in common ? (maybe similar errors)

PVince81 avatar Dec 15 '14 10:12 PVince81

What is primordial in my process is to add the file through the web interface and not through the filesystem.

jmary avatar Dec 15 '14 10:12 jmary

I did this without groups, so the number of assets involved is minimized:

  • User A is my user with owncloud-client 1.7.* running. Admin user.
  • User B is another user, no special group or anything

Test 1 (this works as expected):

  • User B created a Folder (/sharetest), shares "sharetest" with User A
  • User B changes files via webinterface in there, User A gets synced via owncloud-client
  • User A changes files via webinterface, User A gets synced via owncloud-client

Test 2 (this also works as expected):

  • User A created a Folder (/sharetest), shares "sharetest" with User B
  • User B changes files via webinterface in there, User A gets synced via owncloud-client
  • User A changes files via webinterface, User A gets synced via owncloud-client

Test 3 (this has the bug!):

  • User A created a Folder (/komplexer/ordner/mit/viel/verschachtelung), shares "verschachtelung" with User B
  • User B changes files via webinterface in there, User A is not synced

Faldrian avatar Dec 15 '14 17:12 Faldrian

Etag propagation has be reworked in 8.1 for shared storage (https://github.com/owncloud/core/pull/14764), this should work in that version.

PVince81 avatar Aug 03 '15 09:08 PVince81