Forum OpenACS Q&A: WebDAV howto?

Collapse
Posted by Bruno Mattarollo on

Hello,

I just started playing with oacs-dav and I was wondering if there was some How-to on connecting to it using cadaver or other tool ... In particular I am interested in looking at the file-storage from a dotLRN installation (I saw that the package oacs-dav came with the 2.0.2 tarball) ... Is there some out-of-the-box solution or I have to implement stuff myself?

Thanks in advance,

/B

Collapse
2: Re: WebDAV howto? (response to 1)
Posted by Dave Bauer on
Bruno,

I am pretty sure the webdav support will not work with .LRN 2.0.2 at all. It requires OpenACS 5.1 and file storage 5.1.

File-storage 5.1 also needs to have the portlets updates and some assumptions in how the templates fit together fixed.

If you install OpenACS 5.1 and install file-storage from the OpenACS repository and mount an instance of file-storage, it should "just work". I just tried it this morning.

Collapse
3: Re: WebDAV howto? (response to 2)
Posted by Bruno Mattarollo on

Hello Dave,

I installed 5.1 (from CVS) and installed and mounted File-Storage (and oacs-dav) ... I created a directory "web" in file-storage and when trying to access http://myhost:myport/dav/web I get this error in the OpenACS error log (see below)... that's because the parameters in the standard config file recommend the /web/${server}/... standard while the documentation for OpenACS recommends to install in /var/lib/aolserver/${server}...

[22/Mar/2004:01:37:54][21103.3049835440][-conn:oacs-5-1::3] Notice: OACS-DAV running oacs_dav::authorize
[22/Mar/2004:01:37:54][21103.3049835440][-conn:oacs-5-1::3] Notice: OACS-DAV conn_setup uri /files/ method PROPFIND user_id 0
[22/Mar/2004:01:37:54][21103.3049835440][-conn:oacs-5-1::3] Notice: OACS-DAV!! uri /files/
[22/Mar/2004:01:37:54][21103.3049835440][-conn:oacs-5-1::3] Notice: DEST = 
[22/Mar/2004:01:37:54][21103.3049835440][-conn:oacs-5-1::3] Notice: OACS-DAV:item parent folder_id uri /files/
[22/Mar/2004:01:37:54][21103.3049835440][-conn:oacs-5-1::3] Notice: OACS-DAV!! uri /files/
[22/Mar/2004:01:37:54][21103.3049835440][-conn:oacs-5-1::3] Notice: OACS-DAV uri /files/ parent_url / folder_id 519
[22/Mar/2004:01:37:54][21103.3049835440][-conn:oacs-5-1::3] Notice: OACS-DAV setup conn item_id 519
[22/Mar/2004:01:37:54][21103.3049835440][-conn:oacs-5-1::3] Notice: OACS-DAV oacs_dav::authorize user_id 0 method propfind item_id 519
[22/Mar/2004:01:37:54][21103.3049835440][-conn:oacs-5-1::3] Error: can't create directory "/web": permission denied
can't create directory "/web": permission denied
    while executing
"file mkdir [file dirname $name]"
    (procedure "tdav::get_prop_file" line 17)
    invoked from within
"tdav::get_prop_file $uri"
    (procedure "tdav::dbm_read_list" line 2)
    invoked from within
"tdav::dbm_read_list $luri"
    (procedure "tdav::get_user_props" line 3)
    invoked from within
"tdav::get_user_props ${folder_uri}${item_uri} $depth $prop_req"
    invoked from within
"foreach i [tdav::get_user_props ${folder_uri}${item_uri} $depth $prop_req] {
            lappend properties $i
        }"
    ("uplevel" body line 27)
    invoked from within
"uplevel 1 $code_block "
    ("1" arm line 1)
    invoked from within
"switch $errno {
                0 {
                    # TCL_OK
                }
                1 {
                    # TCL_ERROR
               ..."
    ("while" body line 20)
    invoked from within
"while { [db_getrow $db $selection] } {
            incr counter
            if { [info exists array_val] } {
                unset array_val
         ..."
    ("uplevel" body line 5)
    invoked from within
"uplevel 1 $code_block "
    invoked from within
"db_with_handle -dbn $dbn db {
        set selection [db_exec select $db $full_statement_name $sql]

        set counter 0
        while { [db_getrow $..."
    (procedure "db_foreach" line 36)
    invoked from within
"db_foreach get_properties "" {
        set name $name
        set etag "1f9a-400-3948d0f5"
        set properties [list]
        # is "D" the namespace??
        lappend properties [lis..."
    (procedure "oacs_dav::impl::content_folder::propfind" line 18)
    invoked from within
"oacs_dav::impl::content_folder::propfind"
    (procedure "AcsSc.dav.propfind.content_folder" line 1)
    invoked from within
"AcsSc.dav.propfind.content_folder"
    ("uplevel" body line 1)
    invoked from within
"uplevel $func_and_args"
    (procedure "apply" line 3)
    invoked from within
"apply $proc_name $arguments"
    (procedure "acs_sc_call" line 6)
    invoked from within
"acs_sc_call dav $method "" $content_type"
    (procedure "oacs_dav::handle_request" line 64)
    invoked from within
"oacs_dav::handle_request cns28 {}"
 

Sorry for the long error log ... that's just for the record, if someone else finds the same error ...

Collapse
4: Re: WebDAV howto? (response to 1)
Posted by Dave Bauer on
Bruno,

Ok, so are you saying the paramters for the webdav lock and properties storage are pointing to /web/... and you openacs in installed under/var/lib/aolserver ?

It looks like its actually trying to create /web/ which I am pretty sure AOLserver shouldn't be allowed to do.

Collapse
5: Re: WebDAV howto? (response to 1)
Posted by Dave Bauer on
Aha!

ns_section ns/server/${server}/tdav
ns_param propdir /web/${server}/data/dav/properties
ns_param lockdir /web/${server}/data/dav/locks

This config file is assuming the wrong thing. It probably should get the openacs install root from a paramter instead of asuuming /web/${server}.

Does chaning /web/ to /var/lib/aolserver/ fix the problem? It shouldn't cause any problem to change it on an installed development system.

Collapse
6: Re: WebDAV howto? (response to 5)
Posted by Malte Sussdorff on
Cleaned up in 5.1 branch. The correct parameters are now in the config.tcl file.
Collapse
7: Re: WebDAV howto? (response to 5)
Posted by Bruno Mattarollo on
Indeed ... that's what I tried to explain above but failed miserably at :)

/B