Hide Forgot
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/
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.