Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 71d40963b505df4524269198e237b3e3 > files > 993

virtuoso-opensource-doc-6.1.4-2.fc14.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
 <head profile="http://internetalchemy.org/2003/02/profile">
  <link rel="foaf" type="application/rdf+xml" title="FOAF" href="http://www.openlinksw.com/dataspace/uda/about.rdf" />
  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
  <meta name="dc.title" content="17. Internet Services" />
  <meta name="dc.subject" content="17. Internet Services" />
  <meta name="dc.creator" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="dc.copyright" content="OpenLink Software, 1999 - 2009" />
  <link rel="top" href="index.html" title="OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="search" href="/doc/adv_search.vspx" title="Search OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="parent" href="internetservices.html" title="Chapter Contents" />
  <link rel="prev" href=".html" title="" />
  <link rel="next" href="uriqa.html" title="URIQA Semantic Web Enabler" />
  <link rel="shortcut icon" href="../images/misc/favicon.ico" type="image/x-icon" />
  <link rel="stylesheet" type="text/css" href="doc.css" />
  <link rel="stylesheet" type="text/css" href="/doc/translation.css" />
  <title>17. Internet Services</title>
  <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
  <meta name="author" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="copyright" content="OpenLink Software, 1999 - 2009" />
  <meta name="keywords" content="" />
  <meta name="GENERATOR" content="OpenLink XSLT Team" />
 </head>
 <body>
  <div id="header">
    <a name="webdavserver" />
    <img src="../images/misc/logo.jpg" alt="" />
    <h1>17. Internet Services</h1>
  </div>
  <div id="navbartop">
   <div>
      <a class="link" href="internetservices.html">Chapter Contents</a> | <a class="link" href="internetservices.html" title="Internet Services">Prev</a> | <a class="link" href="uriqa.html" title="URIQA Semantic Web Enabler">Next</a>
   </div>
  </div>
  <div id="currenttoc">
   <form method="post" action="/doc/adv_search.vspx">
    <div class="search">Keyword Search: <br />
        <input type="text" name="q" /> <input type="submit" name="go" value="Go" />
    </div>
   </form>
   <div>
      <a href="http://www.openlinksw.com/">www.openlinksw.com</a>
   </div>
   <div>
      <a href="http://docs.openlinksw.com/">docs.openlinksw.com</a>
   </div>
    <br />
   <div>
      <a href="index.html">Book Home</a>
   </div>
    <br />
   <div>
      <a href="contents.html">Contents</a>
   </div>
   <div>
      <a href="preface.html">Preface</a>
   </div>
    <br />
   <div class="selected">
      <a href="internetservices.html">Internet Services</a>
   </div>
    <br />
   <div class="selected">
      <a href="webdavserver.html">WebDAV Server</a>
    <div>
        <a href="#davaccountsforwebuser" title="DAV User Accounts">DAV User Accounts</a>
        <a href="#davauth" title="WebDAV Authentication">WebDAV Authentication</a>
        <a href="#davsymboliclinks" title="WebDAV Symbolic Links">WebDAV Symbolic Links</a>
        <a href="#accesspermofwebres" title="Access Right Permissions of Web Resources">Access Right Permissions of Web Resources</a>
        <a href="#davrdfmetadata" title="DAV and RDF Metadata">DAV and RDF Metadata</a>
        <a href="#customattofwebres" title="Special Attributes of Web Resources">Special Attributes of Web Resources</a>
    </div>
   </div>
   <div>
      <a href="uriqa.html">URIQA Semantic Web Enabler</a>
   </div>
   <div>
      <a href="maildelivstore.html">Mail Delivery &amp; Storage</a>
   </div>
   <div>
      <a href="nntpnewsgroups.html">NNTP Newsgroups</a>
   </div>
   <div>
      <a href="mime.html">MIME &amp; Internet Messages</a>
   </div>
   <div>
      <a href="ftpservices.html">FTP Services</a>
   </div>
   <div>
      <a href="vspguide.html">VSP Guide</a>
   </div>
   <div>
      <a href="ldap.html">LDAP</a>
   </div>
    <br />
  </div>
  <div id="text">
<a name="webdavserver" />
    <h2>17.1. WebDAV Server</h2>
<p>Virtuoso supports the WebDAV protocol, which is an extension of HTTP for
cooperative work on the Internet.  DAV resources can be of any mime type,
including binary types.
The DAV resources are stored in the Virtuoso database
as large objects, they are not in the file system and can only be accessed
through the DAV protocol.  Direct SQL access to the DAV tables is also possible, so
there&#39;s a set of Virtuoso/PL procedures that acts as DAV API to let server-side applications access DAV.
Virtuoso DAV can be extended by virtual collections. Instead of accessing DAV tables,
DAV server can retrieve data from applications,
thus an application can generate documents on demand and these documents will be available  via DAV
as well as plain DAV resources. Moreover, resources can be submitted directly to the application via DAV.
Virtuoso DAV provides settable access rights and ownership of resources.
Access rights as such are not covered by the DAV specification but Virtuoso implements both ACLs (access control lists) and a Unix
file system like scheme for ownership and permissions.
SQL accounts enabled for DAV are valid owners of DAV resources.  A resource has both a user owner and a group owner, plus an optional access control list that can grant privileges to users and roles alike.
A user can have DAV-only access, SQL/ODBC-only access, both of them or neither.
User account information is stored in relational tables and can be manipulated from SQL or
through a Web UI.</p>
<p>
Virtuoso DAV can store metadata about resources. These metadata are extracted from resources automatically,
and can be edited by users. In addition, users can place public and personal &#39;tags&#39; on resources to
categorize data according for personal needs without interference between users.
Virtuoso DAV has a powerful and scalable search engine that let application locate resources that match given list of criteria.
The search can process both plain DAV resources and data published by applications in virtual collections.
Search criteria can check for resource properties, content, metadata and tags.
</p>
<p>Certain special processing is provided for the following types
of DAV resources:</p>
<ul>
      <li>Any textual content types are automatically indexed in a free text index.</li>
      <li>Any XML content types are indexed in the same free text index as other
  text plus can be queried  with the <strong>xcontains</strong>
  SQL predicate.</li>
      <li>Some well-known types of documents are parsed in order to extract metadata,
such as author of MS Office document or musical genre of MP3 audio file or resolution of an image.</li>
      <li>VSP/VSPX pages - DAV resources can be dynamic web pages written in VSP
  or VSPX. Requesting such a page with GET or POST will execute the logic on
  the page. This is very convenient way of building web applications.
  </li>
    </ul>
<p>DAV resources are stored in an ordinary relational table.  The text and
XML query features used with DAV are separately usable from SQL on any table
with the appropriate indexes and are thus not intrinsically related to DAV.</p>
<p>WebDAV (Web Distributed Authoring and Versioning) is a communication
protocol for the Internet implemented as an extension to HTTP 1.1.  The WebDAV
specification was published by the Internet Engineering Task Force (IETF) in
February 1999.</p>
<p>Most operating systems have support for accessing data hosted on DAV servers.</p>
<p>DAV was designed to provide more methods for handling server resources.
In addition to the usual HTTP methods such as GET, POST, HEAD, PUT, DELETE,
OPTIONS are methods for making directories (or collections), a lock mechanism, copying of
resources and  collections, predefined and userd-defined properties of resources and collections.</p>
<p>DAV consists of HTTP extensions, often with a message body containing XML.
DAV also provides a basic schema for resource metadata by allowing arbitrary XML properties to  be attached to resources.
</p>
<p>
Virtuoso supports the following HTTP methods:
</p>
<table class="data">
<caption>Table: 17.1.1. Features List - Virtuoso Web DAV HTTP Method Support</caption>



<tr>
<th class="data">HTTP Method</th>
<th class="data">Description</th>
</tr>


<tr>
<td class="data">HEAD</td>
<td class="data">Meta method for examining server properties or network behavior.</td>
</tr>
<tr>
<td class="data">GET</td>
<td class="data">Retrieves documents from the server</td>
</tr>
<tr>
<td class="data">POST, PUT</td>
<td class="data">Posts or puts documents on the server</td>
</tr>
<tr>
<td class="data">MKCOL</td>
<td class="data">Creates a collection</td>
</tr>
<tr>
<td class="data">MOVE</td>
<td class="data">For moving resources and/or collections within the server</td>
</tr>
<tr>
<td class="data">DELETE</td>
<td class="data">Removes resources or collections of resources from the server</td>
</tr>
<tr>
<td class="data">LOCK, UNLOCK</td>
<td class="data">Locks or unlocks a resource or collection to protect from modification by others</td>
</tr>
<tr>
<td class="data">PROPFIND, PROPPATCH</td>
<td class="data">Retrieves and sets properties for collections and/or resources.  In addition to arbitrary user-defined properties,
Virtuoso supports two sets of predefined properties: standard DAV properties (type, creation time, modification time, size etc.) and
Virtuoso-specific DAV properties (access control, tags, extensions for virtual collections.)</td>
</tr>
<tr>
<td class="data">MGET (experimental)</td>
<td class="data">Retrieves RDF metadata of a document according to URIQA rules</td>
</tr>
<tr>
<td class="data">MPUT/MDELETE (experimental)</td>
<td class="data">Updates RDF metadata of a document according to URIQA rules and appropriate RDF Schemas</td>
</tr>


</table>
    <br />
<div class="tip">
<div class="tiptitle">See Also: External References</div>
<p>
<a href="http://www.rfc-editor.org/rfc/rfc2616.txt">IETF RFC 2616 regarding HTTP 1.1</a>
</p>
<p>
<a href="http://www.rfc-editor.org/rfc/rfc2518.txt">IETF RFC 2518 regarding WebDAV Specification</a>
</p>
</div>

<a name="davaccountsforwebuser" />
    <h3>17.1.2. DAV User Accounts</h3>
<p>Any non-disabled SQL account with the U_DAV_ENABLE column set to non-zero is a valid DAV account.
The administration user interface provides a check box for enabling DAV access and will make a default home collection etc.
Alternately, regular SQL can be used for setting the DAV flag on.  The DAV API or protocol requests can be used for
creating collections and resources for the user.
</p>
<p>
Any non-disabled SQL account with the U_DAV_ENABLE column set to non-zero is a valid DAV account.
The administration user interface provides a check box for enabling DAV access and will make a default home collection etc.
Alternately, regular SQL can be used for setting the DAV flag on.  The DAV API or protocol requests can be used for
creating collections and resources for the user.
</p>
<p>There is an automatically created initial DAV enabled account called &quot;dav&quot;.  This has general administration privileges over all DAV.</p>
<p>There are four predefined DAV accounts.</p>
<ul>
      <li>User &quot;dav&quot; is the most powerful DAV account.</li>
      <li>
DAV group &quot;administrators&quot; usually consists of &quot;dav&quot; only; membership in this group does not give any special privileges
but this group is assigned by default to resources that are owned by &quot;dav&quot;.
Thus group access rights to resources owned by &quot;dav&quot; can be used solely by
users that are added to &quot;administrators&quot;.</li>
      <li>User &quot;nobody&quot; is a special account that acts as owner of all resources that have no real owner person or owner application.
It is impossible to log on as &quot;nobody&quot; so it&#39;s impossible to use owner permissions of the resource.
</li>
      <li>
Group account &quot;nogroup&quot; always consists of only one user &quot;nobody&quot;;
User &quot;nobody&quot; can not become a member of any other group.
It is impossible to add other users to &quot;nogroup&quot; or add &quot;nogroup&quot; to some role.
</li>
    </ul>
<div class="note">
<div class="notetitle">Note:</div>
<p>The WebDAV admin user &quot;dav&quot; can be deleted. However, after a server restart
  the initial setting of this account will be added again.</p>
</div>
<p>
<span class="important">
        <strong>Important:</strong> It is strongly recommended that the Virtuoso administrator
  change the default account password of the DAV administrative user after
  installation.</span>
</p>
<a name="davusrsbyhand" />
    <div class="example">
<div class="exampletitle">Manipulating WebDAV Users By Hand</div>
<div>
        <pre class="programlisting">
USER_CREATE (&#39;user&#39;, &#39;userpassword&#39;,
  vector (&#39;SQL_ENABLE&#39;, 0, &#39;DAV_ENABLE&#39;, 1, &#39;PERMISSIONS&#39;, &#39;110100000RR&#39;, &#39;DISABLED&#39;, 0));
</pre>
      </div>
<p>This will create a new account named &#39;user&#39; with password &#39;upwd&#39;, default
  permissions for new resources and collections created by the account will be &#39;110100000RR&#39;
  (equivalent of UNIX &#39;rw-r----&#39; permissions, recursive free-text indexing and metadata extraction)
  and the account is enabled and ready to use.</p>
<div>
        <pre class="programlisting">
DAV_ADD_USER (&#39;user&#39;, &#39;userpassword&#39;, &#39;110100000RR&#39;, 0, &#39;/DAV/home/user/&#39;,
  &#39;Full User Name&#39;, &#39;user@example.com&#39;, &#39;dav&#39;, &#39;davpassword&#39;);
</pre>
      </div>
<p>this will do almost the same but it will describe the user in more details and require no
DBA privileges -- only DAV password. In addition, DAV_ADD_USER () can both create a new user and
grant DAV permissions to an already existing SQL user.</p>
<p>The following statement is used to grant role &#39;administrators&#39; to the &#39;user&#39; account.</p>
<div>
        <pre class="programlisting">
      GRANT ADMINISTRATORS TO &quot;user&quot;;
</pre>
      </div>
<p>or</p>

<div>
        <pre class="programlisting">
      USER_GRANT_ROLE (&#39;user&#39;, &#39;administrators&#39;);
</pre>
      </div>
<p>The following will disable the account &#39;user&#39; until &#39;DISABLED&#39; option is returned
  to zero.</p>
<div>
        <pre class="programlisting">
    USER_SET_OPTION (&#39;user&#39;, &#39;DISABLED&#39;, 1);
</pre>
      </div>
<p>DAV access permissions can be revoked permanently:</p>
<div>
        <pre class="programlisting">
    DAV_DELETE_USER (&#39;user&#39; , &#39;dav&#39;, &#39;davpassword&#39;);
</pre>
      </div>
</div>
<div class="tip">
<div class="tiptitle">See Also:</div>
<p>
<a href="systemtables.html#davsystables">WS &amp; DAV System Tables</a>
</p>
</div>
<br /> 

<a name="davauth" />
    <h3>17.1.3. WebDAV Authentication</h3>
<p>Virtuoso WebDAV offers two types of authentication dependent on the
 connecting clients abilities.  These are:</p>
<ul>
      <li>
        <strong>Basic (Clear Text) Authentication</strong> - sends
	 passwords over the connection in clear text. Clear text passwords can be
	 intercepted and read so should be avoided or used only if you encrypt
	 passwords through SSL.</li>
      <li>
        <strong>Digest Authentication</strong> - passwords are always transmitted in an MD5 hash.</li>
    </ul>

<a name="davbasicauth" />
    <h4>17.1.3.1. Basic Authentication</h4>
<p>Basic Authentication is a widely used, industry-standard method for
 collecting user name and password information.  The following steps outline
 how a client is authenticated using Basic authentication:</p>
<ol>
      <li>The client browser displays a dialog box for a user to enter
  a user name and password (his/her credentials).</li>
      <li>The client browser then attempts to establish a connection to
  the server using the user&#39;s credentials. The clear text password is
  Base64-encoded before it is sent over the network.</li>
      <li>If a user&#39;s credentials are rejected, the client may re-display
  the authentication dialog box to re-enter the user&#39;s credentials.  Failing
  to supply correct details will terminate the connection, reporting an
  error to the user. </li>
      <li>When Virtuoso verifies that the user name and password are
  valid, a connection is established.</li>
    </ol>
<p>The advantage of Basic authentication is that most clients support it.
 The disadvantage is that it transmits passwords in an unencrypted form.
 Simple network monitoring can easily reveal your password.  Basic
 authentication is not recommended unless you are confident that the
 connection between the user and Virtuoso is secure. </p>
<div class="note">
<div class="notetitle">Note:</div>
<p>Base64 encoding is not encryption.  A Base64-encoded password can be
	easily intercepted by a network sniffer and easily decoded.</p>
</div>
<br />

<a name="davdigestauth" />
    <h4>17.1.3.2. Digest Authentication</h4>
<p>Digest authentication provides a security improvement over Basic
 authentication in how a user&#39;s credentials are sent across the network.
 Digest authentication transmits credentials across the network as an MD5 hash,
 or message digest, where the original username and password cannot be
 deciphered from the hash.  Digest authentication relies on the HTTP 1.1
 protocol as defined in RFC 2617, which not all browsers support.</p>
<p>The following steps outline how a client is authenticated using Digest authentication:</p>
<table class="figure" border="0" cellpadding="0" cellspacing="0">
    <tr>
     <td>
          <img alt="Digest Authentication" src="../images/digestauth.jpg" />
     </td>
    </tr>
    <tr>
        <td>Figure: 17.1.3.2.1. Digest Authentication</td>
    </tr>
    </table>
<ol>
      <li>The client requests a file or connection from Virtuoso.</li>
      <li>Virtuoso challenges the request, informing that client: Digest is in use, what the realm name is.</li>
      <li>The client prompts the user for credentials.  The client creates an MD5 hash of the credentials and the realm name and resubmits the request, this time supplying the MD5 hash.</li>
      <li>If Virtuoso approves the credentials then the resource or connection is granted to the client, and the data is returned.</li>
    </ol>
<br />
<br />

<a name="davsymboliclinks" />
    <h3>17.1.4. WebDAV Symbolic Links</h3>
<p>Virtuoso supports a special type of WebDAV resources, a redirect
  reference resource, named WebDAV links.  This is to extend the WebDAV service
  to allow multiple access paths to existing resources.</p>
<p>As with conventional HTTP, the redirect reference simply responds to the client 
  with an HTTP/1.1 302 (Found) status code, redirecting the client to a different
  resource, the target specified in the redirect resource, using the 
  <span class="computeroutput">Location:</span> header.  This behavior is equivalent
  to UNIX symbolic links.  A redirect reference makes it possible to
  access the target resource indirectly through any URI mapped to the redirect
  reference resource.  The integrity is not guaranteed for associated redirect
  reference resources.</p>
  <p>WebDAV links do not provide a way to circumvent WebDAV security or 
  virtual directories.  The target resource must be directly available to the 
  client being redirected.</p>
  <p>WebDAV links are achieved by adding a special WebDAV property, 
  &#39;<span class="computeroutput">redirectref</span>&#39;, whose value 
  must contain the reference target URL.</p>
  <p>WebDAV link targets are not limited to the WebDAV repository, and may 
  target any HTTP accessible resource.</p>
  <p>The WebDAV links can be made with DAV API function 
  <a href="fn_dav_api_change.html">DAV_PROP_SET()</a>,
  or can be done via the <a href="htmlconductorbar.html#contentmanagement">Content Management</a>
  interface of the Admin UI.  In the admin UI select
  WebDAV/WebDAV Services/Content Management and press on the
  <strong>Create Link</strong> button to create a link.  In the form choose
  the target, permissions, owner and enter the name of the link.  Pressing
  the <strong>Add</strong> button will create the new link in the current
  WebDAV folder.</p>

  <a name="ex_create_webdav_link" />
    <div class="example">
      <div class="exampletitle">WebDAV Links Programmatically</div>
  <p>Assuming that we are creating the link as the administrator 
  using the default WebDAV administrator username and password, creating a link 
  from <span class="computeroutput">/a/b.html</span> to <span class="computeroutput">/c/d/f.html</span> 
  could be as follows:</p>
  <div>
        <pre class="programlisting">
SQL&gt; select DAV_RES_UPLOAD (&#39;/DAV/a/b.html&#39;,&#39;&#39;,&#39;&#39;,&#39;110100000NN&#39;, &#39;dav&#39;, &#39;nobody&#39;, &#39;dav&#39;, &#39;dav&#39;);

SQL&gt; DAV_PROP_SET (&#39;/DAV/a/b.html&#39;, &#39;redirectref&#39;, &#39;/c/d/f.html&#39;, &#39;dav&#39;, &#39;dav&#39;);
</pre>
      </div>
  <p>The target, &#39;<span class="computeroutput">/c/d/f.html</span>&#39; could be 
  any HTTP URL.  In this case it will be a resource on the same HTTP server.</p>
</div>

<div class="tip">
      <div class="tiptitle">See Also:</div>
<p>
        <a href="fn_dav_api_add.html">DAV Add and Update functions</a> and 
  <a href="fn_dav_api_change.html">DAV Manipulation functions</a>.</p>
</div>

<div class="formalpara">
      <strong>WebDAV links behaviour in resource manipulation requests</strong>
<p>When some
  link is moved the target will have the same properties as source, ie. it will
  be a link.  When a copy operation is made the target will have content of
  the reference i.e. it will be a resource, not a link.  Delete operation on
  link will remove only the redirect reference resource, not the referenced
  target itself.  Content upload requests will change the content of the
  referenced target.</p>
</div>
<br />

<a name="accesspermofwebres" />
    <h3>17.1.5. Access Right Permissions of Web Resources</h3>
<p>
The WebDAV resources have two sorts of access right permissions.
&#39;Classical&#39; UNIX filesystem style permissions let assign different permissions for owner user, owner group and public access.
Access Control Lists (ACLs) let assign permissions in more flexible Windows style but they are less convenient for simple tasks.
Both set of permissions can be applied to the same resource or collection.
In any case, each resource or collection (directory/folder) can have defined Read, Write and Execute permissions.
The write permission applies to operations which perform content or property
change or locking as PUT, PROPPATCH, MOVE, destination URI in COPY, LOCK, UNLOCK, DELETE, MPUT and MUPDATE.
The read permission applies to read operations as GET, POST, PROPFIND, HEAD, source URI in COPY and MGET;
read permission is also required for any write operation.
</p>
<div class="tip">
<div class="tiptitle">See Also</div>
<p>
        <a href="http://www.rfc-editor.org/rfc/rfc2518.txt">RFC2518</a>
for more details of methods/operations</p>
</div>
<p>
The execute permission applies only to the active content stored in the WebDAV
domain. If a VSP or VSPX page stored in a WebDAV domain has execute permissions
then retrieval of that page will perform execution of active content.  Note also a
special flag to the virtual directory which can override the execution flags for
active pages. (for the details how this flag can be set see &#39;options&#39; in
VHOST_DEFINE() function). If such a flag is set to the virtual directory, then
all active pages under that directory (direct and indirect children) will be treated
as execution flag of the resource is set. In almost any case, user should have both read
and execute permissions to access active content.
</p>
<p>
Resources with the following extensions are treated as executable content: .vsp, .vspx, .xml  if this has the XML template properties set.
Any other extension is also considered executable if there is a corresponding WS.WS.&quot;__http_handler_&lt;extension&gt;&quot; PL procedure.
</p>
<p>
The UNIX style permissions can be set for user, group or public access.
ACL consists of records called Access Control Entries (ACEs). Every ACE allow or deny some sorts of access to an individual user or to a group.
Resource owner or administrator can add an &quot;explicit&quot; ACE to the ACL of particular resource or &quot;recursively&quot;
add &quot;implicit&quot; ACEs to every resource and subcollection of some collection.
The server checks permissions in the following order:
</p>
<ol>
      <li>match the user part of UNIX-style permissions to the specific operation, if user is the
owner of the resource.</li>
      <li>match the user group part of UNIX-style permissions to the specific operation, if user
belongs to a group which owns the  resource.</li>
      <li>match the public part of UNIX-style permissions to the specific operation.</li>
      <li>If Access Control List is not empty, scan ACEs from the beginning of the list to the end.
The loop stops at the first ACE that mentions either the user in question or one of the roles granted to it.
Depending on the type of the ACE, the access is either granted or denied and the rest of list has no effect.</li>
      <li>If ACL contains no appropriate ACE then the access is denied.</li>
    </ol>
<p>
According to these rules, the order of records in ACL is important. ACEs are ordered following two rules:
&quot;deny&quot; ACEs has higher priority than &quot;allow&quot; ACEs; &quot;local&quot; rules has higher
priority that &quot;global&quot;:
</p>
<ol>
      <li>All explicit ACEs are placed in a group before any inherited ACEs.</li>
      <li>Within the group of explicit ACEs, access-denied ACEs are placed before access-allowed ACEs.</li>
      <li>Inherited ACEs are placed in the order in which they are inherited. ACEs inherited from the child object&#39;s parent come first, then ACEs inherited from the grandparent, and so on up the tree of objects.</li>
      <li>For each level of inherited ACEs, access-denied ACEs are placed before access-allowed ACEs.</li>
    </ol>
<p>
New resources and collections take their initial permissions from the user default permissions mask, U_DEFAULT_PERMS of SYS_USERS.
(see: <a href="">WebDAV Users Administration</a>).
In the case of a resource created as public or a collection mask of &#39;110110110&#39; (equivalent of UNIX &#39;rw-rw-rw&#39;),
then everybody can read and write it.
</p>
<a name="" />
    <div class="example">
<div class="exampletitle">WebDAV Permissions</div>
<p>
Consider a resource with the following permissions:
</p>
<div>
        <pre class="screen">
&#39;111110100&#39;
</pre>
      </div>
<p>
This permission string is equivalent to UNIX &#39;rwxrw-r--&#39;.
The resource can be executed, read and written to by the owner, group members can read
and write to it, and non authenticated (public) users or users not belonging to
the group group can only read it.
</p>
</div>
<p>
Every resource or collection has two additional flags in permissions, that instruct the server whether resources should
be indexed for free-text search and whether resources should be parsed to extract metadata:
</p>
<p>
Free-text indexing flag can take one of three values: &quot;N&quot;, &quot;R&quot; and &quot;T&quot;.
If a resource has this flag set to R or T then the resource will be free-text indexed.
If a collection has this flag set to T then resources directly contained within the collection will be free-text indexed.
If a collection has this flag set to R then resources contained within the
collection will be free-text indexed, and the setting will be applied to all
members and collections underneath recursively.  New resources and collections
acquire this setting from their parent collection.
</p>
<p>
Similarly, metadata extraction flag can take one of three values: &quot;N&quot;, &quot;R&quot; and &quot;M&quot;.
If a resource has this flag set to R or M then its metadata are extracted.
If a collection has this flag set to T then metadata are extracted from resources directly contained within the collection.
If a collection has this flag set to R then metadata are extracted from resources contained within the
collection, and the setting will be applied to all
members and collections underneath recursively.  New resources and collections
acquire this setting from its parent collection.
</p>
<br />



<a name="davrdfmetadata" />
    <h3>17.1.6. DAV and RDF Metadata</h3>


<p>
When a Virtuoso server has a URIQA default host setting, it will make
metadata extracted from DAV resources available for querying via
SPARQL.  All metadata for public readable DAV resources are stored in
a system graph.  The graph IRI is composed from the DAV path of the
resource and the URIQA default host name.</p>

<p>

see DefaultHost in the URIQA section of the virtuoso.ini file,
described in the URIQA section of the documentation for details on
configuration.</p>

<p>
The automatic maintenance of the SPARQL queryable metadata can be
disabled and enable using the function
DB.DBA.DAV_REPLICATE_ALL_TO_RDF_QUAD.  An argument of 1 enables this
and a 0 disables this. The setting stays in effect until it is changed
with the same function.  For new database, the feature is on by
default.  Old databases are by default upgraded to have a SPARQL
queryable DAV metadata graph upon startup if the URIQA default host
name is defined.</p>

<p>
If the URIQA default host name changes, the RDF graph can be updated
by simply re-enabling the feature.  This will adjust the graph and
resource IRI&#39;s.</p>

<p>
If the URIQA default name of the host is localhost:1113, then, the
graph will be http://localhost:1113/DAV .</p>

<p>
The IRI&#39;s of DAV resources will be  like http://localhost:1113/DAV/docsrc/XMLDOM.xml , meaning that these are directly usable from a user agent for accessing the resource.</p>

<p>
</p>

<p>
<span class="computeroutput">

SQL&gt; sparql select ?s ?o from &lt;http://localhost:1113/DAV&gt; where {?s &lt;http://www.openlinksw.com/schemas/DAV#ownerUser&gt; ?o};
s                                                                                 o
VARCHAR                                                                           VARCHAR
_______________________________________________________________________________

http://localhost:1113/DAV/docsrc/2pc.xml                                          mailto:somebody@example.domain
http://localhost:1113/DAV/docsrc/Virtdocs.spp                                     mailto:somebody@example.domain


SQL&gt; sparql select ?p ?o from &lt;http://localhost:1113/DAV&gt; where {&lt;http://localhost:1113/DAV/docsrc/2pc.xml&gt; ?p ?o};
p                                                                                 o
VARCHAR                                                                           VARCHAR
_______________________________________________________________________________

http://purl.org/dc/terms/created                                                  2006-05-23 15:10:32
http://purl.org/dc/terms/modified                                                 2006-05-23 15:10:32
http://www.openlinksw.com/schemas/DAV#ownerUser                                   mailto:somebody@example.domain
03http://purl.org/dc/terms/extent                                                   7850

</span>
</p>

<p>
The examples above show how simple SPARQL queries can be used to retrieve information about DAV resources.</p>

<p>
</p>

<p>
The properties supported for all public readable resources are:</p>

<p>
http://purl.org/dc/terms/created  - The creation date as SQL datetime.</p>

<p>
http://purl.org/dc/terms/modified  - Modification time as SQL datetime.</p>

<p>
http://www.openlinksw.com/schemas/DAV#ownerUser  - The contents of u_e_mail  in sys_users for the SQL account owning the resource.  This has the protocol prefix mailto:, as in mailto:somebody@example.com.</p>

<p>
http://purl.org/dc/terms/extent                                                    The size of the resource in bytes as a SQL integer.</p>

<p>
http://www.openlinksw.com/schemas/DAV#tag - There is one triple  for each  public tag of the DAV resource.  The value is the string of the tag as a SQL string.</p>

<p>
http://www.w3.org/1999/02/22-rdf-syntax-ns#type - The RDF schema for MIME-type of of the DAV resource.  If the resource is not recognized as one of the below, this predicate will be omitted.</p>

<table class="data">
	<caption>Table: 17.1.6.1. RDF Schema by  MIME-type</caption>
	
		
		
			<tr>
				<th class="data">MIME- ype</th>
				<th class="data">RDF Schema</th>
			</tr>
		
		
			<tr>
				<td class="data">application/bpel+xml</td>
				<td class="data">http://www.openlinksw.com/schemas/WSDL#</td>
			</tr>
			<tr>
				<td class="data">application/doap+rdf</td>
				<td class="data">http://www.openlinksw.com/schemas/doap#</td>
			</tr>
			<tr>
				<td class="data">application/foaf+xml</td>
				<td class="data">http://xmlns.com/foaf/0.1/</td>
			</tr>
			<tr>
				<td class="data">application/google-kinds+xml</td>
				<td class="data">http://www.openlinksw.com/schemas/google-kinds#</td>
			</tr>
			<tr>
				<td class="data">application/license</td>
				<td class="data">http://www.openlinksw.com/schemas/OplLic#</td>
			</tr>
			<tr>
				<td class="data">application/mods+xml</td>
				<td class="data">http://www.openlinksw.com/schemas/MODS#</td>
			</tr>
			<tr>
				<td class="data">application/msexcel</td>
				<td class="data">http://www.openlinksw.com/schemas/Office#</td>
			</tr>
			<tr>
				<td class="data">application/mspowerpoint</td>
				<td class="data">http://www.openlinksw.com/schemas/Office#</td>
			</tr>
			<tr>
				<td class="data">application/msproject</td>
				<td class="data">http://www.openlinksw.com/schemas/Office#</td>
			</tr>
			<tr>
				<td class="data">application/msword</td>
				<td class="data">http://www.openlinksw.com/schemas/Office#</td>
			</tr>
			<tr>
				<td class="data">application/msword+xml</td>
				<td class="data">http://www.openlinksw.com/schemas/Office#</td>
			</tr>
			<tr>
				<td class="data">application/opml+xml</td>
				<td class="data">http://www.openlinksw.com/schemas/OPML#</td>
			</tr>
			<tr>
				<td class="data">application/pdf</td>
				<td class="data">http://www.openlinksw.com/schemas/Office#</td>
			</tr>
			<tr>
				<td class="data">application/rdf+xml</td>
				<td class="data">http://www.openlinksw.com/schemas/RDF#</td>
			</tr>
			<tr>
				<td class="data">application/rss+xml</td>
				<td class="data">http://purl.org/rss/1.0/</td>
			</tr>
			<tr>
				<td class="data">application/wsdl+xml</td>
				<td class="data">http://www.openlinksw.com/schemas/WSDL#</td>
			</tr>
			<tr>
				<td class="data">application/x-openlink-image</td>
				<td class="data">http://www.openlinksw.com/schemas/Image#</td>
			</tr>
			<tr>
				<td class="data">application/x-openlink-photo</td>
				<td class="data">http://www.openlinksw.com/schemas/Photo#</td>
			</tr>
			<tr>
				<td class="data">application/x-openlinksw-vad</td>
				<td class="data">http://www.openlinksw.com/schemas/VAD#</td>
			</tr>
			<tr>
				<td class="data">application/x-openlinksw-vsp</td>
				<td class="data">http://www.openlinksw.com/schemas/VSPX#</td>
			</tr>
			<tr>
				<td class="data">application/x-openlinksw-vspx+xml</td>
				<td class="data">http://www.openlinksw.com/schemas/VSPX#</td>
			</tr>
			<tr>
				<td class="data">application/xbel+xml</td>
				<td class="data">http://www.python.org/topics/xml/xbel</td>
			</tr>
			<tr>
				<td class="data">application/xbrl+xml</td>
				<td class="data">http://www.openlinksw.com/schemas/xbrl#</td>
			</tr>
			<tr>
				<td class="data">application/xddl+xml</td>
				<td class="data">http://www.openlinksw.com/schemas/XDDL#</td>
			</tr>
			<tr>
				<td class="data">application/zip</td>
				<td class="data">http://www.openlinksw.com/schemas/Archive#</td>
			</tr>
			<tr>
				<td class="data">text/directory</td>
				<td class="data">http://www.w3.org/2001/vcard-rdf/3.0#</td>
			</tr>
			<tr>
				<td class="data">text/eml</td>
				<td class="data">http://www.openlinksw.com/schemas/Email#</td>
			</tr>
			<tr>
				<td class="data">text/html</td>
				<td class="data">http://www.openlinksw.com/schemas/XHTML#</td>
			</tr>
			<tr>
				<td class="data">text/wiki </td>
				<td class="data">http://www.openlinksw.com/schemas/Wiki#</td>
			</tr>
		
	
</table>
    <br />

	<p>
Additional predicates may  exist as a result of resource type specific metadata extraction. </p>

<br />


<a name="customattofwebres" />
    <h3>17.1.7. Special Attributes of Web Resources</h3>
<p>The Virtuoso WebDAV implementation provides a set of special attributes (properties)
  for the resources to manipulate the retrieval of XML documents.  Properties can be
  set generate dynamic content based on XML/SQL queries.   Special properties
  can also be applied to WebDAV folders for storing XML data in a special pre-parsed persistent XML format. </p>
<p>The following special properties are supported:</p>
<ul>
<li>
<div class="formalpara">
<strong>xml-stylesheet</strong>
<p>must contain a valid URL to an XSLT
  style sheet.  Upon request of an XML document with this property set,
  the WebDAV server will automatically perform the transformation of the XML document and will
  send the result of transformation to the user-agent instead of the original XML source.  This
  property is only settable for documents having MIME type text/xml.</p>
</div>
</li>
<li>
<div class="formalpara">
<strong>xml-sql</strong>
<p>must contain a valid
  XML/SQL query (see also: <a href="forxmlforsql.html">FOR XML statements</a>).  When this
  property is set the server will execute the query and the XML result will be sent to
  the client.  Note that if xml-stylesheet is also supplied for this resource the
  result will be transformed and then sent to the client.</p>
</div>
</li>
<li>
<div class="formalpara">
<strong>xml-sql-root</strong>
<p>specifies the root element
  name of automatically generated XML resources when xml-sql is specified.  Otherwise
  it has no effect.</p>
</div>
</li>
<li>
<div class="formalpara">
<strong>xml-sql-dtd</strong>
<p>can be specified as a string
  value &#39;on&#39; or valid URL.  When the value is &#39;on&#39; the DTD declaration will be implied
  in the automatically generated XML resource. Otherwise when the URL is supplied
  this URL will be included in the DTD declaration of the automatically generated XML
  resource.  If xml-sql is not specified this property has no effect.</p>
</div>
</li>
<li>
<div class="formalpara">
<strong>xml-sql-schema</strong>
<p>specifies the URI for the
  XML Schema.  This schema URI will be included in the XML header, to allow
  client-side schema validation.  If xml-sql is not specified this property has no effect.</p>
</div>
</li>
<li>
<div class="formalpara">
<strong>xper</strong>
<p>can be specified for a collection (folder).
  When this property is set on a WebDAV collection, the direct resource members will be
  stored and updated as persistent XML.  Note that existing resources will not be changed
  until they are  updated.  The reversal of this property for collections will not change
  the resources at the same time, they will be reverted to the text/xml storage on first
  update operation.  Resources already stored as XML persistent documents also have the
  xper property set, but manipulation  of this property must not be used to revert the storage.</p>
</div>
</li>
</ul>
<br />
<table border="0" width="90%" id="navbarbottom">
    <tr>
        <td align="left" width="33%">
          <a href="internetservices.html" title="Internet Services">Previous</a>
          <br />Contents of Internet Services</td>
     <td align="center" width="34%">
          <a href="internetservices.html">Chapter Contents</a>
     </td>
        <td align="right" width="33%">
          <a href="uriqa.html" title="URIQA Semantic Web Enabler">Next</a>
          <br />URIQA Semantic Web Enabler</td>
    </tr>
    </table>
  </div>
  <div id="footer">
    <div>Copyright© 1999 - 2009 OpenLink Software All rights reserved.</div>
   <div id="validation">
    <a href="http://validator.w3.org/check/referer">
        <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" />
    </a>
    <a href="http://jigsaw.w3.org/css-validator/">
        <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" />
    </a>
   </div>
  </div>
 </body>
</html>