2013-06-03 41 views
0

我想列出我的本地主机上的苹果日历服务器的用户目录。我正在访问禁止的错误,对于组也是如此。我的操作系统是Ubuntu 12.04 LTS。该软件包来自存储库。列出caldav目录时访问禁止的错误

这里是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

首先的日志,你确认你正在使用对应于DAV请求的URI:主要收集,设置属性?请参阅http://tools.ietf.org/html/rfc3744#section-5.8

然后,通常不会通过PROPFIND查询主体命名空间,而是通过DAV:principal-property-search REPORT查询进行查询。请参阅http://tools.ietf.org/html/rfc3744#section-9.4

现在,如果您想检索日历服务器上的所有用户,我不确定服务器是否真的允许您这样做,尤其是在您拥有大量用户的情况下。