Project

General

Profile

webdav module, rename, delete files says either invalid or denied.

Added by soulskater over 15 years ago

Hi.

I have been trying to get the webdav module to work in Lighttpd so i can use it as storage for myself and do some front-end development for webdav servers.

My problem is that cannot get the the module to work all the way, i can connect to the server and upload/create files & folders but not rename or delete them, i have checked the security settings on the folder where the configuration points to and did a 777 on them for test without any luck. if i list the files after upload the say RW for owner and nothing for group or others. i tried to change the permissions on the files in the file system after upload still no luck.

This is how my configuration looks for now(Just listing changes from default):

/etc/lighttpd/conf.d/webdav.conf:
------------------------------------------------------
server.modules += ( "mod_webdav" )

$HTTP["url"] =~ "^/dav/test1" {
webdav.activate = "enable"
webdav.is-readonly = "disable"
dir-listing.activate = "enable"
dir-listing.hide-dotfiles = "enable"
dir-listing.exclude = ("_SYNCAPP")
webdav.sqlite-db-name = home_dir + "/webdav_test1_lock.db"
auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "/srv/www/dav/passwd.dav"
auth.require = ( "" => ( "method" => "basic",
"realm" => "test1",
"require" => "user=test1" ) )
}

$HTTP["url"] =~ "^/dav/test2" {
webdav.activate = "enable"
webdav.is-readonly = "disable"
dir-listing.activate = "enable"
dir-listing.hide-dotfiles = "enable"
dir-listing.exclude = ("_SYNCAPP")
webdav.sqlite-db-name = home_dir + "/webdav_test2_lock.db"
auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "/srv/www/passwd.dav"
auth.require = ( "" => ( "method" => "basic",
"realm" => "test2",
"require" => "user=test2" ) )
}

/etc/lighttpd/modules.conf:
------------------------------------------------------
server.modules = (
"mod_access",
"mod_alias",
"mod_webdav",
"mod_auth",
  1. "mod_evasive",
  2. "mod_redirect",
  3. "mod_rewrite",
  4. "mod_setenv",
  5. "mod_usertrack",
##
  1. mod_webdav ##
    include "conf.d/webdav.conf"

/etc/lighttpd/lighttpd.conf:
------------------------------------------------------
alias.url += ( "/dav/" => "/srv/www/dav/" )

I'm running version 1.4.25 of Lighttpd on openSUSE 11.2.

Output from lighttpd V:
-----------------------------------------------------

lighttpd/1.4.25 (ssl) - a light and fast webserver
Build-Date: Dec 22 2009 03:06:39

Event Handlers:

+ select (generic)
+ poll (Unix)
+ rt-signals (Linux 2.4+)
+ epoll (Solaris)
- /dev/poll (Solaris)
- kqueue (FreeBSD)

Network handler:

+ sendfile

Features:

+ IPv6 support
+ zlib support
+ bzip2 support
+ crypt support
+ SSL support
+ PCRE support
+ mySQL support
+ LDAP support
+ memcached support
+ FAM support
+ LUA support
+ xml support
+ SQLite support
+ GDBM support

Have i missed something in my configuration or is this a bug/feature to be on the webdav module?

Appreciate all the help i can get, would like to continue using Lighttpd since it is way smaller and faster than Apache.

/Marcus


Replies (6)

RE: webdav module, rename, delete files says either invalid or denied. - Added by jlpujante over 15 years ago

I tested with version 1.4-23 and 1.4-25 and got the same problem. I can connect to the server and create/delete directories and create regurar files, but I can't rename directories and rename/delete regular files.

My webdav configuration is:

  1. webdav
    $HTTP["url"] =~ "^/webdav($|/)" {
    webdav.activate = "enable"
    webdav.is-readonly = "disable"
    webdav.sqlite-db-name = "/var/run/lighttpd-webdav-lock.db"
    auth.backend = "plain"
    auth.backend.plain.userfile = "/www/web1/.passwd.plain"
    auth.require = ( "" => ( "method" => "basic",
    "realm" => "webdav",
    "require" => "valid-user" ) )
    }

--------------------------------------------------
Is this a bug on the webdav module?

RE: webdav module, rename, delete files says either invalid or denied. - Added by soulskater over 15 years ago

Seems i stand corrected, it looks like i can delete empty folders but not folders with files in them. All other information i wrote above seems correct.

It feels like it is a security issue within the webdav module.(Wild speculations)

/Marcus

RE: webdav module, rename, delete files says either invalid or denied. - Added by soulskater over 15 years ago

Does anyone know if this is easy fixable?

I kinda need to proceed with my development plans and would really like to use Lighttpd as the base for it.

/Marcus

RE: webdav module, rename, delete files says either invalid or denied. - Added by soulskater over 15 years ago

Seriously, is there no one that can shed a light on this issue???

/Marcus

RE: webdav module, rename, delete files says either invalid or denied. - Added by soulskater over 15 years ago

Please, can someone pleas shed a light on this matter, is the webdav module supposed to work or isn't it?

All i ask for is an answer so i can move forward either with continued error searching in my configurations or looking for another system with functional webdav support.

/Marcus

RE: webdav module, rename, delete files says either invalid or denied. - Added by soulskater over 15 years ago

Ok, i got a bit further in this issue, it seems that the bug #1787 is one of the problems.

I managed to rename files and folders, but get errors when doing it from the nautilus file manager in openSUSE, but after a refresh i can see that the file has changed it's name.

I can edit files and save directly to the webdav folder as far as i can see which is good.

When running the litmus tests i get some warnings and 1 error, posting the result here for you to see.

 0. init.................. pass
 1. begin................. pass
 2. options............... pass
 3. put_get............... pass
 4. put_get_utf8_segment.. pass
 5. put_no_parent......... pass
 6. mkcol_over_plain...... pass
 7. delete................ pass
 8. delete_null........... pass
 9. delete_fragment....... WARNING: DELETE removed collection resource with Request-URI including fragment; unsafe
    ...................... pass (with 1 warning)
10. mkcol................. pass
11. mkcol_again........... pass
12. delete_coll........... pass
13. mkcol_no_parent....... pass
14. mkcol_with_body....... pass
15. finish................ pass
<- summary for `basic': of 16 tests run: 16 passed, 0 failed. 100.0%
-> 1 warning was issued.
-> running `copymove':
 0. init.................. pass
 1. begin................. pass
 2. copy_init............. pass
 3. copy_simple........... pass
 4. copy_overwrite........ WARNING: COPY to existing resource didn't give 204 (RFC2518:S8.8.5)
    ...................... pass (with 1 warning)
 5. copy_nodestcoll....... pass
 6. copy_cleanup.......... pass
 7. copy_coll............. pass
 8. copy_shallow.......... pass
 9. move.................. WARNING: MOVE to existing collection resource didn't give 204
    ...................... pass (with 1 warning)
10. move_coll............. pass
11. move_cleanup.......... pass
12. finish................ pass
<- summary for `copymove': of 13 tests run: 13 passed, 0 failed. 100.0%
-> 2 warnings were issued.
-> running `props':
 0. init.................. pass
 1. begin................. pass
 2. propfind_invalid...... pass
 3. propfind_invalid2..... FAIL (PROPFIND with invalid namespace declaration in body (see FAQ) got 207 response not 400)
 4. propfind_d0........... pass
 5. propinit.............. pass
 6. propset............... pass
 7. propget............... pass
 8. propextended.......... pass
 9. propmove.............. pass
10. propget............... pass
11. propdeletes........... pass
12. propget............... pass
13. propreplace........... pass
14. propget............... pass
15. propnullns............ pass
16. propget............... pass
17. prophighunicode....... pass
18. propget............... pass
19. propremoveset......... pass
20. propget............... pass
21. propsetremove......... pass
22. propget............... pass
23. propvalnspace......... pass
24. propwformed........... pass
25. propinit.............. pass
26. propmanyns............ pass
27. propget............... pass
28. propcleanup........... pass
29. finish................ pass
<- summary for `props': of 30 tests run: 29 passed, 1 failed. 96.7%

So for now it's looking usable, but it would be nice to have it fully functional according to the webdav specs available.

Keep up the good work.

/Marcus

    (1-6/6)