[lug] System configuration files

Paul E Condon pecondon at peakpeak.com
Tue Jul 29 14:54:03 MDT 2003


On Tue, Jul 29, 2003 at 02:04:23PM -0600, Jeff Schroeder wrote:
> Hey all!
> 
> I've rolled my own Linux distribution, basically by compiling all the 
> software packages I need from their source code, and as I continue 
> developing this distro I find myself running into problems with system 
> configuration files.
> 
> For example, if you want to configure Apache you need to modify 
> httpd.conf, which is usually in /var/httpd/conf (or maybe 
> /usr/local/httpd/conf, or even /opt/apache/conf).  MySQL's main 
> configuration file is usually in /usr/local/var/my.cnf.  An FTP server 
> relies on /etc/ftpaccess.  And so on, and so on.
> 
> I'd like to bring all these configuration files into one place, where 
> they can be easily managed by simply going into a subdirectory with the 
> application name and editing the appropriate files.  Obviously one 
> would still need some understanding of the file formats and so on, but 
> it would certainly save one from needing to know the disparate 
> locations of all these files.
> 
> My initial thought was to place everything in /etc/conf/<package>, but 
> in reading the Filesystem Hierarchy Standard-- which applies to Unix 
> and Linux systems-- it seems a more logical choice would be somewhere 
> in /var.  However, there's no indication (at least in the FHS) of this 
> sort of idea, so I thought I'd toss it to the collective brainpower of 
> the LUG.
> 
> My idea, then, is to build a directory structure where software 
> configuration files are in /var/conf/<package>, thus:
> 
> /var/conf/apache
> /var/conf/mysql
> /var/conf/wu-ftpd
> 
> Et cetera.  Within those directories would be all the configuration 
> files; note this does NOT include log files, PID/lock files, and other 
> runtime-generated data... ONLY the configuration.  More than likely 
> these directories would only be accessible to the super-user.  If a 
> particular program expects its configuration file in a certain place, 
> there would simply be a symlink back to the /var/conf area.
> 
> As an important side note, moving all configuration files to one place 
> would allow the /usr (and possibly root) partition to be read-only, 
> which is often considered a Good Thing.  In fact, one could imagine a 
> system where only /home and /var are writeable at all.  Moreover, 
> backing up the entire system's configuration would involve dumping a 
> single directory-- making it trivial to replicate systems or take 
> measures to avoid catastrophe.
> 
> What do you guys think?  Are there any "mainstream" Linux distros out 
> there which utilize something like this?  Am I breaking any religious 
> rules by (apparently) defining my own filesystem structure?  Is there a 
> Better Way?

Debian has a policy on how files on disk should be organized. There is
a document that describes the policy and offers a lot of reasoning as 
to why various ways of doing things are good or bad. Nothing religious;
very well reasoned. Your idea of a sub-folder for each application is
part of the policy. Your use of /var rather than /etc is not part of
Debian policy. As you have discovered, when you try to extend your 
reach, you need to have a policy for how you organize things. The Debian
policy has had a lot of thought put into it. You should at least read it,
and understand why you need something different.

http://www.debian.org/doc/packaging-manuals/fhs/


-- 
Paul E Condon           
pecondon at peakpeak.com    




More information about the LUG mailing list