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 Also it can contain @file{.seen} files, that should be cleaned too
26 All of that cleaning tasks can be done with @ref{nncp-rm} utility.
29 If you want to share single spool directory with multiple grouped
30 Unix users, then you can @command{setgid} it and assure that umask
31 is group friendly. For convenience you can set @option{umask}
32 globally for invoked NNCP commands in the configuration file. For
36 $ chgrp nncp /usr/local/etc/nncp.hjson /var/spool/nncp
37 $ chmod g+r /usr/local/etc/nncp.hjson
38 $ chmod g+rwxs /var/spool/nncp
39 $ echo 'umask: "007"' >> /usr/local/etc/nncp.hjson
43 @ref{Log} file, for example @file{/var/spool/nncp/log}. It should be
44 rotated. Choose you own preferable way to do it.
46 Example @url{https://www.newsyslog.org/manual.html, newsyslog}'s entry:
48 /var/spool/nncp/log 644 7 100 * BCYN
52 Optional @ref{CfgIncoming, incoming} directories where uploaded
53 files are stored. Probably you want to run @ref{nncp-reass} from
54 time to time to reassemble all chunked uploads. Example crontab
58 */1 * * * * nncp-reass -all -noprogress
62 Possibly long running @ref{nncp-daemon}, @ref{nncp-caller},
63 @ref{nncp-toss} daemons. As all software, they can fail and you
64 should place them under some supervisor control.
66 For example you can use @url{http://cr.yp.to/daemontools.html,
67 daemontools} for that task to run them under probably existing
71 # mkdir -p /var/service/.nncp-toss/log
72 # cd /var/service/.nncp-toss
77 exec setuidgid uucp /usr/local/bin/nncp-toss -cycle 10
82 exec setuidgid uucp multilog t ./main
85 # chmod -R 755 /var/service/.nncp-toss
86 # mv /var/service/.nncp-toss /var/service/nncp-toss
90 @ref{nncp-daemon} can also be run as
91 @url{https://en.wikipedia.org/wiki/Inetd, inetd} service on UUCP's port:
94 uucp stream tcp6 nowait nncpuser /usr/local/bin/nncp-daemon nncp-daemon -quiet -inetd
98 Or it can be also run as a @command{daemontools} daemon under
99 @url{http://cr.yp.to/ucspi-tcp.html, UCSPI-TCP}:
102 # mkdir -p /var/service/.nncp-daemon/log
103 # cd /var/service/.nncp-daemon
107 exec envuidgid nncpuser tcpserver -DRHU -l 0 0 uucp \
108 /usr/local/bin/nncp-daemon -quiet -inetd
111 # cat > log/run <<EOF
113 exec setuidgid uucp multilog t ./main
116 # chmod -R 755 /var/service/.nncp-daemon
117 # mv /var/service/.nncp-daemon /var/service/nncp-daemon