Skip to content

Commit 6c0245a

Browse files
mercibeduncdrum
authored andcommitted
Added information about davfs2 usage (#277)
* Added information about davfs2 usage * Programlisting content moved in external linked text files Java commands are now wrapped in <literal/> tags * Remove XML editor transformation outputs * Restore original formatting
1 parent 4b86312 commit 6c0245a

File tree

4 files changed

+97
-36
lines changed

4 files changed

+97
-36
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# webdav tweaks for davfs2
2+
wrapper.java.additional.7=-Dorg.exist.webdav.PROPFIND_METHOD_XML_SIZE=EXACT
3+
wrapper.java.additional.8=-Dorg.exist.webdav.GET_METHOD_XML_SIZE=EXACT
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sudo systemctl stop eXist-db
2+
sudo systemctl disable eXist-db
3+
sudo systemctl daemon-reload
4+
sudo systemctl reset-failed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sudo /opt/eXist-db/tools/yajsw/bin/installDaemon.sh
2+
sudo systemctl enable eXist-db

src/main/xar-resources/data/webdav/webdav.xml

Lines changed: 88 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@
33
schematypens="http://purl.oclc.org/dsdl/schematron"?><article xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
44
<info>
55
<title>WebDAV</title>
6-
<date>1Q18</date>
6+
<date>4Q2018</date>
77
<keywordset>
88
<keyword>getting-started</keyword>
99
<keyword>interfaces</keyword>
1010
</keywordset>
1111
</info>
12-
12+
1313
<!-- ================================================================== -->
14-
14+
1515
<para>eXist-db ships with a <link xlink:href="http://en.wikipedia.org/wiki/WebDAV" condition="_blank">WebDAV</link> interface.
1616
WebDAV makes it possible to manage database collections and documents just like directories and
1717
files in a file system. You can copy, move, delete, view or edit files with any application
1818
supporting the WebDAV protocol, including Windows Explorer, macOS Finder, <link xlink:href="http://www.webdav.org/cadaver" condition="_blank">cadaver</link>, <link xlink:href="http://www.konqueror.org/" condition="_blank">KDE Konqueror</link>, <link xlink:href="http://www.oxygenxml.com/" condition="_blank">oXygen XML Editor</link>, <link xlink:href="http://www.altova.com/" condition="_blank">XML Spy</link>, <link xlink:href="http://www.libreoffice.org/" condition="_blank">LibreOffice</link> and many others (see <xref linkend="compatibility"/>
1919
below).</para>
2020
<para>In the default configuration the WebDAV server can be accessed via the URLs <link xlink:href="http://localhost:8080/exist/webdav/db/">http://localhost:8080/exist/webdav/db/</link> and <link xlink:href="https://localhost:8443/exist/webdav/db/">https://localhost:8443/exist/webdav/db/</link> (since eXist-db 2.0). </para>
21-
21+
2222
<!-- ================================================================== -->
23-
23+
2424
<sect1 xml:id="compatibility">
2525
<title>Compatibility</title>
26-
26+
2727
<para>The <link xlink:href="http://milton.io" condition="_blank">Milton</link> project, on which eXist-db's WebDAV implementation is
2828
build, maintains a detailed WebDAV client compatibility list that describes a "Recipe for
2929
broad client compatibility." In case of any problems please read this document. Some
@@ -48,19 +48,19 @@
4848
(Linux), OxygenXML and LibreOffice.</para>
4949
<para>The following clients are reported to have issues: <link xlink:href="http://en.wikipedia.org/wiki/GVFS" condition="_blank">GVFS</link> (Nautilus) and <link xlink:href="http://www.netdrive.net/" condition="_blank">NetDrive</link>. However, this can change over time!</para>
5050
</sect1>
51-
51+
5252
<!-- ================================================================== -->
53-
53+
5454
<sect1 xml:id="clients">
5555
<title>Clients</title>
56-
57-
58-
56+
57+
58+
5959
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
60-
60+
6161
<sect2 xml:id="webfolders">
6262
<title>Windows Web Folders</title>
63-
63+
6464
<para>Out of the box, Windows has <emphasis>some</emphasis> native support for the WebDAV
6565
protocol, but there are some well-known issues. Please consult the following:</para>
6666
<itemizedlist>
@@ -76,9 +76,9 @@
7676
security.</para>
7777
</listitem>
7878
</itemizedlist>
79-
80-
81-
79+
80+
81+
8282
<para>To use WebDAV in Internet explorer:</para>
8383
<itemizedlist>
8484
<listitem>
@@ -96,16 +96,16 @@
9696
</listitem>
9797
</itemizedlist>
9898
</sect2>
99-
99+
100100
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
101-
101+
102102
<sect2 xml:id="macos">
103103
<title>macOS Finder</title>
104-
104+
105105
<para>The eXist-db database can be accessed easily with the macOS Finder using the
106106
<guimenuitem>Go, Connect to Server...</guimenuitem> menu. Use the eXist-db WebDAV URL
107107
<code>http://localhost:8080/exist/webdav/db/</code>.</para>
108-
108+
109109
<note>
110110
<para>In some previous MacOS releases, Apple repetitively changed their WebDAV
111111
implementation significantly, introducing new bugs and problems. The main issue is that
@@ -121,12 +121,12 @@
121121
the client does not work perfectly, for instance at bulk operations.</para>
122122
</note>
123123
</sect2>
124-
124+
125125
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
126-
126+
127127
<sect2 xml:id="oxygenxml">
128128
<title>oXygen XML Editor</title>
129-
129+
130130
<itemizedlist>
131131
<listitem>
132132
<para>Select <literal>File -&gt; Open URL</literal>.</para>
@@ -165,12 +165,64 @@
165165
on another folder or resource by mistake, you overwrite the wrong resource. </para>
166166
</warning>
167167
</sect2>
168-
168+
169169
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
170-
170+
171+
<sect2>
172+
<title>davfs2</title>
173+
<para>Recent eXist versions present by default, through WebDAV, the size of XML documents as a multiple of internal pagesize.
174+
This approximated size is not managed correctly by davfs2. You can list XML files (<code>ls -l</code>) but you cannot
175+
view or edit them. All other file types (plain text files, images, etc) are working as expected with davfs2.
176+
</para>
177+
<para>The following message is found in davfs2 logs (syslog/journalctl) :
178+
<errortext>Could not read response body: connection was closed by server</errortext>
179+
</para>
180+
<para>
181+
In order to access XML files stored in eXist from
182+
a mounted directory in a filesystem thanks to dafvs2, you have to add the following additional Java parameters
183+
when starting eXist : </para>
184+
185+
<itemizedlist>
186+
<listitem><para><literal>org.exist.webdav.PROPFIND_METHOD_XML_SIZE=EXACT</literal></para></listitem>
187+
<listitem><para><literal>org.exist.webdav.GET_METHOD_XML_SIZE=EXACT</literal></para></listitem>
188+
</itemizedlist>
189+
190+
<para>Please note that if eXist is installed as a service (systemd) the configuration has to be done in <filename>/tools/yajsw/conf/wrapper.conf</filename></para>
191+
192+
<programlisting xlink:href="listings/listing-2.txt"/>
193+
194+
<note><para><literal>NULL</literal> and <literal>APPROXIMATE</literal> values work for Oxygen and Cadaver but only <literal>EXACT</literal> can be used if davfs2 is needed.</para></note>
195+
196+
<para>These changes won't be taken into account if you do not uninstall the service <emphasis role="bold">before</emphasis>
197+
modifying <filename>wrapper.conf</filename>. The service must then be reinstalled :
198+
</para>
199+
200+
<orderedlist>
201+
<listitem>
202+
203+
<para>Uninstall (with service name <emphasis>eXist-db</emphasis>)</para>
204+
205+
<programlisting xlink:href="listings/listing-3.txt"/>
206+
207+
</listitem>
208+
<listitem>
209+
210+
<para>Reinstall and enable</para>
211+
212+
<programlisting xlink:href="listings/listing-4.txt"/>
213+
214+
</listitem>
215+
</orderedlist>
216+
217+
<note><para>Tested on davfs2 1.4.7 on RHEL7.5 and 1.5.4 on Arch Linux.</para></note>
218+
219+
</sect2>
220+
221+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
222+
171223
<sect2 xml:id="kde">
172224
<title>KDE Konqueror</title>
173-
225+
174226
<para>Enter an URL like <literal>webdav://localhost:8080/exist/webdav/db</literal>. Use
175227
<literal>webdavs://</literal> for WebDAV over SSL. </para>
176228
<informalfigure>
@@ -181,12 +233,12 @@
181233
</mediaobject>
182234
</informalfigure>
183235
</sect2>
184-
236+
185237
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
186-
238+
187239
<sect2 xml:id="libreoffice">
188240
<title>LibreOffice</title>
189-
241+
190242
<para>For LibreOffice and OpenOffice.org the recommended way for opening documents stored in
191243
eXist-db is using the 'native' WebDAV client, as documented in the <link xlink:href="http://help.libreoffice.org/Common/Opening_a_Document_Using_WebDAV_over_HTTPS" condition="_blank">LibreOffice Help</link> documentation.</para>
192244
<warning>
@@ -216,27 +268,27 @@
216268
</informalfigure>
217269
</sect2>
218270
</sect1>
219-
271+
220272
<!-- ================================================================== -->
221-
273+
222274
<sect1 xml:id="serialization">
223275
<title>Serialization</title>
224-
276+
225277
<para> When retrieving an XML document via the WebDAV interface, the default serialization
226278
settings as defined in <link xlink:href="configuration.xml#conf.xml">conf.xml</link> are used. It is however possible to
227279
define custom serialization settings specific for the WebDAV interface. </para>
228280
<para> Copy the file <literal>extensions/webdav/webdav.properties</literal> into
229281
<literal>$EXIST_HOME</literal> directory and uncomment/modify the parameters. Changes in
230282
this file requires a restart of eXist-db. </para>
231-
283+
232284
<programlisting language="xml" xlink:href="listings/listing-1.txt"/>
233285
</sect1>
234-
286+
235287
<!-- ================================================================== -->
236-
288+
237289
<sect1 xml:id="notes">
238290
<title>Notes</title>
239-
291+
240292
<para> From the <link xlink:href="https://github.com/eXist-db/exist/issues/1442" condition="_blank">community</link> we have received feedback that the WebDAV interface is not fully
241293
functional when it is accessed via a reverse proxy and a resource's path is altered (aliased)
242294
with it. </para>

0 commit comments

Comments
 (0)