2.3.3 Ensure the NGINX process ID (PID) file is secured

Information

The PID file stores the main process ID of the nginx process. This file should be protected from unauthorized modification.

The PID file should be owned by root and the group root . It should also be readable to everyone, but only writable by root (permissions 644 ). This will prevent unauthorized modification of the PID file, which could cause a denial of service.

Solution

Set the correct ownership and permissions for the PID file (replace path as needed):

chown root:root /run/nginx.pid
chmod 644 /run/nginx.pid

Impact:

None. The PID file is managed by the master process ( root ). Restricting write access prevents other users from tampering with the file, but read access is generally safe and required for monitoring.

See Also

https://workbench.cisecurity.org/benchmarks/18528

Item Details

Category: ACCESS CONTROL, MEDIA PROTECTION

References: 800-53|AC-3, 800-53|AC-5, 800-53|AC-6, 800-53|MP-2, CSCv7|14.6

Plugin: Unix

Control ID: f60a6f84fa764779b461f1280520de1817f744ba76887ea7f1aac7792639a2a3