2 @unnumbered Administration
4 NNCP uses following files/directories you should be aware of:
9 @ref{Configuration} file, for example @file{/usr/local/etc/nncp.hjson}.
10 Should not be globally readable, because it contains private keys.
13 @ref{Spool} directory with inbound/outbound encrypted packets, for
14 example @file{/var/spool/nncp}.
16 It also contains temporary files (in @file{tmp/} directory),
17 possibly left alone, if some of the commands failed and prematurely
18 exited and that should be cleaned from time to time.
20 Partly transferred files are stored with @file{.part} suffix. And
21 possibly they also require cleanup if they are completely lost.
23 It can contain @file{.nock} files: fully downloaded, but still not
24 checksummed. Can be checksummed (with @file{.nock} extension removing)
25 with @ref{nncp-check -nock}.
27 Also it can contain @file{.seen} files, that should be cleaned too
30 All of that cleaning tasks can be done with @ref{nncp-rm} utility.
33 If you want to share single spool directory with multiple grouped
34 Unix users, then you can @command{setgid} it and assure that umask
35 is group friendly. For convenience you can set @option{umask}
36 globally for invoked NNCP commands in the configuration file. For
40 $ chgrp nncp /usr/local/etc/nncp.hjson /var/spool/nncp
41 $ chmod g+r /usr/local/etc/nncp.hjson
42 $ chmod g+rwxs /var/spool/nncp
43 $ echo 'umask: "007"' >> /usr/local/etc/nncp.hjson
47 @ref{Log} file, for example @file{/var/spool/nncp/log}. It should be
48 rotated. Choose you own preferable way to do it.
50 Example @url{https://www.newsyslog.org/manual.html, newsyslog}'s entry:
52 /var/spool/nncp/log 644 7 100 * BCYN
56 Optional @ref{CfgIncoming, incoming} directories where uploaded
57 files are stored. Probably you want to run @ref{nncp-reass} from
58 time to time to reassemble all chunked uploads. Example crontab
62 */1 * * * * nncp-reass -all -noprogress
66 Possibly long running @ref{nncp-daemon}, @ref{nncp-caller},
67 @ref{nncp-toss} daemons. As all software, they can fail and you
68 should place them under some supervisor control.
70 For example you can use @url{http://cr.yp.to/daemontools.html,
71 daemontools} for that task to run them under probably existing
75 # mkdir -p /var/service/.nncp-toss/log
76 # cd /var/service/.nncp-toss
81 exec setuidgid uucp /usr/local/bin/nncp-toss -cycle 10
86 exec setuidgid uucp multilog t ./main
89 # chmod -R 755 /var/service/.nncp-toss
90 # mv /var/service/.nncp-toss /var/service/nncp-toss
94 @ref{nncp-daemon} can also be run as
95 @url{https://en.wikipedia.org/wiki/Inetd, inetd} service on UUCP's port:
98 uucp stream tcp6 nowait nncpuser /usr/local/bin/nncp-daemon nncp-daemon -quiet -inetd
102 Or it can be also run as a @command{daemontools} daemon under
103 @url{http://cr.yp.to/ucspi-tcp.html, UCSPI-TCP}:
106 # mkdir -p /var/service/.nncp-daemon/log
107 # cd /var/service/.nncp-daemon
111 exec envuidgid nncpuser tcpserver -DRHU -l 0 0 uucp \
112 /usr/local/bin/nncp-daemon -quiet -inetd
115 # cat > log/run <<EOF
117 exec setuidgid uucp multilog t ./main
120 # chmod -R 755 /var/service/.nncp-daemon
121 # mv /var/service/.nncp-daemon /var/service/nncp-daemon