Skip to content

Deleting a shared file is not possible #3010

Closed

Description

@Octopus2

client 1 8 0

Expected behaviour

Deleting a shared file is possible

Actual behaviour

Deleting a shared file is not possible (Gives the error: "The read-only file was restored" - see picture)
I didn´t have the problem with OC 7.0.4 and client 1.7.1. It startet after the upgrade to OC 8.0.2 and client 1.8.0

Steps to reproduce

  1. Create a folder and share it to a group of about 25 people
  2. Give full access to this folder (read, write, delete,...)
  3. Deleting the file as the owner of the file works with the client
  4. Deleting the file as a shared user doesnt´t work. File get´s restored

Server configuration

Web server: Apache/2.2.17 (Linux/SUSE)

Database: MySQL 5.1.63

PHP version: 5.4.16 (CGI/FastCGI)

ownCloud version: 8.0.2

Updated from an older ownCloud or fresh install: startet with 6.0.0

List of activated app:

  • Activity
  • Deleted files
  • Share Files
  • Text Editor
  • Updater
  • Versions

The content of config/config.php: (Without the database password and passwordsalt)

'datadirectory' => '/srv/www/htdocs/web3/html/owncloud/data',

'dbtype' => 'mysql',

'version' => '8.0.2.0',

'dbhost' => 'localhost',

'dbtableprefix' => 'oc_',

'installed' => true,

'loglevel' => '3',

'log_rotate_size' => 1048576,

'theme' => 'rabacloud',

'maintenance' => false,

'singleuser' => false,

'trusted_domains' => 
  array (
    0 => 'www.rabauki.de',
  ),

'share_folder' => '/Shared',

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

Client configuration

Browser: Firefox 36.0.4

Operating system: Win 7 (x32) - German

Client: 1.8.0

Installation path of client: C:\Program Files\ownCloud

Logs

  1. Output of owncloud --logwindow or owncloud --logfile log.txt
Line 6029: 03-23 23:26:23:828 0x5201580 OCC::SocketApi::command_RETRIEVE_FILE_STATUS: void OCC::SocketApi::command_RETRIEVE_FILE_STATUS(const QString&, OCC::SocketType*) "D:\Eigene Dateien\Eigene Dokumente\RaBaCloud\Shared\RaBauKi-Netzlaufwerk\Aktuelle RaBaCloud-Software\TEST-ownCloud-1.8.0.4847-setup.zip"
Line 6030: 03-23 23:26:23:828 0x5201580 OCC::SocketApi::sendMessage: SocketApi:  Sending message:  "STATUS:OK+SWM:D:\Eigene Dateien\Eigene Dokumente\RaBaCloud\Shared\RaBauKi-Netzlaufwerk\Aktuelle RaBaCloud-Software\TEST-ownCloud-1.8.0.4847-setup.zip"
Line 6220: 03-23 23:26:24:296 0x5201580 OCC::SocketApi::command_RETRIEVE_FILE_STATUS: void OCC::SocketApi::command_RETRIEVE_FILE_STATUS(const QString&, OCC::SocketType*) "D:\Eigene Dateien\Eigene Dokumente\RaBaCloud\Shared\RaBauKi-Netzlaufwerk\Aktuelle RaBaCloud-Software\TEST-ownCloud-1.8.0.4847-setup.zip"
Line 6221: 03-23 23:26:24:296 0x5201580 OCC::SocketApi::sendMessage: SocketApi:  Sending message:  "STATUS:OK+SWM:D:\Eigene Dateien\Eigene Dokumente\RaBaCloud\Shared\RaBauKi-Netzlaufwerk\Aktuelle RaBaCloud-Software\TEST-ownCloud-1.8.0.4847-setup.zip"
Line 7060: 03-23 23:26:25:357 0x5201580 _csync_merge_algorithm_visitor: INSTRUCTION_NONE     file: Shared/RaBauKi-Netzlaufwerk/Aktuelle RaBaCloud-Software/TEST-ownCloud-1.8.0.4847-setup.zip
Line 13577: 03-23 23:26:38:975 0x5201580 _csync_merge_algorithm_visitor: INSTRUCTION_NONE     file: Shared/RaBauKi-Netzlaufwerk/Aktuelle RaBaCloud-Software/TEST-ownCloud-1.8.0.4847-setup.zip
Line 19622: 03-23 23:26:54:639 0x5201580 OCC::SocketApi::command_RETRIEVE_FILE_STATUS: void OCC::SocketApi::command_RETRIEVE_FILE_STATUS(const QString&, OCC::SocketType*) "D:\Eigene Dateien\Eigene Dokumente\RaBaCloud\Shared\RaBauKi-Netzlaufwerk\Aktuelle RaBaCloud-Software\TEST-ownCloud-1.8.0.4847-setup.zip"
Line 19623: 03-23 23:26:54:642 0x5201580 OCC::SocketApi::sendMessage: SocketApi:  Sending message:  "STATUS:OK+SWM:D:\Eigene Dateien\Eigene Dokumente\RaBaCloud\Shared\RaBauKi-Netzlaufwerk\Aktuelle RaBaCloud-Software\TEST-ownCloud-1.8.0.4847-setup.zip"
Line 19803: 03-23 23:26:55:310 0x5201580 OCC::SocketApi::command_RETRIEVE_FILE_STATUS: void OCC::SocketApi::command_RETRIEVE_FILE_STATUS(const QString&, OCC::SocketType*) "D:\Eigene Dateien\Eigene Dokumente\RaBaCloud\Shared\RaBauKi-Netzlaufwerk\Aktuelle RaBaCloud-Software\TEST-ownCloud-1.8.0.4847-setup.zip"
Line 19804: 03-23 23:26:55:312 0x5201580 OCC::SocketApi::sendMessage: SocketApi:  Sending message:  "STATUS:OK+SWM:D:\Eigene Dateien\Eigene Dokumente\RaBaCloud\Shared\RaBauKi-Netzlaufwerk\Aktuelle RaBaCloud-Software\TEST-ownCloud-1.8.0.4847-setup.zip"
  1. Web server error log:
    nothing relevant

  2. ownCloud log (data/owncloud.log):

    {"reqId":"a9d10e90088e213dedf5e95f137a3543","remoteAddr":"84.164.85.175","app":"PHP","message":"Undefined variable: content at \/srv\/www\/htdocs\/web3\/html\/owncloud\/lib\/private\/files\/view.php#1136","level":3,"time":"2015-03-23T22:19:36+00:00"}
    {"reqId":"53e7b0736790edab2bf80c8898ac52f0","remoteAddr":"91.48.248.33","app":"webdav","message":"Exception: {\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/srv\\\/www\\\/htdocs\\\/web3\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/Sabre\\\/DAV\\\/Tree.php(102): OC_Connector_Sabre_File->delete()\\n#1 \\\/srv\\\/www\\\/htdocs\\\/web3\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/Sabre\\\/DAV\\\/Server.php(691): Sabre\\\\DAV\\\\Tree->delete('Shared\\\/RaBauKi-...')\\n#2 [internal function]: Sabre\\\\DAV\\\\Server->httpDelete('Shared\\\/RaBauKi-...')\\n#3 \\\/srv\\\/www\\\/htdocs\\\/web3\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/Sabre\\\/DAV\\\/Server.php(474): call_user_func(Array, 'Shared\\\/RaBauKi-...')\\n#4 \\\/srv\\\/www\\\/htdocs\\\/web3\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/Sabre\\\/DAV\\\/Server.php(214): Sabre\\\\DAV\\\\Server->invokeMethod('DELETE', 'Shared\\\/RaBauKi-...')\\n#5 \\\/srv\\\/www\\\/htdocs\\\/web3\\\/html\\\/owncloud\\\/apps\\\/files\\\/appinfo\\\/remote.php(61): Sabre\\\\DAV\\\\Server->exec()\\n#6 \\\/srv\\\/www\\\/htdocs\\\/web3\\\/html\\\/owncloud\\\/remote.php(54): require_once('\\\/srv\\\/www\\\/htdocs...')\\n#7 {main}\",\"File\":\"\\\/srv\\\/www\\\/htdocs\\\/web3\\\/html\\\/owncloud\\\/lib\\\/private\\\/connector\\\/sabre\\\/file.php\",\"Line\":202}","level":4,"time":"2015-03-23T22:20:17+00:00"}
    {"reqId":"724714cafb73d19216e576af3911b3dc","remoteAddr":"80.142.78.187","app":"PHP","message":"Undefined variable: content at \/srv\/www\/htdocs\/web3\/html\/owncloud\/lib\/private\/files\/view.php#1136","level":3,"time":"2015-03-23T22:20:34+00:00"}
    {"reqId":"cedcb5d17082fe29b93d5d5bd9c1b8a8","remoteAddr":"178.1.32.108","app":"PHP","message":"Undefined variable: content at \/srv\/www\/htdocs\/web3\/html\/owncloud\/lib\/private\/files\/view.php#1136","level":3,"time":"2015-03-23T22:20:53+00:00"}
    {"reqId":"287b1957cd56bd08727481aa82521ffc","remoteAddr":"84.164.85.175","app":"PHP","message":"Undefined variable: content at \/srv\/www\/htdocs\/web3\/html\/owncloud\/lib\/private\/files\/view.php#1136","level":3,"time":"2015-03-23T22:21:07+00:00"}
    {"reqId":"6bf493ff28a76441187e978ae8ea6817","remoteAddr":"91.48.248.33","app":"PHP","message":"Undefined variable: content at \/srv\/www\/htdocs\/web3\/html\/owncloud\/lib\/private\/files\/view.php#1136","level":3,"time":"2015-03-23T22:21:45+00:00"}
    {"reqId":"e468699240b0069d18691be7b2988141","remoteAddr":"84.164.85.175","app":"PHP","message":"Undefined variable: content at \/srv\/www\/htdocs\/web3\/html\/owncloud\/lib\/private\/files\/view.php#1136","level":3,"time":"2015-03-23T22:26:36+00:00"}
    

    oc8 0 2

Activity

  1. ogoffart commented on Mar 24, 2015

    @ogoffart
    Contributor

    This works well here.
    It would be interesting to know what the server gives as permission for that file.
    Search for one of those two lines in the log containing the file name and the premission, such as:

    9:42:42.973 OCC::SyncJournalDb::setFileRecord: "INSERT OR REPLACE INTO metadata (phash, pathlen, path, inode, uid, gid, mode, modtime, type, md5, fileid, remotePerm, filesize) VALUES (?1 , ?2, ?3 , ?4 , ?5 , ?6 , ?7,  ?8 , ?9 , ?10, ?11, ?12, ?13);" -8781665174566193081 7 "sharing" 15348917 0 "1427186515" "2" "551123530e8fb" "00004410ocece2c41de3" "SRDNVCK" 0
    

    Or

    03-24 09:42:42:582 0x11a6b68 _csync_detect_update: Database entry found, compare: 1427186515 <-> 1427186463, etag: 551123530e8fb <-> 5511231fde3ad, inode: 0 <-> 15348917, size: 0 <-> 0, perms: SRDNVCK <-> SRDNVCK
    

    Here SRDNVCK is the permission (D stands for "can delete")

  2. Octopus2 commented on Mar 24, 2015

    @Octopus2
    Author

    I can´t find this special file in the log but all other files in this filder look like this:

    Line 5962: 03-23 23:25:40:659 0xa9fb80c _csync_detect_update: Database entry found, compare: 1313952600 <-> 1313952600, etag: 5379521902dfb <-> 5379521902dfb, inode: 57592 <-> 57592, size: 517095 <-> 0, perms:  <-> SDNVW
        Line 5963: 03-23 23:25:40:659 0xa9fb80c _csync_detect_update: file: Shared/RaBauKi-Netzlaufwerk/Zeitung/2011/xxxx.pdf, instruction: INSTRUCTION_NONE <<=
    

    They have SDNVW....

    Should I create a new log file?

  3. Octopus2 commented on Mar 31, 2015

    @Octopus2
    Author

    @ogoffart I tried again to generate a new logfile. Again nothing special about this file. About your example i could find:

    03-31 21:51:03:741 0x50a1580 OCC::SyncJournalDb::setFileRecord: "INSERT OR REPLACE INTO metadata (phash, pathlen, path, inode, uid, gid, mode, modtime, type, md5, fileid, remotePerm, filesize) VALUES (?1 , ?2, ?3 , ?4 , ?5 , ?6 , ?7,  ?8 , ?9 , ?10, ?11, ?12, ?13);" 7772379496350463016 6 "Shared" 10781 0 "1426626728" "2" "551af90e07f2b" "00010794oce74f032cb1" "DNVCK" 0
    

    Server-Log shows now

    {"reqId":"dde94b867b37580eab33b67e6432448e","remoteAddr":"91.48.244.165","app":"webdav","message":"Exception: {\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/srv\\\/www\\\/htdocs\\\/web3\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/Sabre\\\/DAV\\\/Tree.php(102): OC_Connector_Sabre_File->delete()\\n#1 \\\/srv\\\/www\\\/htdocs\\\/web3\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/Sabre\\\/DAV\\\/Server.php(691): Sabre\\\\DAV\\\\Tree->delete('Shared\\\/RaBauKi-...')\\n#2 [internal function]: Sabre\\\\DAV\\\\Server->httpDelete('Shared\\\/RaBauKi-...')\\n#3 \\\/srv\\\/www\\\/htdocs\\\/web3\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/Sabre\\\/DAV\\\/Server.php(474): call_user_func(Array, 'Shared\\\/RaBauKi-...')\\n#4 \\\/srv\\\/www\\\/htdocs\\\/web3\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/Sabre\\\/DAV\\\/Server.php(214): Sabre\\\\DAV\\\\Server->invokeMethod('DELETE', 'Shared\\\/RaBauKi-...')\\n#5 \\\/srv\\\/www\\\/htdocs\\\/web3\\\/html\\\/owncloud\\\/apps\\\/files\\\/appinfo\\\/remote.php(61): Sabre\\\\DAV\\\\Server->exec()\\n#6 \\\/srv\\\/www\\\/htdocs\\\/web3\\\/html\\\/owncloud\\\/remote.php(54): require_once('\\\/srv\\\/www\\\/htdocs...')\\n#7 {main}\",\"File\":\"\\\/srv\\\/www\\\/htdocs\\\/web3\\\/html\\\/owncloud\\\/lib\\\/private\\\/connector\\\/sabre\\\/file.php\",\"Line\":202}","level":4,"time":"2015-03-31T19:44:14+00:00"}
    {"reqId":"70d679bda4e5deb10f2288c0f7852492","remoteAddr":"87.159.111.157","app":"PHP","message":"Undefined variable: content at \/srv\/www\/htdocs\/web3\/html\/owncloud\/lib\/private\/files\/view.php#1136","level":3,"time":"2015-03-31T19:44:24+00:00"}
    {"reqId":"80c0cfe7be150668fd0719e81d9e90fc","remoteAddr":"84.63.74.36","app":"PHP","message":"Undefined variable: content at \/srv\/www\/htdocs\/web3\/html\/owncloud\/lib\/private\/files\/view.php#1136","level":3,"time":"2015-03-31T19:44:27+00:00"}
    {"reqId":"9da5a7f36c99417b5fad4e5be9d95fbd","remoteAddr":"91.48.244.165","app":"PHP","message":"Undefined variable: content at \/srv\/www\/htdocs\/web3\/html\/owncloud\/lib\/private\/files\/view.php#1136","level":3,"time":"2015-03-31T19:45:46+00:00"}
    

    (Full log can be provided)

    I downgraded to client-Version 1.7.1 and now get the same error!! A Shared user can´t delete a file anymore.

    So it has something to do with the server, after upgrade from 7.0.4 to 8.0.2?

  4. Ruddimaster commented on Apr 20, 2015

    @Ruddimaster

    I have the same issue also on the website.
    User A: Quota 4GB
    User B and C: Quota 0 B
    B and C has its own shared directory in User A. For each user it is possible to upload files till 4GB quota of User A is exceeded.
    But B and C can't delete files. If I changed the quota to 3MB these users are able to delete all files less this quota size.

    This issue is since 8.0.2

  5. Octopus2 commented on May 7, 2015

    @Octopus2
    Author

    @ogoffart

    I did some Tests with core 8.0.3 and Client 1.8.1 and found a way to reproduce

    User A: Quota 40 GB -> Shares Directory with user B
    User B: Quota 10 MB
    Upload a File (37 MB) to the shared folder (zip-file of the Client-Software) -> no problem in uploading for user A and B

    Delete the File:
    User A -> No problem
    User B: File get´s restored. User B is not able to delete

    Change Quota of User B to 50 MB:
    User A and B can delete without a problem

    Perhaps a Problem in core??

  6. dragotin commented on May 9, 2015

    @dragotin
    Contributor

    @Octopus2 very good catch, lets track this in the core issue.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions