core icon indicating copy to clipboard operation
core copied to clipboard

Files Deleted From Server on Rename via Client or Web UI

Open razyr opened this issue 11 years ago • 6 comments

Steps to reproduce

  1. Rename a file from /InstantUpload/20150508_150140.jpg to /InstantUpload/house.jpg

Was able to reproduce this using the 1.8.1 OSX desktop client, the 1.7.1 Android client and the server web interface using both the latest version of FireFox and Chrome.

Expected behaviour

The file should be renamed and present.

Actual behaviour

The file is renamed on the local client, syncs then is deleted immediately after the sync. The file is gone on the local device, the server and other remote devices.

When renaming from the OC web interface with both Firefox and Chrome, the sync symbols stayed on screen indefinitely and I had to manually refresh the page to get an update. Before the manual refresh, the file disappeared from both the Android and Mac desktop clients which have access to the OwnCloud folder. After the manual refresh, the files are gone in the web interface view as well.

Server configuration

Operating system: CentOS 7.1.1503 (Core) Web server: Apache 2.4.6 Database: MariaDB 5.5.41 PHP version: 5.4.16 ownCloud version: 8.0.3-12 Updated from an older ownCloud or fresh install: Incrementally updated from 8.0 -> 8.0.1 -> 8.0.2 -> 8.0.3

List of activated apps:

Activity 1.2.0 Calendar 0.6.4 Contact 0.3.018 Deleted Fiels 0.6.2 External Storage Support 0.2.3 File Locking First Run Wizard 1.1 LDAP user and group backend 0.5.0 Mail Template Editor 0.1 PDF Viewer 0.7 Share Files 0.6.1 Text Editor 0.4 Updater 0.4 Version 1.0.5 Video Viewer 0.1.3

The content of config/config.php:

<?php
$CONFIG = array (
  'instanceid' => 'oc537817c746',
  'passwordsalt' => 'mysalt',
  'theme' => 'mytheme',
  'trusted_domains' =>
  array (
    0 => 'server.name.com',
  ),
  'datadirectory' => '/var/www/html/owncloud/data',
  'dbtype' => 'mysql',
  'version' => '8.0.3.4',
  'dbname' => 'mydatabase',
  'dbhost' => '127.0.0.1',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'mydbuser',
  'dbpassword' => 'mydbpasswd',
  'installed' => true,
  'forcessl' => true,
  'mail_from_address' => 'noreply',
  'mail_smtpmode' => 'php',
  'mail_domain' => 'name.com',
  'objectstore' =>
  array (
    'class' => 'OC\\Files\\ObjectStore\\Swift',
    'arguments' =>
    array (
      'username' => 'swiftusername',
      'password' => 'swiftpasswd',
      'container' => 'swiftcontainer',
      'autocreate' => true,
      'region' => 'swiftregion',
      'url' => 'swiftauthurl',
      'tenantName' => 'mytenantname',
      'serviceName' => 'swift',
    ),
  ),
  'loglevel' => '2',
  'log_type' => 'syslog',
  'logtimezone' => 'America/Toronto',
  'ldapIgnoreNamingRules' => false,
  'maintenance' => false,
  'secret' => 'mysecret',
);

Are you using external storage, if yes which one: Swift

Are you using encryption: No

Are you using an external user-backend, if yes which one: LDAP

Client configuration

Browser: FireFox 37.0.2 and Chrome 42.0.2311.135

Operating system: OS X 10.10.3 (Yosemite) with all updates applied

Logs

Web server error log

Nothing in error log, but access log shows the following.

10.10.10.10 - myuser [11/May/2015:21:51:31 -0400] "MOVE /remote.php/webdav/InstantUpload/20150508_150140.jpg HTTP/1.1" 201 -
10.10.10.10 - myuser [11/May/2015:21:51:38 -0400] "PROPFIND /remote.php/webdav/ HTTP/1.1" 207 461

ownCloud log (data/owncloud.log)

Owncloud.log shows only the following when renaming from either the Android or OSX client

May 11 21:51:31 owncloud ownCloud[11057]: {sharing} No fileinfo available for: /InstantUpload/house.jpg

When renaming from the web interface it shows the above error plus the following:

May 11 22:03:26 owncloud ownCloud[10060]: {PHP} Argument 1 passed to OCA\Files\Helper::formatFileInfo() must implement interface OCP\Files\FileInfo, boolean given, called in /var/www/html/owncloud/apps/files/lib/app.php on line 108 and defined at /var/www/html/owncloud/apps/files/lib/helper.php#107```


razyr avatar May 12 '15 02:05 razyr

I should add that this is not specific to the InstantUpload directory. Attempting to rename the Example.odt file in /Documents also causes the file to be deleted.

razyr avatar May 12 '15 02:05 razyr

Just updated the server (via RPM) to OwnCloud 8.0.3-13 and the problem persists.

razyr avatar May 12 '15 12:05 razyr

Re-created a server and renaming causes problem

hoho508 avatar May 12 '15 15:05 hoho508

Potential for data loss is scary. Just tested renaming a folder. Lost everything inside it.

Going to have to send out warnings to all our users on several servers not to rename until further notice.

razyr avatar May 12 '15 15:05 razyr

I have no idea what criteria is used to determine bug priority, but given that this could wipe thousands of user files with a single, normally non-destructive action, I would think this is a critical Sev1 issue.

Especially seeing that bugs like 16295 "Apps are not listed in alphabetical order" are flagged as Sev2-High, this warrants revisiting.

@karlitschek @PVince81 ??

razyr avatar May 14 '15 17:05 razyr

A solution is being worked on here: #11804

Closing as duplicate of #13391

PVince81 avatar May 15 '15 09:05 PVince81