3 @unnumbered Administration
5 NNCP uses following files/directories you should be aware of:
10 @ref{Configuration} file, for example @file{/usr/local/etc/nncp.hjson}.
11 Should not be globally readable, because it contains private keys.
14 @ref{Spool} directory with inbound/outbound encrypted packets, for
15 example @file{/var/spool/nncp}.
17 It also contains temporary files (in @file{tmp/} directory),
18 possibly left alone, if some of the commands failed and prematurely
19 exited and that should be cleaned from time to time.
21 Partly transferred files are stored with @file{.part} suffix. And
22 possibly they also require cleanup if they are completely lost.
24 It can contain @file{.nock} files: fully downloaded, but still not
25 checksummed. Can be checksummed (with @file{.nock} extension removing)
26 with @command{@ref{nncp-check} -nock}.
28 Also it can contain @file{seen/} and @file{hdr/} subdirectories,
29 that should be cleaned too from time to time.
31 All of that cleaning tasks can be done with @command{@ref{nncp-rm}} utility.
37 If you want to share single spool directory with multiple grouped
38 Unix users, then you can @command{setgid} it and assure that umask
39 is group friendly. For convenience you can set @option{umask}
40 globally for invoked NNCP commands in the configuration file. For
44 $ chgrp nncp /usr/local/etc/nncp.hjson /var/spool/nncp
45 $ chmod g+r /usr/local/etc/nncp.hjson
46 $ chmod g+rwxs /var/spool/nncp
47 $ echo 'umask: "007"' >> /usr/local/etc/nncp.hjson
51 @ref{Log} file, for example @file{/var/spool/nncp/log}. It should be
52 rotated. Choose you own preferable way to do it.
55 Example @url{https://www.newsyslog.org/manual.html, newsyslog}'s entry:
57 /var/spool/nncp/log 644 7 100 * BCYN
61 Optional @ref{CfgIncoming, incoming} directories where uploaded
62 files are stored. Probably you want to run @command{@ref{nncp-reass}}
63 from time to time to reassemble all chunked uploads. Example crontab
67 */1 * * * * nncp-reass -all -noprogress
74 Possibly long running @command{@ref{nncp-daemon}},
75 @command{@ref{nncp-caller}}, @command{@ref{nncp-toss}},
76 @command{@ref{nncp-check}} daemons. As all software, they can
77 fail and you should place them under some supervisor control.
79 For example you can use @url{http://cr.yp.to/daemontools.html,
80 daemontools} for that task to run them under probably existing
84 # mkdir -p /var/service/.nncp-toss/log
85 # cd /var/service/.nncp-toss
90 exec setuidgid uucp /usr/local/bin/nncp-toss -cycle 10
95 exec setuidgid uucp multilog t ./main
98 # chmod -R 755 /var/service/.nncp-toss
99 # mv /var/service/.nncp-toss /var/service/nncp-toss
104 @command{@ref{nncp-daemon}} can also be run as
105 @url{https://en.wikipedia.org/wiki/Inetd, inetd} service on UUCP's port:
108 uucp stream tcp6 nowait nncpuser /usr/local/bin/nncp-daemon nncp-daemon -quiet -ucspi
114 Or it can be also run as a @command{daemontools} daemon under
115 @url{http://cr.yp.to/ucspi-tcp.html, UCSPI-TCP}. In the example
116 below it uses native daemontools's logging capability:
119 # mkdir -p /var/service/.nncp-daemon/log
120 # cd /var/service/.nncp-daemon
124 NNCPLOG=FD:4 exec envuidgid nncpuser tcpserver -DHRU -l 0 ::0 uucp \
125 /usr/local/bin/nncp-daemon -quiet -ucspi 4>&1
128 # cat > log/run <<EOF
130 exec setuidgid uucp multilog ./main
133 # chmod -R 755 /var/service/.nncp-daemon
134 # mv /var/service/.nncp-daemon /var/service/nncp-daemon