0

我正在尝试在我的本地主机上列出苹果日历服务器的用户目录。我收到访问禁止错误,对于组也是如此。我的操作系统是 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
4

1 回答 1

0

首先,您是否验证了您使用的请求 uri 对应于 DAV:principal-collection-set 属性?见https://www.rfc-editor.org/rfc/rfc3744#section-5.8

然后,principal 命名空间通常不通过 PROPFIND 查询,而是通过 DAV:principal-property-search REPORT 查询。见https://www.rfc-editor.org/rfc/rfc3744#section-9.4

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

于 2013-06-05T14:31:59.377 回答