4. /var: Data Modifiable During (Web server hosting) Use 4. /var:
4. /var: Data Modifiable During Use 4. /var: Data Modifiable During Use The /var directory contains all operative data for programs running on the system. Unlike the working data in /tmp, this data must be kept intact in the event of a reboot. There are many sub-directories, and some are very useful: /var/log: contains the system’s log files which you may read to troubleshoot your system (/var/log/messagesand /var/log/kernel/errors to only name those two). /var/run: used to keep track of all processes utilized by the system since it was booted, enabling you to act on them in the event of a system runlevel change (see Chapter 37, The Start-Up Files: init sysv [493]). /var/spool: contains the system’s working files waiting for some kind of action or processing. For example, /var/spool/cups contains the print server’s working files, while /var/spool/mail contains the mail server’s working files (for example, all mail arriving and leaving your system). 5. /etc: Configuration Files /etcis one of UNIX systems’ most essential directories because it contains all the host-specific configuration files. Never delete it to save space! Likewise, if you want to extend your tree structure over several partitions, remember that /etc must not be put on a separate partition: it is needed for system initialization and must be on the root partition at boot time. Here are some important files: passwdand shadow: these are text files which contain all system users and their encrypted passwords. You will only see shadow if shadow passwords are used, which happens to be the default installation option for security reasons. inittab: this is the configuration file for init which plays a fundamental role in starting up the system. Please refer to Section 5.3.1, Booting Into a Different Run Level [364]. services: this file contains a list of existing network services. profile: this is the shell system-wide configuration file. Its settings can be overridden by shell-specific configuration files. For example, .bashrc for the bash shell.