Skip to content
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

Apache return HTTP405 for PUT, PROPFIND, MKCOL etc. #8536

Closed
aheusingfeld opened this issue May 10, 2014 · 12 comments
Closed

Apache return HTTP405 for PUT, PROPFIND, MKCOL etc. #8536

aheusingfeld opened this issue May 10, 2014 · 12 comments

Comments

@aheusingfeld
Copy link

This bug report is more or less an information for all people stumbling over the PROPFIND, MKCOL or PUT requests return HTTP 405 on Apache which leads to problems similar as the ones described in #6242. In my case I am using Apache 2.4 on Ubuntu 14.04 and installed owncloud 6.0.3 via the ubuntu package via aptitude from http://download.opensuse.org/repositories/isv:/ownCloud:/community/xUbuntu_14.04/

After setting up owncloud I saw multiple lines like this in my apache ssl-access.log when I tried to create a folder via the owncloud OS X client 1.5.5 or access the WebDAV in any other way than via the browser:

[11/May/2014:00:46:28 +0200] (-@88.152.146.61) TLSv1 DHE-RSA-AES256-SHA - - - "MKCOL /cloud/remote.php/webdav/test HTTP/1.1" 405 [11/May/2014:00:46:28 +020
0] s 251
[11/May/2014:00:46:44 +0200] (ahe@88.152.146.61) TLSv1 DHE-RSA-AES256-SHA - - - "GET /cloud/status.php HTTP/1.1" 200 [11/May/2014:00:46:44 +0200] s 77
[11/May/2014:00:46:44 +0200] (-@88.152.146.61) TLSv1 DHE-RSA-AES256-SHA - - - "PROPFIND /cloud/remote.php/webdav/ HTTP/1.1" 405 [11/May/2014:00:46:44 +0200
] s 250

Additionally my owncloud.log contained lines like this:

{"app":"core","message":"isWebDAVWorking: NO - Reason: Method not allowed (Sabre_DAV_Exception_MethodNotAllowed)","level":2,"time":"2014-05-10T22:33:24+00:00"}

It turns out the problem didn't directly have to do with ownCloud but with the PHP module that had been installed together with ownCloud! This was not the old libapache2-mod-php5 but instead libapache2-mod-php5filter which has the following behaviour:

Apache does not want to send arbitrary HTTP request methods to regular files. Sending a "DELETE" or "PUT" to a regular file in a document root will end up with a "405 Method not allowed". (...)

You can get more information here: http://apache-http-server.18135.x6.nabble.com/Issue-with-HTTP-methods-DELETE-PUT-not-being-accepted-returning-405-Method-not-allowed-td4999776.html

The solution in this was a very simple

$ sudo apt-get install libapache2-mod-php5

which automatically removed libapache2-mod-php5filter and reconfigured my Apache.
Everything seems to work fine now but maybe you want to consider to add libapache2-mod-php5 as a dependency to the ownCloud debian package.

@karlitschek
Copy link
Contributor

Hmm. This doesn´t sound like a bug but more like documentation. Can you do a pull request to add this to the ownCloud documentation to the "documentatiom" repository? Perhaps a tips and tricks section?

@ghost
Copy link

ghost commented May 11, 2014

@karlitschek i think @aheusingfeld is recommending to add an explicit dependency to the ownCloud debian/ubuntu packages to prevent that the libapache2-mod-php5filter is used instead of the correct libapache2-mod-php5

@karlitschek
Copy link
Contributor

Yes. This would be even better. Pull requests welcome :-)

@ghost
Copy link

ghost commented May 12, 2014

@karlitschek
Pull requests for the packaging? AFAIK those dependencies are not handled in this repository?

@karlitschek
Copy link
Contributor

This is done in the OBS. @dragotin Can you explain how to contribute?

@dragotin
Copy link
Contributor

this is how to contribute: http://en.opensuse.org/openSUSE:Build_Service_Collaboration
Please work on the owncloud package in OBS project isv:ownCloud:community:6.0.

The question is why the package libapache2-mod-php5filter was pulled instead of the recommended one libapache2-mod-php5. It is always recommended to keep the dependency list of packages short, so we rather need to find out why not the correct one was pulled.

@ghost
Copy link

ghost commented May 12, 2014

@dragotin
Have read some reports in the forums that the libapache2-mod-php5filter was installed after a release change of Ubuntu from 13.10 to 14.04. Unfortunately i can't find that post at the moment.

@aheusingfeld
Copy link
Author

@RealRancor that's exactly what I did. I had owncloud running with Ubuntu 12.04.4 but wanted to checkout Apache 2.4 for Forward Secrecy. The package was exchange during the upgrade from 12.04.4 LTS to 14.04

@ghost
Copy link

ghost commented May 12, 2014

@aheusingfeld Good to know. You could check your /var/log/apt/history.* and/or /var/log/apt/term.* to see why the libapache2-mod-php5filter was preferred during the upgrade.

@ghost
Copy link

ghost commented May 13, 2014

Any opinions about adding a conflict to libapache2-mod-php5filter to the package? Don't know if this will break other stuff but this package will definitely break the ownCloud WebDAV stuff.

@LukasReschke
Copy link
Member

@jnweiger FYI

@jnweiger
Copy link
Contributor

@LukasReschke thanks for the pointer. I'll add a test against libapache2-mod-php5filter to the installation test suite.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants