System information
Chapter 2. File System Structure and Maintenance
The file system structure is the most basic level of organization in an operating system. The way an
operating system interacts with its users, applications, and security model nearly always depends on
how the operating system organizes files on storage devices. Providing a common file system
structure ensures users and programs can access and write files.
File systems break files down into two logical categories:
Shareable versus unshareable files
Variable versus static files
Shareable files can be accessed locally and by remote hosts; unshareable files are only available
locally. Variable files, such as log files, can be changed at any time; static files, such as binaries, do
not change without an action from the system administrator.
Categorizing files in this manner helps correlate the function of each file with the permissions
assigned to the directories which hold them. How the operating system and its users interact with a
file determines the directory in which it is placed, whether that directory is mounted with read-only or
read/write permissions, and the level of access each user has to that file. The top level of this
organization is crucial; access to the underlying directories can be restricted, otherwise security
problems could arise if, from the top level down, access rules do not adhere to a rigid structure.
2.1. Overview of Filesyst em Hierarchy St andard (FHS)
Red Hat Enterprise Linux uses the Filesystem Hierarchy Standard (FHS) file system structure, which
defines the names, locations, and permissions for many file types and directories.
The FHS document is the authoritative reference to any FHS-compliant file system, but the standard
leaves many areas undefined or extensible. This section is an overview of the standard and a
description of the parts of the file system not covered by the standard.
The two most important elements of FHS compliance are:
Compatibility with other FHS-compliant systems
The ability to mount a /usr/ partition as read-only. This is especially crucial, since /usr/
contains common executables and should not be changed by users. In addition, since /usr/ is
mounted as read-only, it should be mountable from the CD-ROM drive or from another machine
via a read-only NFS mount.
2.1.1. FHS Organiz at ion
The directories and files noted here are a small subset of those specified by the FHS document. Refer
to the latest FHS documentation for the most complete information at http://www.pathname.com/fhs/.
2.1 .1 .1 . Gat he ring File Syst e m Info rm at io n
The df command reports the system's disk space usage. Its output looks similar to the following:
Examp le 2.1. d f co mman d o u t p u t
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
Chapt er 2 . File Syst em St ruct ure and Maint enance
15