.Dd $Mdocdate: December 03 2020 $ .Dt KHAN 8 .Os .Sh NAME .Nm khan .Nd inetd gopher server .Sh SYNOPSIS .Nm khan .Op Fl d Ar path .Op Fl u Ar username .Sh DESCRIPTION .Nm is a secure gopher server that is meant to be run on .Xr inetd 8 . .Pp If an incoming gopher query doesn't explicitly request a file, .Nm will serves a default gophermap file if present. .Sh OPTIONS .Bl -tag -width Ds .It Op Fl d Ar path Use .Ar path instead of the default "/var/gopher/" path to look for files. On .Ox .Nm will use .Xr unveil 2 on this path in read-only to prevent file access outside this directory. .It Op Fl u Ar username Enable .Xr chroot 2 on the data directory and then drop privileges to .Ar username . This requires .Nm to be run as root user. .El .Sh DEPLOYMENT .Nm is meant to be run by .Xr inetd 8 . .Pp /etc/inetd.conf example using a dedicated gopher_user: .Bd -literal -offset indent 70 stream tcp nowait gopher_user /usr/local/bin/khan khan .Ed .Sh EXIT STATUS .Ex -std khan .Sh SEE ALSO .Xr chroot 2 , .Xr unveil 2 , .Xr inetd 8 .Sh AUTHORS .An See the LICENSE file for the authors . .Sh LICENSE See the LICENSE file for the terms of redistribution.