Bug 719559 - The /etc/httpd/logs -> ../../var/log/httpd symlink should not be there
Summary: The /etc/httpd/logs -> ../../var/log/httpd symlink should not be there
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: httpd
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Joe Orton
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-07 10:38 UTC by Aleksander Adamowski
Modified: 2011-07-07 12:50 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-07 12:50:00 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.