[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I trace changes in configuration files?



On Wed, 1 May 2019 18:43:47 +0200
Erik Josefsson <erik.hjalmar.josefsson@gmail.com> wrote:

> Den 2019-05-01 kl. 13:29, skrev Dan Purgert:

<snip information>
> 
> 
> Thanks Dan, I'll start with that method and maybe later I'll try
> Jonas' proposal with etckeeper and git.
> 
> But first, in which top level directories could files that change be 
> located?
> 
> There are quite a few to choose from: bin, boot, dev, etc, home, lib, 
> lib64, lost+found, media, mnt, opt, proc, root, run, sbin, srv, sys, 
> tmp, usr and var.
> 
In general, system-wide configurations go in /etc, individual user
configurations are in /home/<user>, either in directories beginning
with a . or as single files beginning with a dot for simple
configurations. If you use a GUI file manager, you may need to
configure it to show hidden files.

There are more complex applications, such as php and gschem, which look
for configuration files in many places. php in particular is tightly
tied to a web server, and may have different configurations for
different virtual web sites, so may have some configurations stored in
the web server's configuration directories. I have experienced the
usual php beginner's fury and frustration at changing a parameter in
about six different php.ini files, and *still* not having the change
work... Yes, most of the time I do remember to restart the web server.

The original configuration files for many applications are often stored
somewhere in /usr/lib, either being copied into /etc during
installation or being referred to in /usr/lib but with additional files
in /etc or /home overriding them if the user has made any changes.
Nothing under /usr should ever be written to other than during
installation, so no modified configuration files *ought* to exist here.

On the whole, /etc and the /home dotfiles should hold all of the
configurations which will interest you. If you are unable to find
something you *know* exists somewhere, then look at the list of
installed files for the application, using one of the apt tools.

It is increasingly common for the Debian packages of an application (I
don't know about other distributions) to use a basic configuration
file (e.g. app.conf) and a directory called something like app.conf.d as
well. The idea is that the basic file is not ever modified, because it
can be replaced during an upgrade and if it has been modified you then
get asked that multiple choice question about what you want to do about
it during the upgrade. User files placed in the app.conf.d directory
will be used to override the basic file, and will never be touched
during upgrades, so your configuration changes will (usually) persist
through an upgrade.

Debian also uses an /etc/default directory, which contains many
miscellaneous system configurations in a relatively user-friendly
format. Some of the more useful grub boot parameters live here.

-- 
Joe


Reply to: