tnfsd (trivial network filesystem server)
TNFS is a simplified Internet file transfer protocol, designed for
limited resource usage and ease of implementation on small systems,
such as 8-bit computers. It's simpler than NFS, SMB, or FTP. It's
similar to TFTP, but has features TFTP lacks.
Since tnfsd has no access control other than file permissions, and
since we generally don't want clients to have write access, this
package uses a dedicated user/group for the daemon, and another group
to control local write access to the shared directory.
Before running this SlackBuild, you must create the tnfsd user and
the tnfsd and tnfs-files groups. Use these commands:
groupadd -g 375 tnfsd
groupadd -g 376 tnfs-files
useradd -u 375 -d /var/tnfs -c "TNFS Daemon User" \
-M -g tnfsd tnfsd -s /bin/false
After the package is installed, add any users you want to the tnfs-files
group. These users will be able to create files in the /var/tnfs
directory. Example:
usermod -a -G tnfs-files joeblow
After the above command, the user joeblow will have to log out and
back in, to join the new group. Once this is done, the user can
copy files to /var/tnfs (or ~tnfs) and they will be visible to TNFS
clients.
TNFS uses UDP port 16384, so make sure you allow incoming traffic if
you have firewall rules.
This package includes the server and an init script for running
tnfsd as a system daemon. To start tnfsd at boot, first edit
/etc/rc.d/rc.tnfsd, read the comments, and change the default user and
directory if needed. Then add this to /etc/rc.d/rc.local:
[ -x /etc/rc.d/rc.tnfsd ] && /etc/rc.d/rc.tnfsd start
Depending on how you're using tnfsd, it might make more sense to start
the service as needed, as an unprivileged user, instead of running it
as a system daemon.
Usage logging is a compile-time option. By default, it's enabled. If
you find it too chatty, you can rebuild this with USAGELOG=no set in
the environment.