Add SHARES and USER AUTHORIZATION sections.
[doldaconnect.git] / doc / doldacond.conf.5.in
index 9f861f9..e5af578 100644 (file)
 .SH NAME
 doldacond.conf \- Dolda Connect daemon configuration file
 .SH DESCRIPTION
-The \fBdoldacond\fP(8) daemon will examine the doldacond.conf upon
-startup and reception of SIGHUP. The file is written in a
+The \fBdoldacond\fP(8) daemon will examine the doldacond.conf file
+upon startup and reception of SIGHUP. The file is written in a
 line-oriented ASCII format, using the following rules.
 .P
 A line is either empty, a comment, or a configuration directive. Empty
 lines are permitted to contain horizontal whitespace, but nothing
-else. A comment line begins with a hash sign (`#'). A configuration
-directive is a line with at least one token, each token being a series
-of non-whitespace characters or quoted whitespace characters. Quoting
-can be done either by surrounding the characters to be quoted with
-double quotation marks, or by preceding a single character to be
-quoted with a backslash. The first token is considered the directive
-to be evaluated, and the rest being arguments to the directive. Each
-of the possible configuration directives are described in their own
-sections.
+else. A comment line begins with a hash sign (`#'), optionally
+preceded by whitespace. A configuration directive is a line with at
+least one token, each token being a series of non-whitespace
+characters or quoted whitespace characters. Quoting can be done either
+by surrounding the characters to be quoted with double quotation
+marks, or by preceding a single character to be quoted with a
+backslash. The first token is considered the directive to be
+evaluated, and the rest being arguments to the directive. Each of the
+possible configuration directives are described in their own sections.
 .SH CONFIGURATION VARIABLES
 The vast majority of the daemon's configuration is controlled via
 named configuration variables. The \fBset\fP directive is used to set
@@ -60,6 +60,73 @@ system's default character coding. IPv4 addresses are specified in
 dotted quad decimal notation. A list of all the known configuration
 variables follows.
 @VARIABLES@
+.SH SHARES
+A very central function of a file-sharing daemon is to share files. To
+determine what files are to be shared, the \fBshare\fP directive is
+used, according to the following syntax:
+.P
+\fBshare\fP \fIsharename\fP \fIpath\fP
+.P
+The \fIsharename\fP is the name of the share as seen by other peers on
+the network. The \fIpath\fP is the path in the real filesystem to a
+directory containing the files to be shared. All files under the
+specified directory will be shared, except for files that begin with a
+dot, or files that do not match the criteria given by the
+\fBclient.scanfilemask\fP and \fBclient.scandirmask\fP variables, as
+described above.
+.P
+The \fBshare\fP directive may be used multiple times to define several
+shares.
+.SH USER AUTHORIZATION
+In multi-user mode (when running as root), the \fBdoldacond\fP(8)
+daemon can serve multiple users, but commonly not every user on the
+system should be authorized to be served. To specify which users to
+serve, and to assign permissions to the users to be served, the
+\fBuser\fP directive is used, according to the following syntax:
+.P
+\fBuser\fP {\fIusername\fP|\fBdefault\fP} [-]\fIpermission\fP...
+.P
+As indicated by the syntax, the special username \fBdefault\fP can be
+used to specify permissions for users not matched by any other user
+directive (if you have a user called \fBdefault\fP, tough luck).
+.P
+The assignable permissions are as follows:
+.P
+.TP
+.B admin
+Involves commands controlling the function of the daemon, such as
+shutting it down remotely.
+.TP
+.B fnetctl
+Allows connecting and disconnecting fnetnodes (a.k.a. hubs).
+.TP
+.B trans
+Allows queuing of transfers.
+.TP
+.B transcu
+Allows cancelling of uploads.
+.TP
+.B chat
+Allows sending and receiving of chat messages.
+.TP
+.B srch
+Allows submitting of search requests.
+.TP
+.B disallow
+A negative permission, used to prevent a user from being
+authorized. Mostly useful for the \fBdefault\fP user.
+.TP
+.B all
+Sets all the above permssions.
+.P
+A permissions may be prefixed with a minus sign, which means that that
+permission should be removed (commonly used after \fBall\fP, since
+permissions are scanned from left to right).
+.P
+Note that the \fBall\fP pseudo-permission really turns on \fIall\fP
+other permissions, including \fBdisallow\fP. Thus, to allow a user
+jdoe full control over the daemon, one would normally use "\fBuser
+jdoe all -disallow\fP".
 .SH TOS VALUES
 Some configuration variables specify IP Type of Service values. Valid
 values for those variables are as follows:
@@ -123,6 +190,9 @@ For files that are created on the fly, such as the hash cache, the
 file will be overwritten in place if found. If not found, it will be
 created in the home directory of the user running the daemon. If the
 home directory cannot be determined, the file will be created in /etc.
+.SH BUGS
+IPv4 should also be able to use Diffserv instead of TOS. I have simply
+not been able to find the API to set IPv4 Diffserv values.
 .SH AUTHOR
 Fredrik Tolf <fredrik@dolda2000.com>
 .SH SEE ALSO