This is an old revision of the document!
UNIX
Configuration of Synchronet for use on Unix/Linux systems.
sbbs.ini
Unix/Linux Sysops will particularly want to pay attention to the [UNIX]
section of your Synchronet initialization file (e.g. ctrl/sbbs.ini
).
User
Default: <none>
Group
Default: <none>
If you do not want to run Synchronet (and all external programs/doors) as
root (the Unix administrator user), you will have to set the User
and Group
key values.
Example:
User=sbbsuser Group=sbbsgroup
NOTE: the sbbsuser
and sbbsgroup
names are just examples. You must pick valid user/group names for your system (e.g. exist in your system's /etc/passwd
file) and both the user and group name may be the same.
Also, the Synchronet file permissions/ownership should be such that this user/group would have read and write access to them. The best way to accomplish this is a command like:
# chown -R sbbsuser:sbbsgroup /sbbs
If you do this, then be sure to run any Synchronet utilities (e.g. SCFG) as the same user that the BBS is going to run as:
# su -c /sbbs/exec/scfg sbbs
LogFacility
Default: U
(User)
Supported Values: 0
-7
(“Local0” through “Local7” facility), U
(for “User” facility), and S
or F
(for “Standard” facilities)
If you have sbbs
installed to run in the background as a daemon, logging
via syslog rather than the local console, you may want to set the LogFacility
key value. A good value to use is:
LogFacility=3
Then, in /etc/syslog.conf
(or /etc/rsyslog.d/sbbslog.conf
) you will need to add the line:
local3.* /var/log/sbbs.log
Depending on how your vendor set up syslog.conf
initially, you may also want
to exclude local3.* from other log files (Noteably /var/log/messages
). how to
do this varies with your syslogd implementation, but for BSD based ones
(Which BSD and many Linux distros use) you would add “;local3.none” to the
end of the first field in the /var/log/messages
line.
You will have to create this file manually initially by running:
# touch /var/log/sbbs.log
Then send a HUP to syslogd like so:
# killall -HUP syslogd
Or it might be necessary to:
# service syslogd restart
You could then monitor the Synchronet daemon log output with:
# tail -f /var/log/sbbs.log
You will want to investigate how your system rotates logs and set it up to
rotate sbbs.log
also.
# cat /etc/logrotate.d/sbbs /var/log/sbbs*.log { weekly missingok rotate 52 notifempty create 640 root adm sharedscripts postrotate invoke-rc.d rsyslog reload > /dev/null endscript }
Further use of the LogFacility
setting is beyond the scope of this document.
Read your syslog.conf
manpage for more information about this. In particular,
do NOT use the 'S' setting unless you are familiar with advanced syslogd
configuration. The S setting will use different facilities for each feature
of Synchronet as appropriate. Specifically, S will use:
LOG_AUTH LOG_DAEMON LOG_FTP (If available) LOG_MAIL LOG_CRON
Note: the LogFacility value in the sbbs.ini
file may be overridden with the -d
command-line option (e.g. sbbs -d3
to daemonize sbbs
with LogFacility of Local3
).
LogIdent
Default: Synchronet
This is the value passed as the ident
argument to the system's openlog
function. Run man openlog
for more details on this setting.
PidFile
Default: /var/run/sbbs.pid
This key contains the path of the file which will contain the process identifier (PID) of Synchronet and is used by background/daemon startup scripts to query the current state of sbbs
.
# service sbbs status Synchronet BBS services status: [running] PID(s): 6270
If you change the value of this key, you may also need to modify your startup script (e.g. /etc/init.d/sbbs
).
umask
Default: 077
Sets sbbs
's file mode creation mask.
Note: If the value begins with a 0
, it will be interpreted in octal notation.
Run man umask
for more details on this setting.
Daemonize
Default: false
When set to true
, forces sbbs
to run daemonized (in the background) without specifying the -d
command-line option. Setting this value to true
is not recommended.