我想在我的localhost上列出apple calendar server的users目录。我正在访问禁止错误,对于组也是如此。我的操作系统是ubuntu 12.04 LTS。并且包来自存储库。
这是runshell.py命令的日志
/calendars/users > ls
<-------- BEGIN HTTP CONNECTION -------->
Server: localhost
<-------- BEGIN HTTP REQUEST -------->
PROPFIND /calendars/users/ HTTP/1.1
Host: localhost:8008
Authorization: Digest username="test", realm="Test Realm", nonce="17913381079262023151194175611", uri="/calendars/users/", response="df3db481efdc68df9c39733a957f072a", algorithm="md5"
Content-Length: 145
Content-Type: text/xml; charset=utf-8
Depth: 1
Brief: t
<?xml version='1.0' encoding='utf-8'?>
<ns0:propfind xmlns:ns0="DAV:">
<ns0:prop>
<ns0:resourcetype />
</ns0:prop>
</ns0:propfind>
<-------- BEGIN HTTP RESPONSE -------->
HTTP/1.1 403 Forbidden
Date: Mon, 03 Jun 2013 06:48:12 GMT
DAV: 1, access-control
Content-Type: text/html;charset=utf-8
Content-Length: 139
Server: Twisted/8.2.0 TwistedWeb/8.2.0
<html><head><title>403 Forbidden</title></head><body><h1>Forbidden</h1>You don't have permission to access /calendars/users/.</body></html>
<-------- END HTTP RESPONSE -------->
<-------- END HTTP CONNECTION -------->
Ignoring error: 403
答案 0 :(得分:0)
首先,您是否已验证您使用的请求uri是否与DAV:principal-collection-set属性相对应?见http://tools.ietf.org/html/rfc3744#section-5.8
然后,通常不通过PROPFIND查询主体名称空间,而是通过DAV:principal-property-search REPORT查询查询。见http://tools.ietf.org/html/rfc3744#section-9.4
现在,如果你想要检索日历服务器上的所有用户,我不确定服务器是否真的允许你这样做,特别是如果你有大量用户。