Securing system configuration files

If you look at the configuration files for any given Linux distro, you'll see that most of them belong to either the root user or to a specified system user. You'll also see that most of these files have read and write privileges for their respective owners, and read privileges for everyone else. This means that everybody and his brother can read most Linux system configuration files. Take, for example, this Apache web server configuration file:

[donnie@donnie-ca ~]$ cd /etc/httpd/conf[donnie@donnie-ca conf]$ pwd/etc/httpd/conf[donnie@donnie-ca conf]$ ls -l httpd.conf -rw-r--r--. 1 root root 11753 Aug  6 09:44 httpd.conf[donnie@donnie-ca conf]$

With that r in the "others" position, everybody who logs in, ...

Get Mastering Linux Security and Hardening - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.