Skip to content

Corrupted Microsoft Word files (docx) #3511

Closed

Description

@marlemion

Microsoft Word files cannot be opened after being uploaded to owncloud. MS Office claims that they are damaged.

Reproduce the bug: Drop the file to the server via the web interface and let it sync to the file system via the windows client or upload it directly via the windows client. Downloading directly from the web interface does also result in a corrupted docx file. So apparently ANY DOCX FILE GETS DAMAGED.

The windows client is current 1.8.4, the server 8.1. Apache is at 2.4.16, encryption is not enabled, fastcgi is not installed, no redirection, apache PHP at 5.6. The log file does not show any error message.

<?php
$CONFIG = array (
'instanceid' => '#####',
'passwordsalt' => '#####',
'trusted_domains' =>
array (
0 => '#####',
),
'overwrite.cli.url' => '/owncloud',
'datadirectory' => '/var/www/localhost/htdocs/owncloud/data',
'dbtype' => 'mysql',
'version' => '8.1.0.8',
'dbname' => '#####',
'dbhost' => '#####',
'dbtableprefix' => 'oc_',
'dbuser' => '#####',
'dbpassword' => '#####',
'installed' => true,
'theme' => '',
'maintenance' => false,
'secret' => '#####',
'loglevel' => 0,
);

This is crucial. I already messed up some of my work due to this bug.

Activity

  1. added this to the 2.0 - Multi-account milestone on Jul 28, 2015
  2. guruz commented on Jul 28, 2015

    @guruz
    Contributor

    Can you upload a sample (correct) file somewhere that can be used for reproducing?

  3. added
    p2-high
    on Jul 28, 2015
  4. Dianafg76 commented on Jul 30, 2015

    @Dianafg76

    I tried this , and does it well , I can open the .docx file. And if I believe in a .zip several .docx I can see them with no problem.

    Desktop v ownCloud-2.0.0.5308-nightly20150729-setup.exe, In WIN
    Server v {"installed":true,"maintenance":false,"version":"8.1.0.8","versionstring":"8.1 RC2","edition":"Enterprise"}
    Desktop v ownCloud-2.0.0.2576-nightly20150730.pkg

  5. removed
    p2-high
    on Aug 1, 2015
  6. danimo commented on Aug 1, 2015

    @danimo
    Contributor

    @marlemion This is a problem with your local setup then, not a client bug anyway. Something seems to recompress zip files. Which apps are installed on your owncloud server?

  7. danimo commented on Aug 1, 2015

    @danimo
    Contributor

    @marlemion Also, if you upload zip files the same way, are they still identical? (same size/hash)

  8. marlemion commented on Aug 3, 2015

    @marlemion
    Author

    Apps are pretty much standard: files, activities, calendar, contacts, images

    It happens to any zipped MS office file. But I can assure you that it also affects xlsx files. Just messed up a very important Excel file right now. Versioning back does not help. It used to work beforehand. So I could work on already uploaded files without any problem. But if I upload them or change the version, it corrupts the zip container.

    Normal zip files work.

    md5sum is different after upload as is the size (it is bigger).

  9. danimo commented on Aug 3, 2015

    @danimo
    Contributor

    @marlemion Normal zip files work. Yes, they may work, but are they also different (hash-wise)?

  10. danimo commented on Aug 3, 2015

    @danimo
    Contributor

    @DeepDiver1975 @MorrisJobke any idea how to debug what repacks the file?

  11. marlemion commented on Aug 3, 2015

    @marlemion
    Author

    Normal zip files remain original, i.e. no change in md5sums.

  12. guruz commented on Aug 3, 2015

    @guruz
    Contributor

    Any virus scanners or other security solutions running locally?

    Are you syncing through a proxy?

    Drop the file to the server via the web interface and let it sync to the file system via the windows client or upload it directly via the windows client. Downloading directly from the web interface does also result in a corrupted docx file.

    So also docx files uploaded via web and then downloaded via web (no sync client involved) has this issue?

  13. marlemion commented on Aug 3, 2015

    @marlemion
    Author

    No virus scanners.

    No proxy (it runs on apache in the directory "owncloud" behind a router, which forwards the port).

    Yes, the corruption also appears when uploading via the web client (just retested a minute ago).

  14. 1 remaining item

  15. marlemion commented on Aug 3, 2015

    @marlemion
    Author

    I have the same problem from my Windows PC (at work) and my linux PC (at home).

    apache2ctl modules:

    Loaded Modules:
     core_module (static)
     so_module (static)
     http_module (static)
     mpm_event_module (static)
     access_compat_module (shared)
     actions_module (shared)
     alias_module (shared)
     auth_basic_module (shared)
     authn_anon_module (shared)
     authn_core_module (shared)
     authn_dbm_module (shared)
     authn_file_module (shared)
     authz_core_module (shared)
     authz_dbm_module (shared)
     authz_groupfile_module (shared)
     authz_host_module (shared)
     authz_owner_module (shared)
     authz_user_module (shared)
     autoindex_module (shared)
     cgi_module (shared)
     cgid_module (shared)
     deflate_module (shared)
     dir_module (shared)
     env_module (shared)
     expires_module (shared)
     ext_filter_module (shared)
     filter_module (shared)
     headers_module (shared)
     include_module (shared)
     info_module (shared)
     log_config_module (shared)
     logio_module (shared)
     mime_module (shared)
     mime_magic_module (shared)
     negotiation_module (shared)
     proxy_module (shared)
     proxy_http_module (shared)
     rewrite_module (shared)
     setenvif_module (shared)
     socache_shmcb_module (shared)
     speling_module (shared)
     ssl_module (shared)
     unique_id_module (shared)
     unixd_module (shared)
     usertrack_module (shared)
     vhost_alias_module (shared)
     proxy_html_module (shared)
     xml2enc_module (shared)
     php5_module (shared)
    
  16. removed this from the 2.0 - Multi-account milestone on Aug 3, 2015
  17. self-assigned this
    on Aug 3, 2015
  18. marlemion commented on Aug 3, 2015

    @marlemion
    Author

    Well, I do proxy something through that server, but not owncloud. Shall I disable ext_filter and try again? (right now I can't remember why I enabled it)

  19. guruz commented on Aug 3, 2015

    @guruz
    Contributor

    Both modules look like they can rewrite things passed through, so who knows.. yes :)

  20. marlemion commented on Aug 3, 2015

    @marlemion
    Author

    Nope. Same problem. Btw. the ext_filter module is enabled by default in the gentoo configuration.

  21. guruz commented on Aug 3, 2015

    @guruz
    Contributor

    Check your other modules.. ? Check if you really disabled the modules?

    Use a binary diff tool to compsare the correct file vs the corrupt file, maybe there is a (plaintext) clue..

  22. marlemion commented on Aug 3, 2015

    @marlemion
    Author

    What would be a certified module constellation to be working with owncloud? I don't have the time to disable each module.

    I will compare the files when I am back home at my Linux PC.

  23. guruz commented on Aug 3, 2015

    @guruz
    Contributor

    Would first need to see if it is really the modules, but that's my only guess now..

    In general if it is a module, then it is probably because it modified the file.

    Maybe it's not a module.

    don't ask me about certified though ;) https://owncloud.com/owncloud-server-or-enterprise-edition/

  24. marlemion commented on Aug 5, 2015

    @marlemion
    Author

    Ok, some progress. I started owncloud with a very simplistic module environment of apache:

    apache2ctl modules
    Loaded Modules:
     core_module (static)
     so_module (static)
     http_module (static)
     mpm_event_module (static)
     access_compat_module (shared)
     auth_basic_module (shared)
     authz_core_module (shared)
     authz_host_module (shared)
     dir_module (shared)
     mime_module (shared)
     negotiation_module (shared)
     socache_shmcb_module (shared)
     ssl_module (shared)
     unixd_module (shared)
     proxy_html_module (shared)
     xml2enc_module (shared)
     php5_module (shared)
    

    Now it works. So I have to find the module, which is responsible for the rewrite. :(

  25. guruz commented on Aug 5, 2015

    @guruz
    Contributor

    @marlemion Great! Good luck and comment here if you found out...

    @dragotin @moscicki @DeepDiver1975 ...something which would have been prevented by transfer checksums FYI #2542

  26. marlemion commented on Aug 5, 2015

    @marlemion
    Author

    Ok, I narrowed it down. It wasn't any module, but rather a virtual host, which is a redirection from my XBMC/KODI control web interface to my outer url/xbmc:

    # -*- apache -*-
    
    Servername servername
    ProxyPreserveHost On
    
    <Location /xbmc>
            ProxyPass http://ipadress:8081/xbmc
            ProxyPassReverse http://ipadress:8081/xbmc
    </Location>
    
    <Location /xbmc/jsonrpc>
            ProxyPass http://ipadress:8081/jsonrpc
            ProxyPassReverse http://ipadress:8081/jsonrpc
    </Location>
    
    SetOutputFilter INFLATE;proxy-html;DEFLATE
    
    ProxyHTMLEnable On
    
    ProxyHTMLDocType "<!DOCTYPE html>"
    
    # these directives need to be duplicated since we're in a
    # different scope. We actually only want to add "img data-src"
    ProxyHTMLLinks  a       href
    ProxyHTMLLinks  area    href
    ProxyHTMLLinks  link    href
    ProxyHTMLLinks  img     src longdesc usemap data-src
    ProxyHTMLLinks  object  classid codebase data usemap
    ProxyHTMLLinks  q       cite
    ProxyHTMLLinks  blockquote      cite
    ProxyHTMLLinks  ins     cite
    ProxyHTMLLinks  del     cite
    ProxyHTMLLinks  form    action
    ProxyHTMLLinks  input   src usemap
    ProxyHTMLLinks  head    profile
    ProxyHTMLLinks  base    href
    ProxyHTMLLinks  script  src for
    
    # finally, rewrite URLs
    ProxyHTMLURLMap http://ipadress:8081/xbmc /xbmc
    

    I have disabled it so far. Maybe this is of any help for you. Thanks a lot. I was able to recover my lost data thanks to the versioning feature. :) Apparently, I copied the file from some forum, so I don't have any clue what it does.

  27. daxprather commented on Oct 8, 2015

    @daxprather

    Had same data corruption problem with MS Word files. Completely removing recently installed Kodi from client to see if problem fixed.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions