owncloud-archive / files_locking

3 stars 5 forks source link

500 internal server error for PUT and DELETE #14

Closed CptLeeChuck closed 9 years ago

CptLeeChuck commented 9 years ago

Hello,

When I enable the App "File Locking" in Owncloud I have internal server errors for each PUT or DELETE request. See my apache access.log excerpt:

192.168.2.11 - - [14/Mar/2015:08:39:44 +0100] "PROPFIND /remote.php/webdav HTTP/1.1" 207 5272
192.168.2.11 - - [14/Mar/2015:08:39:44 +0100] "DELETE /remote.php/webdav/Documents/MyDocument.rtf HTTP/1.1" 500 529
192.168.2.11 - - [14/Mar/2015:08:39:45 +0100] "DELETE /remote.php/webdav/Documents/AnotherDoc.doc HTTP/1.1" 500 529
192.168.2.11 - - [14/Mar/2015:08:39:45 +0100] "PUT /remote.php/webdav/Documents/TEST1.TXT HTTP/1.1" 500 529
192.168.2.11 - - [14/Mar/2015:08:39:45 +0100] "PUT /remote.php/webdav/Documents/TEST2.TXT HTTP/1.1" 500 529
192.168.2.11 - - [14/Mar/2015:08:40:12 +0100] "PROPFIND /remote.php/webdav/ HTTP/1.1" 207 502
192.168.2.11 - - [14/Mar/2015:08:40:23 +0100] "PROPFIND /remote.php/webdav/ HTTP/1.1" 207 1270

At the same time I can find this in apaches error.log:

[Sat Mar 14 08:39:45.350992 2015] [fcgid:warn] [pid 16840:tid 880] (OS 109)Die Pipe wurde beendet.  : [client 192.168.2.11:53446] mod_fcgid: get overlap result error
[Sat Mar 14 08:39:45.350992 2015] [core:error] [pid 16840:tid 880] [client 192.168.2.11:53446] End of script output before headers: remote.php
[Sat Mar 14 08:39:45.803398 2015] [fcgid:warn] [pid 16840:tid 880] (OS 109)Die Pipe wurde beendet.  : [client 192.168.2.11:53447] mod_fcgid: get overlap result error
[Sat Mar 14 08:39:45.803398 2015] [core:error] [pid 16840:tid 880] [client 192.168.2.11:53447] End of script output before headers: remote.php

Also same time owncloud.log has some more details:

{"reqId":"45d62f7c8057519037a1480b67a1c2de","remoteAddr":"192.168.2.11","app":"user_ldap","message":"No group filter is specified, LDAP group feature will not be used.","level":1,"time":"2015-03-14T07:39:46+00:00","method":"PUT","url":"\/remote.php\/webdav\/Documents\/TEST2.TXT"}
{"reqId":"45d62f7c8057519037a1480b67a1c2de","remoteAddr":"192.168.2.11","app":"lock","message":"INFO: Write lock requested for F:\/Apache\/owncloud\/Apache24\/htdocs\/data\/testuser\/files\/documents\/test2.txt.octransferid18718.part","level":0,"time":"2015-03-14T07:39:46+00:00","method":"PUT","url":"\/remote.php\/webdav\/Documents\/TEST2.TXT"}
{"reqId":"45d62f7c8057519037a1480b67a1c2de","remoteAddr":"192.168.2.11","app":"lock","message":"PASS: Write lock succeeded on F:\/Apache\/owncloud\/Apache24\/htdocs\/data\/testuser\/files\/documents\/test2.txt.octransferid18718.part","level":0,"time":"2015-03-14T07:39:46+00:00","method":"PUT","url":"\/remote.php\/webdav\/Documents\/TEST2.TXT"}
{"reqId":"45d62f7c8057519037a1480b67a1c2de","remoteAddr":"192.168.2.11","app":"lock","message":"INFO: Incrementing lock type 2 count for F:\/Apache\/owncloud\/Apache24\/htdocs\/data\/testuser\/files\/documents\/test2.txt.octransferid18718.part","level":0,"time":"2015-03-14T07:39:46+00:00","method":"PUT","url":"\/remote.php\/webdav\/Documents\/TEST2.TXT"}
{"reqId":"45d62f7c8057519037a1480b67a1c2de","remoteAddr":"192.168.2.11","app":"lock","message":"INFO: Read lock requested for F:\/Apache\/owncloud\/Apache24\/htdocs\/data\/testuser\/files\/documents\/test2.txt.octransferid18718.part","level":0,"time":"2015-03-14T07:39:47+00:00","method":"PUT","url":"\/remote.php\/webdav\/Documents\/TEST2.TXT"}
{"reqId":"45d62f7c8057519037a1480b67a1c2de","remoteAddr":"192.168.2.11","app":"lock","message":"PASS: Acquired read lock for F:\/Apache\/owncloud\/Apache24\/htdocs\/data\/testuser\/files\/documents\/test2.txt.octransferid18718.part","level":0,"time":"2015-03-14T07:39:47+00:00","method":"PUT","url":"\/remote.php\/webdav\/Documents\/TEST2.TXT"}
{"reqId":"45d62f7c8057519037a1480b67a1c2de","remoteAddr":"192.168.2.11","app":"lock","message":"INFO: Incrementing lock type 1 count for F:\/Apache\/owncloud\/Apache24\/htdocs\/data\/testuser\/files\/documents\/test2.txt.octransferid18718.part","level":0,"time":"2015-03-14T07:39:47+00:00","method":"PUT","url":"\/remote.php\/webdav\/Documents\/TEST2.TXT"}
{"reqId":"45d62f7c8057519037a1480b67a1c2de","remoteAddr":"192.168.2.11","app":"lock","message":"INFO: Write lock requested for F:\/Apache\/owncloud\/Apache24\/htdocs\/data\/testuser\/files\/documents\/test2.txt","level":0,"time":"2015-03-14T07:39:47+00:00","method":"PUT","url":"\/remote.php\/webdav\/Documents\/TEST2.TXT"}
{"reqId":"45d62f7c8057519037a1480b67a1c2de","remoteAddr":"192.168.2.11","app":"lock","message":"PASS: Write lock succeeded on F:\/Apache\/owncloud\/Apache24\/htdocs\/data\/testuser\/files\/documents\/test2.txt","level":0,"time":"2015-03-14T07:39:47+00:00","method":"PUT","url":"\/remote.php\/webdav\/Documents\/TEST2.TXT"}
{"reqId":"45d62f7c8057519037a1480b67a1c2de","remoteAddr":"192.168.2.11","app":"lock","message":"INFO: Incrementing lock type 2 count for F:\/Apache\/owncloud\/Apache24\/htdocs\/data\/testuser\/files\/documents\/test2.txt","level":0,"time":"2015-03-14T07:39:47+00:00","method":"PUT","url":"\/remote.php\/webdav\/Documents\/TEST2.TXT"}
{"reqId":"45d62f7c8057519037a1480b67a1c2de","remoteAddr":"192.168.2.11","app":"PHP","message":"unlink(F:\\Apache\\owncloud\\Apache24\\htdocs\\data\/testuser\/files\/documents\/test2.txt): Permission denied at F:\\Apache\\owncloud\\Apache24\\htdocs\\lib\\private\\files\\storage\\mappedlocal.php#270","level":3,"time":"2015-03-14T07:39:47+00:00","method":"PUT","url":"\/remote.php\/webdav\/Documents\/TEST2.TXT"}
{"reqId":"d8898b5d419ba2468cf5021413104369","remoteAddr":"192.168.2.11","app":"lock","message":"INFO: Read lock requested for F:\/Apache\/owncloud\/Apache24\/htdocs\/data\/testuser\/files\/documents\/test2.txt","level":0,"time":"2015-03-14T07:40:28+00:00","method":"GET","url":"\/remote.php\/webdav\/Documents\/TEST2.TXT"}
{"reqId":"d8898b5d419ba2468cf5021413104369","remoteAddr":"192.168.2.11","app":"lock","message":"PASS: Acquired read lock for F:\/Apache\/owncloud\/Apache24\/htdocs\/data\/testuser\/files\/documents\/test2.txt","level":0,"time":"2015-03-14T07:40:28+00:00","method":"GET","url":"\/remote.php\/webdav\/Documents\/TEST2.TXT"}
{"reqId":"d8898b5d419ba2468cf5021413104369","remoteAddr":"192.168.2.11","app":"lock","message":"INFO: Incrementing lock type 1 count for F:\/Apache\/owncloud\/Apache24\/htdocs\/data\/testuser\/files\/documents\/test2.txt","level":0,"time":"2015-03-14T07:40:28+00:00","method":"GET","url":"\/remote.php\/webdav\/Documents\/TEST2.TXT"}

Based on owncloud.log it looks like it is a "access denied" problem (at least for the unlink message, which I do not understand by the way, as in this case I just added a document), however, the related apache user has full permissions, and I monitored the progress with Sysinternals Process-Monitor, it has not one Access Denied error, just Success, and not found. See screenshot:

proccess-monitor

To ensure it's no a permission issue, I tried also to run Apache as local Administrator, which has the same 500 errors. Doing this on command line I noticed PHP crashs for each 500 in the log file: php-crash

If I try to access manually the .../owncloud/remote.php/webdav/ folder it's also ending up in 500 errors if I try to add or delete a file. However in both cases 0 byte files are created with the correct name, but no data comes into the files.

My setup is: Windows 2k8 R2 with Owncloud 8.0.0.7, Apache 2.4.12 (fresh clean installation with default http.conf) and PHP 5.6.5 via FastCGI with more or less default php.ini.

I do actually not need a solution or support, because I just disabled the App, this is more to let you know there might be an issue.

LC

karlitschek commented 9 years ago

@DeepDiver1975 Any idea what is wrong here?

DeepDiver1975 commented 9 years ago

{"reqId":"45d62f7c8057519037a1480b67a1c2de","remoteAddr":"192.168.2.11","app":"PHP","message":"unlink(F:\Apache\owncloud\Apache24\htdocs\data\/testuser\/files\/documents\/test2.txt): Permission denied at F:\Apache\owncloud\Apache24\htdocs\lib\private\files\storage\mappedlocal.php#270","level":3,"time":"2015-03-14T07:39:47+00:00","method":"PUT","url":"\/remote.php\/webdav\/Documents\/TEST2.TXT"}

I suspect some Windows specific issue here ...

ghost commented 9 years ago

Yes, at least the mappedlocal seems to be also reported in core for windows systems: https://github.com/owncloud/core/issues/14513 (see error message in the linked forums thread)

DeepDiver1975 commented 9 years ago

fixed with https://github.com/owncloud/files_locking/pull/10