1<!--
2If you move this file, you must update the package rules file at
3build/jam/packages/NetFS to reflect the new location. Otherwise the package will
4not build.
5-->
6<html>
7<head>
8<title>NetFS</title>
9<style>
10.code {
11	font-family: monospace;
12	background: #eee;
13	border: 1px solid black;
14	whitespace: pre;
15	padding: 1em;
16}
17span.code {
18	padding: 0;
19	border: 0;
20}
21</style>
22</head>
23<body>
24
25<h1 align="center">NetFS</h1>
26
27<hr />
28
29<h2 align="center">Client</h2>
30
31<p>To run the client, execute the following at the command line:</p>
32
33<pre class="code">
34$ netfs_mount
35</pre>
36
37<p>A "Network" icon will appear on your desktop, containing remote servers
38identified by host name. Inside the folder for each server are the shares on
39that server.</p>
40
41<p>You can also run the steps individually:</p>
42
43<pre class="code">
44$ /system/servers/authentication_server &amp;
45$ mkdir /network
46$ mount -t userlandfs -p "netfs" /network
47</pre>
48
49<hr />
50
51<h2 align="center">Server</h2>
52
53<p>To run the server:</p>
54
55<pre class="code">
56$ netfs_server_prefs launch
57</pre>
58
59<p>You can also start the server directly if you prefer.</p>
60
61<pre class="code">
62$ /system/servers/netfs_server &amp;
63</pre>
64
65<p>The server will then run until you shut down your computer, but it is also
66possible to stop it manually.</p>
67
68<pre class="code">
69$ netfs_server_prefs terminate
70</pre>
71
72<p>Once the server is running, you can define shared folders. The first step is
73to create a user who can access those folders, optionally with a password.</p>
74
75<pre class="code">
76$ netfs_server_prefs add user &lt;name&gt; [&lt;password&gt;]
77</pre>
78
79<p>Next create a shared folder and assign a user some permissions on it.</p>
80
81<pre class="code">
82$ netfs_server_prefs add share &lt;name&gt; &lt;path&gt;
83$ netfs_server_prefs permissions &lt;user&gt; &lt;share&gt; <flags>
84</pre>
85
86<p><span class="code">name</span> is the name that will appear to clients when
87they connect to your server.  <span class="code">flags</span> is one or more of:
88<span class="code">m</span> = mount, <span class="code">r</span> = read, <span
89class="code">w</span> = write, <span class="code">q</span> = query.</p>
90
91<p>Don't forget to save your settings.</p>
92
93<pre class="code">
94$ netfs_server_prefs save
95</pre>
96
97<p>The <span class="code">netfs_server_prefs</span> tool can also list and
98remove users and shares. See the help for details.</p>
99
100<pre class="code">
101$ netfs_server_prefs --help
102</pre>
103
104<hr />
105
106<h2 align="center">Fallback Settings File</h2>
107
108<p>The settings file is stored in a binary format, but if it is missing or
109damaged, the server will use a fallback settings file, which has a text-based
110format. This file must be located at <span
111class="code">/boot/home/config/settings/netfs/netfs_server_fallback</span>. (If
112neither the main settings file nor the fallback settings file can be loaded, the
113server will have no users or shares defined.)
114
115<p>Here is an example of a fallback settings file.</p>
116
117<pre class="code">
118# users
119user bonefish {
120	password	password
121}
122
123# user without a password
124user anonymous
125
126# shares
127share ttttt {
128	path /boot/home/Desktop/ttttt
129	user bonefish {
130		permissions	mount query read write
131	}
132}
133
134share sub-ttttt {
135	path /boot/home/Desktop/ttttt/rmessage
136	user bonefish {
137		permissions	mount query read write
138	}
139	user anonymous {
140		permissions	mount query read
141	}
142}
143</pre>
144
145</body>
146
147