Chapter 10. Files
10.7.5 User configuration files ( dotfiles )
The files in
will automatically be copied into new user accounts by
other program should reference the files in
Therefore, if a program needs a dotfile to exist in advance in
to work sensibly, that
dotfile should be installed in
and treated as a configuration file.
However, programs that require dotfiles in order to operate sensibly are a bad thing, unless
they do create the dotfiles themselves automatically.
Furthermore, programs should be configured by the Debian default installation to behave as
closely to the upstream default behaviour as possible.
Therefore, if a program in a Debian package needs to be configured in some way in order to
operate sensibly, that should be done using a site wide configuration file placed in
if the program doesn't support a site wide default configuration and the package maintainer
doesn't have time to add it may a default per user file be placed in
should be as empty as we can make it. This is particularly true because there is no
easy (or necessarily desirable) mechanism for ensuring that the appropriate dotfiles are copied
into the accounts of existing users when a package is installed.
10.8 Log files
Log files should usually be named
. If you have many log files, or
need a separate directory for permission reasons (
is writable only by
should usually create a directory named
and place your log files there.
Log files must be rotated occasionally so that they don't grow indefinitely; the best way to do
this is to drop a log rotation configuration file into the directory
the facilities provided by logrotate.
Here is a good example for a logrotate config file (for more
/etc/init.d/foo force reload
The traditional approach to log files has been to set up ad hoc log rotation schemes using simple shell scripts
and cron. While this approach is highly customizable, it requires quite a lot of sysadmin work. Even though the
original Debian system helped a little by automatically installing a system which can be used as a template, this
was deemed not enough. The use of
, a program developed by Red Hat, is better, as it centralizes log
management. It has both a configuration file (
) and a directory where packages can drop
their individual log rotation configurations (