.
D 2020-04-01T18:08:27.967
L Manual
P 39635e7b71b1bf849232ac6de061f64d5d6a5ca6
U rkeene
W 3260
<H2>NAME</H2>
filed - serve files over HTTP
<A NAME="lbAC"> </A>
<H2>SYNOPSIS</H2>
<B>filed</B>
[{<B>-h</B>|<B>--help</B>}]
[{<B>-d</B>|<B>--daemon</B>}]
[{<B>-v</B>|<B>--version</B>}]
[{<B>-V</B>|<B>--vhost</B>}]
[{<B>-b</B>|<B>--bind</B>}
<I>address</I>]
[{<B>-p</B>|<B>--port</B>}
<I>port</I>]
[{<B>-t</B>|<B>--threads</B>}
<I>count</I>]
[{<B>-c</B>|<B>--cache</B>}
<I>entries</I>]
[{<B>-l</B>|<B>--log</B>}
<I>file</I>]
[{<B>-u</B>|<B>--user</B>}
<I>user</I>]
[{<B>-r</B>|<B>--root</B>}
<I>directory</I>]
<P>
<A NAME="lbAD"> </A>
<H2>DESCRIPTION</H2>
<I>FILED</I>
serves files over HTTP as minimally as possible. Only static files (i.e., files that never change or are replaced) are supported.
<P>
<A NAME="lbAE"> </A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT><B>-h (or --help)</B>
<DD>
Prints detailed usage information.
<P>
<DT><B>-d (or --daemon)</B>
<DD>
Instructs
<B>filed</B>
to become a daemon after initializing
the listening TCP socket and log files.
<P>
<DT><B>-v (or --version)</B>
<DD>
Instructs
<B>filed</B>
to print out its version number and then exit.
<P>
<DT><B>-V (or --vhost)</B>
<DD>
instructs filed to prepend all requests with their HTTP
Host header.
<P>
<DT><B>-b (or --bind)</B>
<DD>
Specifies the address to listen for incoming HTTP
requests on.
<P>
<DT><B>-p (or --port)</B>
<DD>
Specifies the TCP port number to listen for incoming HTTP
requests on.
<P>
<DT><B>-t (or --threads)</B>
<DD>
Specifies the number of worker threads to create. Each
worker thread can service one concurrent HTTP session.
Thus the number of threads created will determine how
many simultaneous transfers will be possible.
<P>
<DT><B>-c (or --cache)</B>
<DD>
Specifies the number of file information cache entries
to allocate. Each cache entry holds file information as
well as an open file descriptor to the file, so resource
limits (i.e., ulimit) should be considered. This should
be a prime number for ideal use with the lookup method.
<P>
<DT><B>-l (or --log)</B>
<DD>
Specifies a filename to open for writing log entries. Log
entries are made for various stages in transfering files.
The log file is opened before switching users (see "-u")
and root directories (see "-r"). The log file is never
closed so log rotation without stopping the daemon is will
not work. The value of "-" indicates that standard output
should be used for logging. If the filename begins with a
pipe ("|") then a process is started and used for logging
instead of a file.
<P>
<DT><B>-u (or --user)</B>
<DD>
Specifies the user to switch user IDs to before servicing
requests. The default is not change user IDs.
<P>
<DT><B>-r (or --root)</B>
<DD>
Specifies the directory to act as the root directory for
the file server. If this option is specified, <A HREF="http://linux.die.net/man/2/chroot">chroot</A>(2)
is called. The default is not change root directories,
that is, the "/" directory is shared out. This will
likely be a security issue, so this option should always
be used.
<P>
</DL>
<A NAME="lbAF"> </A>
<H2>AUTHOR</H2>
Roy Keene
<I><<A HREF="mailto:filed@rkeene.org">filed@rkeene.org</A>></I>
<P>
Z f60cc3e26a9e33c9a87b898c1fa73a5f