/usr/share/doc/dacs-examples/man/dacsvfs.1.html is in dacs-examples 1.4.38a-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | <!-- Copyright (c) 2003-2013 -->
<!-- Distributed Systems Software. All rights reserved. -->
<!-- See the file LICENSE for redistribution information. -->
<!-- $Id: copyright-html 2625 2013-01-22 18:15:12Z brachman $ -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>dacsvfs</title><link rel="stylesheet" type="text/css" href="css/dacsdocs.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div id="refentry" class="para16">
<script language="javascript" type="text/javascript" src="css/js/fontselector.js"></script>
<table width="100%"><tr>
<td align="left">
<b>DACSVFS(1)</b></td>
<td align="center">
<b>DACS Tools and Utilities</b></td>
<td align="right">
<b>DACSVFS(1)</b></td>
</tr></table>
<div class="refnamediv"><h2>NAME</h2><p>dacsvfs — access objects through the <span class="command"><strong>DACS</strong></span> virtual filestore</p></div><div class="refsynopsisdiv"><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p><code class="command">dacsvfs</code> [<em class="replaceable"><code><a class="ulink" href="dacs.1.html#dacsoptions" target="_top">dacsoptions</a></code></em>] [ <em class="replaceable"><code>item_type</code></em> | <em class="replaceable"><code>vfs_uri</code></em> | <code class="literal">enabled</code> ] [<code class="option">-F <em class="replaceable"><code>sep</code></em></code>] [<em class="replaceable"><code>op</code></em>
[<em class="replaceable"><code>arg</code></em>...]] </p></div></div><div class="refsect1"><a name="idm33"></a><h2>DESCRIPTION</h2><p>This program is part of the <span class="command"><strong>DACS</strong></span> suite.</p><p>The <span class="command"><strong>dacsvfs</strong></span> utility is an interface to
the <span class="command"><strong>DACS</strong></span> virtual filestore.
It provides a way to examine, change, and delete items independently
of how and where they are stored.
See
<a class="ulink" href="dacs.vfs.5.html" target="_top">dacs.vfs(5)</a> and the
<a class="ulink" href="dacs.conf.5.html#VFS" target="_top">VFS</a> directive for
additional information.
</p><p>To perform a virtual filestore operation,
either an <em class="parameter"><code>item_type</code></em>
or a URI argument must be provided to identify the filestore.
The former is used to find the applicable
<a class="ulink" href="dacs.conf.5.html#VFS" target="_top">VFS</a> directive that has
been configured for the specified jurisdiction
(see <a class="ulink" href="dacs.conf.5.html" target="_top">dacs.conf(5)</a>).
</p><p>As a special case, the word <code class="option">enabled</code> can be specified;
a list of enabled store names is printed to
<span class="symbol">stdout</span> and the program terminates:
</p><pre class="screen">
% dacsvfs -q -uj SomeJurisdiction enabled
</pre><p>
</p><p>This program is also available as a <span class="command"><strong>DACS</strong></span>
web service, <a class="ulink" href="dacs_vfs.8.html" target="_top">dacs_vfs(8)</a>.
</p><div class="important" style="margin-left: 0.125in; margin-right: 0.125in;"><h3 class="title"><a name="security1"></a>Security</h3><p>Only the <span class="command"><strong>DACS</strong></span> administrator should be able to
successfully run this program.
Because <span class="command"><strong>DACS</strong></span>
keys and configuration files must be limited to the administrator,
this will normally be the case, but a careful administrator will deny
access to all other users.
</p></div></div><div class="refsect1"><a name="idm58"></a><h2>OPTIONS</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-F <em class="replaceable"><code>sep</code></em></code></span></dt><dd><p>Sets the field separator character to
<em class="replaceable"><code>sep</code></em>.
The default is a colon.
This is used by the <code class="literal">load</code> and <code class="literal">dump</code>
operations.
</p></dd></dl></div><p>If present, the <em class="replaceable"><code>op</code></em> argument specifies the
operation to be performed on the filestore.
If it is omitted, the program enters interactive mode where most of
the same operations are available (type "<strong class="userinput"><code>help</code></strong>"
for assistance).
The following operations are available:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal">delete</code> [<em class="replaceable"><code>key</code></em>]</span></dt><dd><p>Delete the item, or the item identified by
<em class="replaceable"><code>key</code></em>.
</p></dd><dt><span class="term"><code class="literal">dump</code></span></dt><dd><p>Write to <span class="symbol">stdout</span> the contents of the
filestore as <em class="replaceable"><code>key</code></em>, followed by the field separator
character, followed by <em class="replaceable"><code>value</code></em>,
one pair per line.
</p></dd><dt><span class="term"><code class="literal">edit</code> [<em class="replaceable"><code>key</code></em>]</span></dt><dd><p>Interactively edit the item,
or the value of the item identified by <em class="replaceable"><code>key</code></em>.
When available, the environment variable <code class="envar">EDITOR</code> is used
to determine which editor to use, otherwise a default
editor specified at compile time is used.
After editing, the user is asked for confirmation.
If the operation is not aborted, the item or its value will be updated.
</p></dd><dt><span class="term"><code class="literal">exists</code> [<em class="replaceable"><code>key</code></em>]</span></dt><dd><p>Test if the item, or the item identified by
<em class="replaceable"><code>key</code></em>, exists.
The outcome is reported to <span class="symbol">stdout</span>.
</p></dd><dt><span class="term"><code class="literal">get</code> [<em class="replaceable"><code>key</code></em>]</span></dt><dd><p>Retrieve the item, or the value of the item identified by
<em class="replaceable"><code>key</code></em>.
If successful, the result is printed to <span class="symbol">stdout</span>.
</p></dd><dt><span class="term"><code class="literal">getsize</code> [<em class="replaceable"><code>key</code></em>]</span></dt><dd><p>Determine the size of the item, or the size of the value
of the item identified by
<em class="replaceable"><code>key</code></em>.
If successful, the result is printed to <span class="symbol">stdout</span>.
</p></dd><dt><span class="term"><code class="literal">help</code></span></dt><dd><p>Prints a usage summary to <span class="symbol">stderr</span>.
</p></dd><dt><span class="term"><code class="literal">list</code></span></dt><dd><p>Lists the names of all items (or keys) associated with the
<em class="parameter"><code>item_type</code></em>.
</p></dd><dt><span class="term"><code class="literal">load</code></span></dt><dd><p>Read key/value pairs from <span class="symbol">stdin</span>, one pair
per line.
The end of the key is denoted by the field separator character, which may
be repeated.
Whitespace may appear on either side of the field separator character
(unless the field separator is a whitespace character).
For each <em class="replaceable"><code>key</code></em> do a <code class="literal">put</code>
operation with the specified <em class="replaceable"><code>value</code></em>.
This is intended to be a quick way to initialize a filestore or
make many changes.
</p></dd><dt><span class="term"><code class="literal">put</code> [<em class="replaceable"><code>key</code></em>]</span></dt><dd><p>Replace the item, or the value of the item
identified by <em class="replaceable"><code>key</code></em>.
The value is read from the standard input.
</p></dd><dt><span class="term"><code class="literal">putval</code> <em class="replaceable"><code>key</code></em> <em class="replaceable"><code>value</code></em></span></dt><dd><p>Replace the item, or the value of the item
identified by <em class="replaceable"><code>key</code></em>, and set it to
<em class="replaceable"><code>value</code></em>.
</p></dd><dt><span class="term"><code class="literal">rename</code> [<em class="replaceable"><code>oldkey</code></em>] <em class="replaceable"><code>newkey</code></em></span></dt><dd><p>Rename the item, or the value of the item identified by
<em class="replaceable"><code>oldkey</code></em> to
<em class="replaceable"><code>newkey</code></em>.
</p></dd><dt><span class="term"><code class="literal">update</code> [<em class="replaceable"><code>key</code></em>]</span></dt><dd><p>This is a synonym for the <code class="literal">edit</code> operation.
</p></dd></dl></div></div><div class="refsect1"><a name="idm174"></a><h2>EXAMPLES</h2><p>To store the DTDs used by <span class="command"><strong>DACS</strong></span> in a database
rather than in a collection of files, you must configure an appropriate
<span class="property">VFS</span> directive and copy the files from the
<span class="command"><strong>DACS</strong></span> distribution into the database.
Because it is read-only, this database can be shared by all
federations and jurisdictions on the host.
</p><p>The first step is to select the type of database to use and
decide where to put it.
This example will use a Berkeley DB database
(<span class="command"><strong>DACS</strong></span> must have been built with support for whichever
database is used) and put it in
<code class="filename">/usr/local/dacs/federations/dtds.db</code>.
The URI to express this in the <span class="property">VFS</span> syntax looks
like this:
</p><pre class="programlisting">
[dtds]dacs-db:/usr/local/dacs/federations/dtds.db
</pre><p>
</p><p>The next step is to create the database and load it with the DTDs.
A simple shell script makes this easy to do.
From the <span class="directory">dtd-xsd</span> directory of the
<span class="command"><strong>DACS</strong></span> distribution,
and replacing <span class="domainname">example.com</span>
with the URI of a <span class="command"><strong>DACS</strong></span> jurisdiction on your host, execute:
</p><pre class="programlisting">
#! /bin/sh
for i in *.dtd
do
dacsvfs -u example.com -q \
'[dtds]dacs-db:/usr/local/dacs/federations/dtds.db' put $i < $i
done
</pre><p>
</p><p>To configure <span class="command"><strong>DACS</strong></span> to use the database,
a <span class="property">VFS</span> directive must be put in an appropriate
place in <code class="filename">dacs.conf</code> so that it overrides the
current configuration:
</p><pre class="programlisting">
VFS "[dtds]dacs-db:/usr/local/dacs/federations/dtds.db"
</pre><p>
To list the contents of the database you can do:
</p><pre class="programlisting">
% dacsvfs -u example.com -q \
'[dtds]dacs-db:/usr/local/dacs/federations/dtds.db' list
</pre><p>
or since the <span class="property">VFS</span> directive has been configured, simply:
</p><pre class="programlisting">
% dacsvfs -u example.com -q dtds list
</pre><p>
If you omit the <code class="option">-q</code> flag, various debugging output will
appear, including some feedback that your new database is actually being
used by <span class="command"><strong>DACS</strong></span>.
</p><div class="note" style="margin-left: 0.125in; margin-right: 0.125in;"><h3 class="title"><a name="note1"></a>Note</h3><p>If you copy
any <span class="command"><strong>DACS</strong></span> resources, such as
its DTDs, remember that when you upgrade your <span class="command"><strong>DACS</strong></span>
software you'll need to make new copies because these resources may have
changed.
</p></div><p>Other resources used by <span class="command"><strong>DACS</strong></span> would be
configured similarly.
The <code class="literal">load</code> and <code class="literal">dump</code> operations
can be particularly useful for this.
If the file <code class="filename">/tmp/roles</code> associates roles with
identities (e.g., as used by
<a class="ulink" href="dacscheck.1.html" target="_top">dacscheck(1)</a>) as follows:
</p><pre class="programlisting">
bobo:users
auggie:admin,users
harley:guest
</pre><p>
then the following command initializes or updates a database from that file:
</p><pre class="programlisting">
% dacsvfs -u example.com -q -F ":" \
'[myroles]dacs-db:/usr/local/myapp/roles.db' < /tmp/roles
</pre><p>
The URI
<code class="literal">[myroles]dacs-db:/usr/local/myapp/roles.db</code> can then
be used with <span class="command"><strong>dacscheck</strong></span>.
</p></div><div class="refsect1"><a name="idm215"></a><h2>DIAGNOSTICS</h2><p>The program exits <code class="literal">0</code> if everything was fine,
<code class="literal">1</code> if an error occurred.
</p></div><div class="refsect1"><a name="idm220"></a><h2>BUGS</h2><p>There should be a caching mechanism that could be used
with expensive storage types
(i.e., those that are relatively slow to access, such as the
<code class="literal">http</code> scheme).
</p></div><div class="refsect1"><a name="idm224"></a><h2>SEE ALSO</h2><p><a class="ulink" href="dacs_vfs.8.html" target="_top">dacs_vfs(8)</a>,
<a class="ulink" href="dacs.conf.5.html" target="_top">dacs.conf(5)</a>
</p></div><div class="refsect1"><a name="idm229"></a><h2>AUTHOR</h2><p>Distributed Systems Software
(<a class="ulink" href="http://www.dss.ca" target="_top">www.dss.ca</a>)
</p></div><div class="refsect1"><a name="idm233"></a><h2>COPYING</h2><p>Copyright 2003-2012 Distributed Systems Software.
See the
<a class="ulink" href="../misc/LICENSE" target="_top"><code class="filename">LICENSE</code></a>
file that accompanies the distribution
for licensing information.
</p></div>
<!-- Generated from $Id: dacsvfs.1.xml 2563 2012-02-07 22:40:41Z brachman $ -->
<table width="100%"><tr>
<td align="left">
<b>DACS Version 1.4.38a</b></td>
<td align="center">
<b> 2-Jun-2017</b></td>
<td align="right">
<b>DACSVFS(1)</b></td>
</tr></table>
<hr><p>
<!-- Begin font size selector -->
<table width="100%"><tr><td align="left">
<span class="set_font"><a href="index.html" title="Table of Contents">Table of Contents</a></span></td>
<td align="center"><span class="logo"><a href="http://www.dss.ca"><img src="/css/images/dss-long-14y.png" title="Distributed Systems Software, Inc."></a></span></td>
<td width="5%" align="right">
<div class="fontsize_label" title="Font size selector">Font:</div>
</td>
<td width="10%" align="left">
<!-- NB: must set both left margin and padding to work in all browsers-->
<!-- The onFocus code eliminates annoying post-click decoration -->
<ul id="fontsizecontainer" class="size02">
<li><a href="javascript:setFont('0');" onFocus="if(this.blur)this.blur()" title="Smallest text size [0]"><span>Z</span></a></li>
<li><a href="javascript:setFont('1');" onFocus="if(this.blur)this.blur()" title="Medium text size [1]"><span>Z</span></a></li>
<li><a href="JavaScript:setFont('2');" onFocus="if(this.blur)this.blur()" title="Large text size [2]"><span>Z</span></a></li>
<li><a href="JavaScript:setFont('3');" onFocus="if(this.blur)this.blur()" title="Largest text size [3]"><span>Z</span></a></li>
</ul>
</td>
<td width="3%" align="center">
<span class="set_font"><a href="javascript:setFont('-');" onFocus="if(this.blur)this.blur()" title="Decrease current font size">−−</a></span>
</td>
<td width="3%" align="center">
<span class="set_font"><a href="javascript:setFontConfig();" onFocus="if(this.blur)this.blur()" title="Remember current font size">Set</a></span>
</td>
<td width="3%" align="center">
<span class="set_font"><a href="javascript:setFont('+');" onFocus="if(this.blur)this.blur()" title="Increase current font size">++</a></span>
</td></tr></table>
<!-- End font size selector -->
<script language="javascript" type="text/javascript">
doFontConfig();</script>
</p><small><p><b> $Id: dacsvfs.1.xml 2563 2012-02-07 22:40:41Z brachman $</b></p></small>
</div></body></html>
|