Configuration file

Configuration files are used to configure the initial settings for some computer programs. They are used for user applications, server processes and operating system settings. The files are often written in ASCII (rarely UTF-8) and line-oriented, with lines terminated by a newline or carriage return/line feed pair, depending on the operating system. They may be considered a simple database. Some files are created and modified using an ASCII editor. Others are created and modified as a side-effect of changing settings in a graphical user interface (GUI) program. The formats of configuration files are often poorly documented.

Some applications provide tools to create, modify, and verify the syntax of their configuration files. For server processes and operating system settings, the only documentation may be the source code. Some configuration files are partially described by man or help pages.

Some computer programs only read the configuration files at startup. Others periodically check the configuration files for changes. Some can be told to re-read the configuration files and apply the changes to the current process. There are no standards or strong conventions.

UNIX

Among the Unix variants, there are hundreds of configuration file formats. Each application or service may have a unique format. Historically, Unix operating system settings were often modified only by editing configuration files. Since the formats were poorly documented and there were no syntax checking tools for the configuration files, it was easy to misconfigure the operating system or service. Some configuration files have sample entries that can be used as templates. However, the examples may be out-of-date or incorrect. Some formats allow entries to be disabled by prepending a special comment character. Unix user applications often create a file or directory in the home directory of the user upon startup. To hide the file or directory from casual listing of the contents of the home directory, the name of the file or directory is prepended with a period. Server processes often use configuration files stored in /etc, but they may also use their installation directory, the root directory, or a location defined by the system administrator.

Microsoft Windows

Within the Microsoft Windows family of operating systems and their attendant applications, the situation is similar. Windows 3.0 had an API for INI files (from "initialization"), but that format is deprecated and modern Windows programs forgo configuration files to use only the Windows Registry to store information. IBM's AIX uses an Object Data Manager (ODM) database to store some system settings. IBM's OS/2 uses a binary format also named INI but it is different from the Windows versions.

Recently, XML and YAML have become popular as configuration file formats. They have the advantages of having well-defined syntaxes, and tools to validate and verify the syntax of the files that are created in those formats.

Implementation Shortcomings

Some of the common problems with configuration file implementations:

  • No defined behavior if the configuration file is missing, truncated, unreadable, unwritable, or has inappropriate ownership
  • No defined minimum or maximum file size
  • No defined minimum or maximum entry size
  • No revision control
  • No defined precedence, i.e. if there are two identical entries, does the program use the value of the first, the second, or both?
  • No formal syntax definition
    • No defined character set
    • No defined line-continuation syntax
    • Poorly defined comment syntax
    • undefined or idiosyncratic treatment of whitespace
Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools