| name | cis-apache24-3.9 |
| description | Ensure the Pid File Is Secured |
| category | cis-apache |
| version | 2.3.0 |
| author | cyberstrike-official |
| tags | ["cis","apache","linux","privileges","permissions","ownership"] |
| cis_id | 3.9 |
| cis_benchmark | CIS Apache HTTP Server 2.4 Benchmark v2.3.0 |
| tech_stack | ["linux","apache"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
3.9 Ensure the Pid File Is Secured
Profile Applicability
Description
The PidFile directive sets the file path to the process ID file to which the server records the process id of the server, which is useful for sending a signal to the server process or for checking on the health of the process.
Rationale
If the PidFile is placed in a writable directory, other accounts could create a denial of service attack and prevent the server from starting by creating a PID file with the same name.
Audit
- Find the directory in which the
PidFile would be created. The default value is the ServerRoot/logs directory.
- Verify that the process ID file directory is not a directory within the Apache
DocumentRoot
- Verify that the ownership and group of the directory is
root:root (or the user under which Apache initially starts up if not root).
- Verify the permissions on the directory are only writable by root (or the startup user if not
root).
Remediation
- Find the directory in which the
PidFile would be created. The default value is the ServerRoot/logs directory.
- Modify the directory if the
PidFile is in a directory within the Apache DocumentRoot.
- Change the ownership and group to be
root:root, if not already.
- Change the permissions so that the directory is only writable by root, or the user under which Apache initially starts up (default is root).
Default Value
The default process ID file is logs/httpd.pid.
References
- https://httpd.apache.org/docs/2.4/mod/mpm_common.html#pidfile
CIS Controls
| Controls Version | Control | IG 1 | IG 2 | IG 3 |
|---|
| v8 | 3.3 Configure Data Access Control Lists Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | ● | ● | ● |