WebDAV on CentOS - getting 403 error when attempt to upload
I recently struggled with the same problem on my Fedora 10 system. In my case the culprit was some odd redirection that I was doing in Apache. Specifically, I use a content management system (Drupal, to be exact) that within it's .htaccess includes the following redirection logic to redirect missing files to a PHP script:
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
It makes sense that the above only affects the PUT method since in that case REQUEST_FILENAME does not exist.
Not having the WebDAV area inside of the Drupal area, which seems like a reasonable constraint, fixes the problem.
Also, I think it is likely that SELinux would result in a different error, but it's not mentioned in the discussion above. Did you try disabling SELinux?
Same problem. Solved by:
<Location /xyz>
DAV On
AuthType Digest
AuthName "webdav-xmarks"
AuthDigestProvider file
AuthUserFile "/home/xy/xba/digest-password"
Require valid-user
RewriteEngine off <-- this part solved it!
</Location>
Same problem.
Solved by creating a .htaccess file in the webdav directory with :
RewriteEngine off
Found here: http://annoyingtechnicaldetails.wordpress.com/2007/07/20/webdav-vs-drupal-htaccess-redirect-rules/
What does your error_log say? That's the first place to look.
Also, look in the regular access_log; sometimes some DAV clients will try to do DAV things at higher level directories than where you're doing your work, which requires them to have at least read-only DAV access up to the virtualhost root.