Skip to Main Content
Linux Server Security, Second Edition
book

Linux Server Security, Second Edition

by Michael D. Bauer
January 2005
Intermediate to advanced content levelIntermediate to advanced
544 pages
23h 44m
English
O'Reilly Media, Inc.
Content preview from Linux Server Security, Second Edition
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
322
|
Chapter 10: Securing Web Servers
Logging
The Apache log directories should be owned by root and visible to no one else. Look-
ing at Table 10-3, the default owner is root but the directory permissions are
755 and
file permissions are
644. We can change the directory permissions to 700 and the file
permissions to
600.
Table 10-3. Apache installation defaults
File types Notable files
Red Hat RPM
directories
Source directories
Owner
Dirmode
Filemode
Initialization script httpd /etc/init.d (No standard) root
755
755
Configuration files httpd.conf
access.conf
srm.conf
/etc/httpd/conf /usr/local/apache/conf root
755
644
Logs access_log
error_log
/etc/httpd/logs /usr/local/apache/logs root
755
644
Apache programs httpd
apachectl
/usr/sbin /usr/local/apache/bin root
755
511
Apache utilities htpasswd
apxs
rotatelogs
/usr/sbin /usr/local/apache/bin root
755
755
Modules mod_perl.so /usr/lib/apache /usr/local/apache/libexec root
755
755
CGI programs (CGI scripts) /var/www/cgi-bin /usr/local/apache/cgi-bin root
755
750
a
a
Files should be owned by group apache.
Static content (HTML files) /var/www/html /usr/local/apache/htdocs apache
470
640
Password/datafiles (Varies) (No standard) (No standard) apache
470
640
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux: Powerful Server Administration

Linux: Powerful Server Administration

Uday Sawant, Oliver Pelz, Jonathan Hobson, William Leemans
Linux Server Hacks

Linux Server Hacks

Rob Flickenger
Linux Server Hacks, Volume Two

Linux Server Hacks, Volume Two

William von Hagen, Brian K. Jones

Publisher Resources

ISBN: 0596006705Supplemental ContentCatalog PageErrata