FAQ Item done - 
http://faq.globalvision.com.au/cgi-bin/fom?editCmds=show&file=92

-----Original Message-----
From: Dirk Verbeeck [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, 14 August 2001 8:19 AM
To: [EMAIL PROTECTED]
Subject: Re: Webdav programming

Bita Shadgar wrote:

> Dirk Verbeeck wrote:
>
>> Bita Shadgar wrote:
>>
>> > I had installed slide 1.0.11 before and I could create mkcol,
>> proppatch
>> > and propget by using the run.sh in client/bin directory and also
>> make
>> > them persistent into a database. Do you know how can I use the
>> slide's
>> > webdav client with jakarta-tomcat-3.2.3.
>>
>> just copy slide.war in the webapps directory (and restart) and do
>> "open http://localhost:8080/slide"; in the command line client
>>
>
> When I try to mkcol after open the url I get this message:
>
> [ Slide ] $ open http://localhost:8080/slide
> [LOCALHOST] /slide/ $ ls
> files
> [LOCALHOST] /slide/ $ mkcol test
> Making '/slide/test' collection: failed.
> Forbidden (403)
> [LOCALHOST] /slide/ $
>
> Indeed when I try to run the SimpleClient.java I get this error
> message:
>
> classes% java SimpleClient
> Reopen connection : Host:localhost Port:8080
>
> MKCOL /slide/newpath HTTP/1.1
> Content-Length: 0
> Host: localhost:8080
> User-Agent: Jakarta HTTP Client/1.0
>
>
> HTTP/1.0 403 Forbidden
> Set-Cookie2: JSESSIONID=yreq6zfty1;Version=1;Discard;Path="/slide"
> Set-Cookie: JSESSIONID=yreq6zfty1;Path=/slide
> Servlet-Engine: Tomcat Web Server/3.2.3 (JSP 1.1; Servlet 2.2; Java
> 1.2; SunOS 5.7 sparc; java.vendor=Sun Microsystems Inc.)
>
> Closing connection
> End session
> Closing connection
> classes%
>
> Is something wrong with my setting. Every time I receive 403 Forbidden
> error.

Actually, you have to do the same thing I said to Kumar:
 I think I'll make a FAQ item for this... :-)

you have to give more permissions to guest
add the following line in domain.xml
          <permission action="/actions" subject="/users/guest" />
after:
        <objectnode classname="org.apache.slide.structure.SubjectNode"
uri="/files">

I'll attach a changed domain.xml

A second thing is that you normally don't put files in /slide, you put
them in /slide/files.
(look at my example it makes a /slide/files/newpath )

If you want to check your permissions you can always use the "acl"
command:
[ Slide ] $ open htpp://localhost:8080/slide
[LOCALHOST] /slide/ $ acl

ACL for /slide:
------------------------------------------------------------
granted to /slide/root    (not protected)   (not inherited)
   DAV:all
granted to /slide/user    (not protected)   (not inherited)
   DAV:read
granted to all    (not protected)   (not inherited)
   DAV:read
------------------------------------------------------------
[LOCALHOST] /slide/ $ cd files
[LOCALHOST] /slide/files/ $ acl

ACL for /slide/files/:
------------------------------------------------------------
granted to /slide/users/guest    (not protected)   (not inherited)
   DAV:all
granted to /slide/users/john    (not protected)   (not inherited)
   DAV:read-acl
   DAV:write-acl
granted to /slide/%2B/users/groupA    (not protected)   (not inherited)
   DAV:write
granted to all    (not protected)   (not inherited)
   DAV:read
granted to /slide/root    (protected)   (inherited from '/slide/')
   DAV:all
------------------------------------------------------------
[LOCALHOST] /slide/files/ $ mkdir newpath
Making '/slide/files/newpath' collection: succeeded.
[LOCALHOST] /slide/files/ $ cd newpath
[LOCALHOST] /slide/files/newpath/ $ acl

ACL for /slide/files/newpath/:
------------------------------------------------------------
granted to /slide/users/guest    (protected)   (inherited from
'/slide/files')
   DAV:all
granted to /slide/users/john    (protected)   (inherited from
'/slide/files')
   DAV:read-acl
   DAV:write-acl
granted to /slide/%2B/users/groupA    (protected)   (inherited from
'/slide/files')
   DAV:write
granted to all    (protected)   (inherited from '/slide/files')
   DAV:read
granted to /slide/root    (protected)   (inherited from '/slide/')
   DAV:all
------------------------------------------------------------
[LOCALHOST] /slide/files/newpath/ $ put a.html
Uploading  'a.html' to '/slide/files/newpath/a.html': succeeded.
[LOCALHOST] /slide/files/newpath/ $ ls -l
a.html                    2590  text/html            Aug 14, 2001
12:02:02 AM
[LOCALHOST] /slide/files/newpath/ $ acl a.html

ACL for /slide/files/newpath/a.html:
------------------------------------------------------------
granted to /slide/users/guest    (protected)   (inherited from
'/slide/files')
   DAV:all
granted to /slide/users/john    (protected)   (inherited from
'/slide/files')
   DAV:read-acl
   DAV:write-acl
granted to /slide/%2B/users/groupA    (protected)   (inherited from
'/slide/files')
   DAV:write
granted to all    (protected)   (inherited from '/slide/files')
   DAV:read
granted to /slide/root    (protected)   (inherited from '/slide/')
   DAV:all
------------------------------------------------------------
[LOCALHOST] /slide/files/newpath/ $


If you don't use authentication you are "/slide/users/guest"
with the modification in domain.xml you get all permissions on
/slide/files
and you can do what you want...


Dirk

Reply via email to