Mailing List Archive

need-privileges error
Hello,

I am just starting to get a davical server running. I think the
installation succeeded (0.99 on Ubuntu 10.04). The admin interface seems
to work and I created a new user 'testuser1' to do some tests.
The problem is that whatever I try to load the still empty calendar of
this user I get an error:
- A perl script using Cal::DAV gives a "forbidden" error (HTTP::DAV is
version 0.41)
- Sunbird error console says "DAV_NOT_DAV"
- When I try to open the URL in Firefox I get (after authentification):
<error>
<need-privileges>
<resource>
<href>/davical/caldav.php/caldav.php/testuser1/home/</href>
<privilege>
<C:read-free-busy/>
</privilege>
</resource>
</need-privileges>
</error>

I thought that the user should have the privilege to view his own
calendar by default but even after I set the "Collection Grants" to
"ALL" for the test user and did the same with "Principal Grants" (no
idea what that does but wanted to make sure everything is allowed) but
still no luck.

Any idea what I may be missing?

Thanks
-Michael


Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
rscds-general mailing list
rscds-general at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rscds-general
need-privileges error [ In reply to ]
On 07.08.2010 20:50 Michael Lackhoff wrote:

> <error>
> <need-privileges>
> <resource>
> <href>/davical/caldav.php/caldav.php/testuser1/home/</href>
> <privilege>
> <C:read-free-busy/>
> </privilege>
> </resource>
> </need-privileges>
> </error>

Some more info after I found the debug switch and corresponding log
entries. From the apache log:
davical: LOG: DAVResource: Query: DBGQ: SELECT collection.*,
path_privs(:session_principal::int8,
collection.dav_name,:scan_depth::int), p.principal_id, p.type_id AS
principal_type_id, p.displayname AS principal_displayname,
p.default_privileges AS principal_default_privileges, t
[Sun Aug 08 06:23:22 2010] [error] [client 192.168.48.1] davical: LOG:
DAVResource: Query: DBGQ: ime_zone.tz_spec FROM collection LEFT JOIN
principal p USING (user_no) LEFT JOIN time_zone ON
(collection.timezone=time_zone.tz_id) WHERE collection.dav_name =
:raw_path ORDER BY LENGTH(collection.dav_name) DESC LIMIT 1

Took: 0,000936 to find 0 rows.

So it looks as if the collection I can see in the admin interface is not
found by caldav.php

A simple SQL-query "select dav_name from collection;" gives
'/testuser1/home/' but the above query done by davical is done for these
raw_path values:
/caldav.php/testuser1/home/
/caldav.php/testuser1/
/caldav.php/
Looks like the script name is not properly removed since the first try
would otherwise match?

But then it seems like some fallback is happening:
davical: ALL: DAVResource::FromPath: Path "/caldav.php/testuser1/" is
<DAV::collection/> a collection.
[Sun Aug 08 06:23:22 2010] [error] [client 192.168.48.1] davical: ALL:
DAVResource::FromPath: Path "/caldav.php/testuser1/home/" is
<DAV::collection/> a collection.
[Sun Aug 08 06:23:22 2010] [error] [client 192.168.48.1] davical: ALL:
DAVResource:Privileges of "0" for user accessing "caldav.php"
[Sun Aug 08 06:23:22 2010] [error] [client 192.168.48.1] davical: ALL:
DAVResource:Privileges of "0" for user "testuser1" accessing
"/caldav.php/testuser1/"
[Sun Aug 08 06:23:22 2010] [error] [client 192.168.48.1] davical: ALL:
DAVResource:Privileges of "0" for user "testuser1" accessing
"/caldav.php/testuser1/home/"
[Sun Aug 08 06:23:22 2010] [error] [client 192.168.48.1] davical: ALL:
DAVResource:Testing privileges of "Array" (1000000001) against allowed
"0" => "0" (0)

But again why Privileges of "0"?

-Michael


Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
rscds-general mailing list
rscds-general at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rscds-general
need-privileges error [ In reply to ]
Just for information, I somehow solved this. I still do not know the
exact cause. What I changed is
1) start with a clean httpd.conf and
2) used an Alias to the real davical location. Before I had just linked
it to a DocumentRoot-subdir.

But even after this success I am still having problems. So, if someone
uses DAViCal from Perl, please see my other post...

-Michael


Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
rscds-general mailing list
rscds-general at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rscds-general