Bug 51220

Summary: impossible to run apache with non-root permissions
Product: [Retired] Red Hat Linux Reporter: Fernando J. Martinez <fernando>
Component: apacheAssignee: Joe Orton <jorton>
Status: CLOSED DUPLICATE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: jpadfield, scop
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 18:48:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Fernando J. Martinez 2001-08-08 15:44:31 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Description of problem:
It's impossible to run apache with non-root permissions, because it tries 
to write a semaphore in /var/run:

>>>>>>>>>>>>>>>>>>>>>>>>>
Ouch! ap_mm_create(1048576, "/var/run/httpd.mm.12420") failed
Error: MM: mm:core: failed to open semaphore file (Permission denied): OS: 
No such file or directory

>>>>>>>>>>>>>>>>>>>>>>>>>

Mandrake 8 seems to have it solved in its package:

  apache-common-1.3.19-3mdk RPM for i586

See their changelog:

>>>>>>>>>>>>>>>>>>>>>>
- Changed MM_CORE_PATH to /var/apache-mm/mm instead of /var/run/mm 
    because only root can write to /var/run and we have to be able to run 
    Apache as a non-root user! 

>>>>>>>>>>>>>>>>>>>>>>


How reproducible:
Always

Steps to Reproduce:
1.Log in with non root permissions
2.Try to launch apache
3.
	

Actual Results:  The apacha is not started because it tries to access some 
files or directories not permitted to a non root user

Additional info:

Comment 1 Alexandre Oliva 2002-02-24 18:54:42 UTC
I'd go ahead and suggest to make this pathname configurable in the httpd.conf
file, like all other pathnames that default to /var/run.

Meanwhile, here's a quick work-around: copy /usr/sbin/httpd elsewhere, then
change occurrences of /var/run in it to say /tmp/run (make sure it retains the
same length).  Then, create /tmp/run as the user who runs httpd and you're done.

Comment 2 Ville Skyttä 2002-06-13 18:47:02 UTC
Applies to Red Hat 7.3 too, and is pretty damn annoying.  What's the status of 
this? 


Comment 3 Joe Orton 2004-09-21 10:06:47 UTC

*** This bug has been marked as a duplicate of 37233 ***

Comment 4 Red Hat Bugzilla 2006-02-21 18:48:05 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.