Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
WebDAV 405 Method Not Allowed
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
rossi123
n00b
n00b


Joined: 14 Jan 2008
Posts: 10
Location: Wien

PostPosted: Sun Mar 30, 2008 10:33 pm    Post subject: WebDAV 405 Method Not Allowed Reply with quote

Hi,

mein webdav meldet immer nur 405 Method Not Allowed: (Anmerkung: Ich möchte auf das Verzeichnis /efin (siehe alias) zugreifen, es ist aber egal, was ich bei cadaver angebe. Jeder Pfad wird zurückgewiesen. auch die Angabe eines Benutzerkontos mit "https://user@localhost/efin" ist webdav nicht recht.)

ich weiss nicht mehr weiter. bitte um hilfe, ich brauch' das dringend. DANKE! :-)

Quote:
/var/dav # cadaver https://localhost/efin
WARNING: Untrusted server certificate presented for `localhost':
Issued to: Test Certificate, Apache HTTP Server
Issued by: For testing purposes only, Apache HTTP Server
Certificate is valid from Sat, 05 Nov 2005 23:05:21 GMT to Sun, 05 Nov 2006 23:05:21 GMT
Do you wish to accept the certificate? (y/n) y
Could not access /efin/ (not WebDAV-enabled?):
405 Method Not Allowed
Connection to `localhost' closed.
dav:!>

(wobei es egal ist, ob über http oder https, beides verhält sich bis auf das fehlerhafte certificate gleich.)

/etc/apache2/modules.d/45_mod_dav.conf:
(die auskommentierten zeilen hab' ich auch schon drin gehabt, hat nichts verändert.)

Code:
Alias /efin /var/dav/mydavserver
<Directory /var/dav/mydavserver>
        Options None
        Dav On
#       AllowOverride None
#       Order allow,deny
#       Allow from all
        <Limit GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
                AuthType Basic
                AuthName "WebDav Restricted Repository"
                AuthUserFile /var/dav/.davpasswd
                Require valid-user
        </Limit>
</Directory>


/etc/conf.d/apache2:
Code:
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE -D SSL -D SSL_DEFAULT_VHOST -D PHP5 -D DAV -D DAV_FS -D SVN -D SVN_AUTHZ"


Es gibt die notwendigen Verzeichnisse und das user/passwort-file

Code:
/var/dav # l
537546249 0 drwxr-xr-x  3 apache apache  100 Mar 30 21:42 .
671089061 4 drwxr-xr-x 15 root   root   4096 Mar 30 11:04 ..
537546251 4 -rw-r--r--  1 apache apache   20 Mar 30 19:49 .davpasswd
604259106 0 drwxrwxrwx  2 apache apache    6 Mar 30 11:04 mydavserver


/var/log/apache2/ssl_request_log:
Code:
[30/Mar/2008:22:04:01 +0000] 127.0.0.1 TLSv1 DHE-RSA-AES256-SHA "OPTIONS /efin/ HTTP/1.1" -
[30/Mar/2008:22:04:01 +0000] 127.0.0.1 TLSv1 DHE-RSA-AES256-SHA "PROPFIND /efin/ HTTP/1.1" 291


/var/log/apache2/sl_access_log:
Code:
127.0.0.1 - - [30/Mar/2008:22:04:01 +0000] "OPTIONS /efin/ HTTP/1.1" 200 -
127.0.0.1 - - [30/Mar/2008:22:04:01 +0000] "PROPFIND /efin/ HTTP/1.1" 405 291


/var/log/apache2/sl_error_log hat keine diesbezüglichen Einträge.

Danke nochmals schon im Voraus.

LG
Markus
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3925
Location: Hamburg

PostPosted: Mon Mar 31, 2008 8:12 am    Post subject: Reply with quote

Bei mir sieht's so aus:
Code:
Alias /davfs@n22 /mnt/ramdisk/dav/fs

<Directory "/mnt/ramdisk/dav/fs">
        Dav On
        SVNAutoversioning on
        Options Indexes

        AuthType Basic
        AuthName "WebDAV (ramdisk)"
        AuthUserFile "/mnt/ramdisk/dav/conf/davpasswd"
        Require valid-user

        Order deny,allow
        Deny from all
        Allow from 127.0.0.1 192.168.0.2/24

        # Allow universal read-access, but writes are restricted
        # to the admin user.
        <LimitExcept GET OPTIONS>
                require user admin
        </LimitExcept>
</Directory>
Unterschiede sehe ich vor allem in "Options" und der "Limit" Section
Back to top
View user's profile Send private message
rossi123
n00b
n00b


Joined: 14 Jan 2008
Posts: 10
Location: Wien

PostPosted: Mon Mar 31, 2008 11:22 am    Post subject: Reply with quote

Danke für deine rasche Antwort. Ich habe jetzt Deine Config übernommen, es ändert sich aber nichts.

Kann es sein, dass Dienste nicht laufen? Kann ich das irgendwie checken?
Quote:
Could not access /efin/ (not WebDAV-enabled?):
405 Method Not Allowed
Connection to `localhost' closed.


BG
Markus
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3925
Location: Hamburg

PostPosted: Mon Mar 31, 2008 12:53 pm    Post subject: Reply with quote

Also ein http://localhost/server-info sollte Dir die geladenen Module anzeigen (evtl. 00_mod_info.conf anpassen).
Ihc poste hier mal mein Test-Skript für DAV :
Code:
n22 /home/tfoerste/workspace/davfs_test # cat prepare_test.sh
#!/bin/sh

#       Toralf Förster
#       Hamburg
#       Germany


#set -x


if [[ ! "$(whoami)" = "root" ]]; then
        echo "you are not root"
        exit 1
fi

#       mount a ramdisk of 660 MB
#
grep -q ramdisk /etc/mtab || mount -t tmpfs tmpfs /mnt/ramdisk -o noauto,user,size=660M

#       prevent us to overwrite an already existing DAV dir
#
if [[ -d /mnt/ramdisk/dav ]]; then
        echo "/mnt/ramdisk/dav does exist"
        exit 3
fi

#       create a DAV repo
#
mkdir /mnt/ramdisk/dav /mnt/ramdisk/dav/conf /mnt/ramdisk/dav/fs /mnt/ramdisk/dav/lib   &&\
htpasswd2 -cmb /mnt/ramdisk/dav/conf/davpasswd toralf toralf 1>/dev/null 2>&1           &&\
chown -R apache:apache /mnt/ramdisk/dav &&\
chmod g+s /mnt/ramdisk/dav && chmod g+s /mnt/ramdisk/dav/*

#       create within the DAV dir a flat ascii file
#
ls -l / > /mnt/ramdisk/dav/fs/ls-l.txt
chown apache:apache /mnt/ramdisk/dav/fs/ls-l.txt

#       check access to DAV with a DAV client
#
cadaver http://n22/davfs@n22/ <<DATA
toralf
toralf
DATA
RC=$?
if [[ $RC -ne 0 ]]; then
        echo "rc from cadaver: $RC"
        exit $RC
fi

echo
echo " DAV test done"

exit 0

Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum