]> Cypherpunks.ru repositories - nncp.git/commitdiff
Administration notes page
authorSergey Matveev <stargrave@stargrave.org>
Thu, 7 Jan 2021 13:49:03 +0000 (16:49 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 7 Jan 2021 14:28:12 +0000 (17:28 +0300)
doc/admin.texi [new file with mode: 0644]
doc/cfg.texi
doc/cmds.texi
doc/index.texi

diff --git a/doc/admin.texi b/doc/admin.texi
new file mode 100644 (file)
index 0000000..02c1579
--- /dev/null
@@ -0,0 +1,99 @@
+@node Administration
+@unnumbered Administration
+
+NNCP uses following files/directories you should be aware of:
+
+@itemize
+
+@item
+    @ref{Configuration} file, for example @file{/usr/local/etc/nncp.hjson}.
+    Should not be globally readable, because it contains private keys.
+
+@item
+    @ref{Spool} directory with inbound/outbound encrypted packets, for
+    example @file{/var/spool/nncp}.
+
+    It also contains temporary files (in @file{tmp/} directory),
+    possibly left alone, if some of the commands failed and prematurely
+    exited and that should be cleaned from time to time.
+
+    Partly transferred files are stored with @file{.part} suffix. And
+    possibly they also require cleanup if they are completely lost.
+
+    Also it can contain @file{.seen} files, that should be cleaned too
+    from time to time.
+
+    All of that cleaning tasks can be done with @ref{nncp-rm} utility.
+
+    @anchor{Shared spool}
+    If you want to share single spool directory with multiple grouped
+    Unix users, then you can @command{setgid} it and assure that umask
+    is group friendly. For convenience you can set @option{umask}
+    globally for invoked NNCP commands in the configuration file. For
+    example:
+
+@example
+$ chgrp nncp /usr/local/etc/nncp.hjson /var/spool/nncp
+$ chmod g+r /usr/local/etc/nncp.hjson
+$ chmod g+rwxs /var/spool/nncp
+$ echo 'umask: "007"' >> /usr/local/etc/nncp.hjson
+@end example
+
+@item
+    @ref{Log} file, for example @file{/var/spool/nncp/log}. It should be
+    rotated. Choose you own preferable way to do it.
+
+    Example @url{https://www.newsyslog.org/manual.html, newsyslog}'s entry:
+@example
+/var/spool/nncp/log            644     7       100     *       CYN
+@end example
+
+@item
+    Optional @ref{CfgIncoming, incoming} directories where uploaded
+    files are stored. Probably you want to run @ref{nncp-reass} from
+    time to time to reassemble all chunked uploads. Example crontab
+    entry:
+
+@example
+*/1    *       *       *       *       nncp-reass -all -noprogress
+@end example
+
+@item
+    Possibly long running @ref{nncp-daemon}, @ref{nncp-caller},
+    @ref{nncp-toss} daemons. As all software, they can fail and you
+    should place them under some supervisor control.
+
+    For example you can use @url{http://cr.yp.to/daemontools.html,
+    daemontools} for that task to run them under probably existing
+    @verb{|uucp|} user:
+
+@example
+# mkdir -p /var/service/nncp-toss/log
+# chmod 755 /var/service/nncp-toss/log /var/service/nncp-toss
+# cd /var/service/nncp-toss
+
+# cat > run_ <<EOF
+#!/bin/sh -e
+exec 2>&1
+exec setuidgid uucp /usr/local/bin/nncp-toss -cycle 10
+EOF
+# chmod 755 run_
+
+# cat > log/run_ <<EOF
+#!/bin/sh -e
+exec setuidgid uucp multilog t ./main
+EOF
+# chmod 755 log/run_
+
+# mv log/run_ log/run ; mv run_ run
+@end example
+
+@item
+    @ref{nncp-daemon} can also be run as
+    @url{https://en.wikipedia.org/wiki/Inetd, inetd} service on UUCP's port:
+
+@example
+uucp   stream  tcp6    nowait  nncpuser        /usr/local/bin/nncp-daemon      nncp-daemon -quiet -inetd
+@end example
+
+@end itemize
index 7ff63f30fd6e845367b24ae035a263918475fae0..f918385be8ed9e95555d3e8da69a5ab4eef0b2d5 100644 (file)
@@ -222,22 +222,3 @@ List of @ref{Call, call configuration}s. Can be omitted if
 @ref{nncp-caller} won't be used to call that node.
 
 @end table
-
-@menu
-* Shared spool directory: Shared spool.
-@end menu
-
-@node Shared spool
-@section Shared spool directory
-
-If you want to share single spool directory with multiple grouped Unix
-users, then you can @command{setgid} it and assure that umask is group
-friendly. For convenience you can set @option{umask} globally for
-invoked NNCP commands in the configuration file. For example:
-
-@example
-$ chgrp nncp /usr/local/etc/nncp.hjson /var/spool/nncp
-$ chmod g+r /usr/local/etc/nncp.hjson
-$ chmod g+rwxs /var/spool/nncp
-$ echo 'umask: "007"' >> /usr/local/etc/nncp.hjson
-@end example
index 75835acb5af4d56ea8cd4fcc80a82d8e208acc29..ab06f7a37c2bdcc7c1cd333e361b85dd1e0a5270 100644 (file)
@@ -268,7 +268,7 @@ $ nncp-exec [options] [-use-tmp] [-nocompress] NODE HANDLE [ARG0 ARG1 ...]
 Send execution command to @option{NODE} for specified @option{HANDLE}.
 Body is read from stdin (either into memory, or into encrypted temporary
 file if @option{-use-tmp} is specified) and compressed (unless
-@option{-nocompress} is specified}. After receiving, remote side will
+@option{-nocompress} is specified). After receiving, remote side will
 execute specified @ref{CfgExec, handle} command with @option{ARG*}
 appended and decompressed body fed to command's stdin.
 
index 165102ea9821251ba8a8df1fc045ff42792b9707..057995c6e1268f7c3fbae858c8a8e3cdcf20fd42 100644 (file)
@@ -45,6 +45,7 @@ There are also articles about its usage outside this website:
 * Call configuration: Call.
 * Integration::
 * Commands::
+* Administration::
 * Niceness::
 * Chunked files: Chunked.
 * Bundles::
@@ -68,6 +69,7 @@ There are also articles about its usage outside this website:
 @include call.texi
 @include integration.texi
 @include cmds.texi
+@include admin.texi
 @include niceness.texi
 @include chunked.texi
 @include bundles.texi