Bug 719559

Summary: The /etc/httpd/logs -> ../../var/log/httpd symlink should not be there
Product: Red Hat Enterprise Linux 6 Reporter: Aleksander Adamowski <bugs-redhat>
Component: httpdAssignee: Joe Orton <jorton>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: prc
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-07 12:50:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Aleksander Adamowski 2011-07-07 10:38:40 UTC
Description of problem:

The Red Hat version of Apache httpd package includes a symlink in /etc that points to the logs directory in /var:

# ls -l /etc/httpd/logs
lrwxrwxrwx. 1 root root 19 Jan  3  2011 /etc/httpd/logs -> ../../var/log/httpd

This symlink should not be there for several reasons:

1. Has little usefulness (the admin should know that logs lie in /var and go there directly - I've personally never navigated to http logs through this /etc symlink, while I've administered Apache HTTPD for several years on RH distros)
2. It causes a diffusion of responsibility between /etc and /var
3. Most of all, it messes up recursive greps in /etc because grep traverses the symlink and starts to search through (often massive) https logs, taking lots of time and generating unneeded matches. Unfortunately, there's no option in GNU grep to make it not traverse symlinks.

Version-Release number of selected component (if applicable):
httpd-2.2.15-5.el6.x86_64

How reproducible:

Just look for the link or try grepping recursively in /etc:

# ls -l /etc/httpd/logs

# grep -ir http /etc/

Comment 2 Joe Orton 2011-07-07 12:50:00 UTC
Thanks for the report.

The default (and many custom) configurations rely on this symlink, since the server root is /etc/httpd, allowing filenames such as "logs/blah" to be used as relative log file locations.  We have no plans to change this.

If the real issue you face is with recursive grep, I suggest you file an RFE against grep; a new option symilar to --devices could be added to avoid symlinks, possibly.   Simply using an appropriate --exclude/--exclude-dir is an option as well, of course.