New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"XSendFile on" or php-apc optimization corrupt files uploaded #5788
Comments
http://forum.owncloud.org/viewtopic.php?f=14&t=14292 - the same things as described here |
@bartv2 Can you have a look please? |
I also run in XSendfile issues, but turning off xsendfile works for me. I thought it was most likely related to the encryption app. Has anybody a ownCloud instance with XSendfile switched on? |
I looked into this, the XSendfile is sending the encrypted version because it is reading the file on disk. |
@bartv2 That's awesome :-) Thanks for your help |
in case encrpytion is enabled we need to disable XSendfile - right? @schiesbn |
When I use XSendFile optimization as recommended in Operator manual - ownCloud corrupt files. Both in "Encryption on" and "Encryption off" mode.
Workaround : turn off XSendFile optimization(a2dismod xsendfile, remove XSendFile optimization from virtual host config).
I guess, that this issue related to incorrect uploaded file size calculation. Because in WebUI file size always (even XSendFile turned off) as for corrupted one.
Steps to reproduce:
Comparing:
$ diff -qs incoming/lmce81.pdf-corrupted LinuxMagazine/lmce81.pdf
Files incoming/lmce81.pdf-corrupted and LinuxMagazine/lmce81.pdf differ
$ ls -lh incoming/lmce81.pdf LinuxMagazine/lmce81.pdf
-rw-r--r-- 1 mend0za mend0za 5.8M Nov 10 10:56 incoming/lmce81.pdf-corrupted
-rw-r--r-- 1 mend0za mend0za 4.4M Nov 25 2010 LinuxMagazine/lmce81.pdf
Client version: 1.4.2-0 on Debian AMD/64
OS: Debian 7.2/amd64 (wheezy), Debian 6.x (squeeze)
Apache: Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u5 mod_ssl/2.2.22 OpenSSL/1.0.1e mod_perl/2.0.7 Perl/v5.14.2, also Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze17 with Suhosin-Patch mod_ssl/2.2.16 OpenSSL/0.9.8o
mod_perl/2.0.4 Perl/v5.10.1
PHP: 5.4.4-14+deb7u5 (Debian 7.2), php 5.3 (Debian 6.x), php-apc on
OwnCloud: 6.0.0beta3 (aka git rev 841c622) Reproduced also on ownCloud 5.0.12, 5.0.13, 6.0.0beta1
Turned on XSendFile force to uploaded files corruption (any size).
Apache2.2 with SSL:
<Directory /var/www/owncloud/>
AllowOverride All
SetEnv MOD_X_SENDFILE_ENABLED 1
XSendFile On
$CONFIG = array (
'instanceid' => 'ocf2568e2b73',
'passwordsalt' => '',
'datadirectory' => '/var/www/owncloud/data',
'dbtype' => 'mysql',
'version' => '6.0.0.5',
'dbname' => 'owncloud',
'dbhost' => 'localhost',
'dbtableprefix' => 'oc_',
'dbuser' => 'owncloud',
'dbpassword' => '',
'installed' => true,
'3rdpartyroot' => '/var/www/owncloud/3rdparty',
'3rdpartyurl' => '',
'apps_paths' =>
array (
0 =>
array (
'path' => '/var/www/owncloud/apps',
'url' => '/apps',
'writable' => true,
),
1 =>
array (
'path' => '/var/www/owncloud/apps2',
'url' => '/apps2',
'writable' => false,
),
),
'forcessl' => false,
);
Apps enabled:
apache error.log :
[Sun Nov 10 14:03:44 2013] [error] [client 204.155.156.31] client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt
[Sun Nov 10 14:17:19 2013] [error] [client 31.182.72.193] Negotiation: discovered file(s) matching request: /var/www/owncloud/apps/files/download (None could be negotiated)., referer: https://host/index.php/apps/files?dir=/
owncloud log:
{"app":"PHP","message":"RecursiveDirectoryIterator::__construct(/var/www/owncloud/data/mend0za/thumbnails/193/): failed to open dir: No such file or directory at /var/www/owncloud/lib/private/files/storage/local.php#44","level":3,"time":"2013-11-10T11:17:00+00:00"}
{"app":"PHP","message":"RecursiveDirectoryIterator::__construct(/var/www/owncloud/data/mend0za/thumbnails/194/): failed to open dir: No such file or directory at /var/www/owncloud/lib/private/files/storage/local.php#44","level":3,"time":"2013-11-10T11:17:02+00:00"}
The text was updated successfully, but these errors were encountered: