server icon indicating copy to clipboard operation
server copied to clipboard

Duplicated files and folders when moving from one shared folder to another (can reproduce it)

Open plrunner opened this issue 9 years ago • 57 comments

Steps to reproduce

through the web-ui:

  1. UserA creates FolderA and FolderB
  2. UserA shares FolderA and FolderB with UserB

on win7 desktop with client v2.2.4.2:

  1. UserB creates the folder FOO in FolderA
  2. UserB creates the folder BAR in FolderA/FOO
  3. Wait for the desktop client to sync these changes
  4. UserB perform a cut-paste to move FOO directly from FolderA to FolderB (moving FOO on the desktop and then into FolderB does not make the issue to occur)
  5. Wait for the desktop client to sync this change
  6. UserB creates the folder POOP in FolderB/FOO/BAR/
  7. Wait for the desktop client to sync this change

Expected behaviour

Moving content from one share to another should work smoothly

Actual behaviour

The following inconsistency has appeared on the server: through the web-ui UserB can see the BAR folder inexplicably duplicated.

Other Probable side-effects

If FolderA and FolderB is shared with several other users working on them, users keep getting the "Backup Detected" dialog asking wether to keep conflict files or to synchronize normally.

Probable related issues or discussions

https://help.nextcloud.com/t/duplicate-files-delete-not-possible/8869/7 https://github.com/nextcloud/server/issues/741

Server configuration

Operating system: Ubuntu 16.04

Web server: Apache 2.4

Database: Mysql 5.7

PHP version: v5.6

Nextcloud version: (see Nextcloud admin page) v10.0.3

Updated from an older Nextcloud/ownCloud or fresh install: updated from 10.0.0 -> ... -> 10.0.3

Where did you install Nextcloud from: official tarball

Signing status: No errors have been found.

List of activated apps: Enabled:

  • activity: 2.3.2
  • admin_audit: 1.0.0
  • comments: 1.0.0
  • dav: 1.0.1
  • federatedfilesharing: 1.0.1
  • federation: 1.0.1
  • files: 1.5.2
  • files_external: 1.0.2
  • files_pdfviewer: 0.8.1
  • files_sharing: 1.0.0
  • files_texteditor: 2.1
  • files_trashbin: 1.0.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 15.0.1
  • notifications: 0.3.0
  • password_policy: 1.0.0
  • provisioning_api: 1.0.0
  • serverinfo: 1.1.1
  • survey_client: 0.1.5
  • systemtags: 1.0.2
  • theming: 1.0.1
  • updatenotification: 1.0.1
  • workflowengine: 1.0.1 Disabled:
  • encryption
  • external
  • files_accesscontrol
  • files_automatedtagging
  • files_retention
  • files_versions
  • templateeditor
  • user_external
  • user_ldap
  • user_saml

The content of config/config.php:

{
    "system": {
        "instanceid": "ocq05beinini",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "aaa.bbb.net"
        ],
        "datadirectory": "\/var\/www\/nextcloud-data",
        "overwrite.cli.url": "http:\/\/aaa.bbb.net",
        "dbtype": "mysql",
        "version": "9.1.3.2",
        "dbname": "nextcloud",
        "dbhost": "localhost",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "loglevel": 0,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "localhost",
            "port": 6379
        },
        "maintenance": false,
        "updater.release.channel": "stable"
    }
}

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

Are you using encryption: yes/no No

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... No

Client configuration

Browser: Chrome 56

Operating system: Windows 7

plrunner avatar Feb 16 '17 08:02 plrunner

+1 Nextcloud 11.0.1

Dark-Schnitzel avatar Feb 16 '17 17:02 Dark-Schnitzel

Clearly locking related @icewind1991 see https://help.nextcloud.com/t/duplicate-files-delete-not-possible/8869/4

jospoortvliet avatar Feb 20 '17 14:02 jospoortvliet

+1 had this Problem with Nextcloud 11.0.3 as well.

mrieser avatar May 10 '17 09:05 mrieser

@icewind1991 Can you take a look? This has been reported again at https://help.nextcloud.com/t/files-and-folders-shown-twice-in-web-ui/12416

LukasReschke avatar May 10 '17 11:05 LukasReschke

will the fix be backported to 10 and 11? thanks

plrunner avatar May 18 '17 10:05 plrunner

will the fix be backported to 10 and 11?

First of all we need to fix it. But 10 is unlikely, because we plan to do a last release for 10 this month and then stop it (because two new mayor version are released and we plan to only support the last two mayor versions).

MorrisJobke avatar May 22 '17 04:05 MorrisJobke

+1 11.0.2 (stable)

vdeyak avatar May 26 '17 19:05 vdeyak

Trying again to summon @icewind1991 💯

jospoortvliet avatar May 28 '17 09:05 jospoortvliet

Maybe it is Possible to set a Timeout for unlocking? After 10 hours or so it will automatically unlock?

Same Error here on Nextcloud 11.0.3 PHP 7.0.19-1~dotdeb+8.1 Debian 8

Dark-Schnitzel avatar May 30 '17 05:05 Dark-Schnitzel

+1 Nextcloud 11.0.3 PHP 5.6.30-0+deb8u1 Debian 8

skredder avatar May 30 '17 10:05 skredder

+1 Nextcloud 12.0.0

KTim21 avatar May 30 '17 16:05 KTim21

Is this related to this Bug? https://github.com/nextcloud/server/issues/1166

Nextcloud Log: Uncaught Error: Access to undeclared static property: OC\Files\Filesystem::$normalizedPathCache in /var/www/nextcloud/lib/private/Files/Filesystem.php:806 Stack trace: #0 /var/www/nextcloud/lib/private/Files/View.php(2018): OC\Files\Filesystem::normalizePath('/Henrik/files/K...') #1 /var/www/nextcloud/lib/private/Files/View.php(1156): OC\Files\View->unlockFile('/Kunden/Uniserv...', 1) #2 [internal function]: OC\Files\View->OC\Files\{closure}() #3 /var/www/nextcloud/3rdparty/icewind/streams/src/CallbackWrapper.php(109): call_user_func(Object(Closure)) #4 [internal function]: Icewind\Streams\CallbackWrapper->stream_close() #5 {main} thrown at /var/www/nextcloud/lib/private/Files/Filesystem.php#806

Dark-Schnitzel avatar Jun 02 '17 11:06 Dark-Schnitzel

+1 Nextcloud 11.0.3

brotkiste avatar Jun 06 '17 09:06 brotkiste

+1 Nexcloud 12.0.0

rmader avatar Jun 13 '17 08:06 rmader

Summoning @icewind1991 the fourth time 🙏

LukasReschke avatar Jun 13 '17 09:06 LukasReschke

+1 Nexcloud 12.0.0

bcoory avatar Jun 14 '17 00:06 bcoory

Summoning @icewind1991 the fifth time

blizzz avatar Jun 14 '17 07:06 blizzz

In the meantime, is any workaround possible other than forbidding users to move folders from a share to another?

plrunner avatar Jun 14 '17 08:06 plrunner

+1 Nextcloud 12.0 PHP 7 bug-nextcloud

bat553 avatar Jun 14 '17 09:06 bat553

Can reproduce, looking into it

icewind1991 avatar Jun 15 '17 11:06 icewind1991