Bug 180350 - /etc/httpd/run link prevents grepping of /etc
Summary: /etc/httpd/run link prevents grepping of /etc
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: httpd
Version: 4.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Joe Orton
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-02-07 15:04 UTC by sysnet
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-05-17 11:44:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description sysnet 2006-02-07 15:04:44 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.7

Description of problem:
Included as part of the httpd package is the symlink /etc/httpd/run, which points to a directory in /var.  It is often useful for a systems administrator to perform a grep on the entire contents of /etc.  However, grep follows this symlink and presumably gets hung up trying to read from a socket, causing it to hang indefinitely.

Please respect the Filesystem Hierarchy Standard, and remove this link.

Version-Release number of selected component (if applicable):
httpd-2.0.52-22

How reproducible:
Always

Steps to Reproduce:
1. grep foo /etc


Additional info:

Comment 1 Rainer Traut 2006-05-16 15:05:05 UTC
I agree it should be removed because the link is juste useless.
It seems to be there to have apache writing its pidfile underneath /var/run.
But this never happens, as apache writes it to the log dir to
/var/log/httpd/httpd.pid
(Sys: RHEL4 x86_64 U3)

Maybe I should file another bugreport because the ghost pid file under
/var/run/httpd.pid
is never created but mentioned in the httpd init script.

Comment 2 Joe Orton 2006-05-17 11:44:39 UTC
Thanks for the reports.

The default httpd.conf uses the /etc/httpd/run symlink to place the pidfile at
/var/run/httpd.pid, using "PidFile run/httpd.pid".  It's generally useful to
keep these symlinks to allow the httpd.conf to avoid using absolute paths as far
as possible.

It is possible to prevent "grep -r" from reading from special files such as
sockets by passing the "--devices=skip" flag.

As such, I would not consider this strong enough justification for removal of
the symlink; certainly this could not be done in a RHEL3 update, since it would
break backwards compatibility.


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