docs/ikteam: Delete most files.
[haiku.git] / docs / add-ons / NetFS.html
blob5c7b94d4186e1d5e3b8d71e338af7933b0dd40cf
1 <!--
2 If you move this file, you must update the package rules file at
3 build/jam/packages/NetFS to reflect the new location. Otherwise the package will
4 not 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;
17 span.code {
18 padding: 0;
19 border: 0;
21 </style>
22 </head>
23 <body>
25 <h1 align="center">NetFS</h1>
27 <hr />
29 <h2 align="center">Client</h2>
31 <p>To run the client, execute the following at the command line:</p>
33 <pre class="code">
34 $ netfs_mount
35 </pre>
37 <p>A "Network" icon will appear on your desktop, containing remote servers
38 identified by host name. Inside the folder for each server are the shares on
39 that server.</p>
41 <p>You can also run the steps individually:</p>
43 <pre class="code">
44 $ /system/servers/authentication_server &amp;
45 $ mkdir /network
46 $ mount -t userlandfs -p "netfs" /network
47 </pre>
49 <hr />
51 <h2 align="center">Server</h2>
53 <p>To run the server:</p>
55 <pre class="code">
56 $ netfs_server_prefs launch
57 </pre>
59 <p>You can also start the server directly if you prefer.</p>
61 <pre class="code">
62 $ /system/servers/netfs_server &amp;
63 </pre>
65 <p>The server will then run until you shut down your computer, but it is also
66 possible to stop it manually.</p>
68 <pre class="code">
69 $ netfs_server_prefs terminate
70 </pre>
72 <p>Once the server is running, you can define shared folders. The first step is
73 to create a user who can access those folders, optionally with a password.</p>
75 <pre class="code">
76 $ netfs_server_prefs add user &lt;name&gt; [&lt;password&gt;]
77 </pre>
79 <p>Next create a shared folder and assign a user some permissions on it.</p>
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>
86 <p><span class="code">name</span> is the name that will appear to clients when
87 they 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
89 class="code">w</span> = write, <span class="code">q</span> = query.</p>
91 <p>Don't forget to save your settings.</p>
93 <pre class="code">
94 $ netfs_server_prefs save
95 </pre>
97 <p>The <span class="code">netfs_server_prefs</span> tool can also list and
98 remove users and shares. See the help for details.</p>
100 <pre class="code">
101 $ netfs_server_prefs --help
102 </pre>
104 <hr />
106 <h2 align="center">Fallback Settings File</h2>
108 <p>The settings file is stored in a binary format, but if it is missing or
109 damaged, the server will use a fallback settings file, which has a text-based
110 format. This file must be located at <span
111 class="code">/boot/home/config/settings/netfs/netfs_server_fallback</span>. (If
112 neither the main settings file nor the fallback settings file can be loaded, the
113 server will have no users or shares defined.)
115 <p>Here is an example of a fallback settings file.</p>
117 <pre class="code">
118 # users
119 user bonefish {
120 password password
123 # user without a password
124 user anonymous
126 # shares
127 share ttttt {
128 path /boot/home/Desktop/ttttt
129 user bonefish {
130 permissions mount query read write
134 share sub-ttttt {
135 path /boot/home/Desktop/ttttt/rmessage
136 user bonefish {
137 permissions mount query read write
139 user anonymous {
140 permissions mount query read
143 </pre>
145 </body>