Bug 814990

Summary: Error in php applications: Permission denied: mod_mime_magic: can't read magic file
Product: OKD Reporter: Nam Duong <nduong>
Component: ContainersAssignee: Kenny Woodson <kwoodson>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: bmeng, jofernan, mpatel, twiest
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-27 20:46:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Nam Duong 2012-04-21 22:27:21 UTC
Description of problem:
This error comes up immediately after starting up a php application:
[Sat Apr 21 18:24:55 2012] [error] (13)Permission denied: mod_mime_magic: can't read magic file /var/lib/stickshift/8d508df6e4d8434cbdbb54cd3b3ad1b1/test/conf/magic

Steps to reproduce:
1) rhc app create -a test -t php-5.3
2) rhc app tail -a test

Comment 1 Mike McGrath 2012-04-23 15:41:36 UTC
Kenny, the fix here is to add o+x to /etc/httpd/conf/ (this will make it so people can't look at what's in that directory, but they could read /etc/httpd/conf/magic.  We do, however, want to make sure they cannot read /etc/httpd/conf/httpd so it should not be world readable (and it isn't today)

Comment 2 Kenny Woodson 2012-04-23 17:20:57 UTC
I followed Mike's advice in comment #1 and changed the permissions on the dirs to 0751.  Here is the following output from my application after creation:

rhc app tail -a test             
Password: 
Attempting to tail files: test/logs/*
Use ctl + c to stop

Warning: Permanently added 'test-kwoodson.rhcloud.com,23.22.17.22' (RSA) to the list of known hosts.
[Mon Apr 23 13:13:59 2012] [notice] SELinux policy enabled; httpd running as context system_u:system_r:libra_t:s0:c1,c11
[Mon Apr 23 13:13:59 2012] [notice] mod_bw : Memory Allocated 32 bytes (each conf takes 32 bytes)
[Mon Apr 23 13:13:59 2012] [notice] mod_bw : Version 0.8 - Initialized [1 Confs]
[Mon Apr 23 13:13:59 2012] [notice] Apache/2.2.15 (Unix) PHP/5.3.3 configured -- resuming normal operations



This appears to be fixed.

Comment 3 Thomas Wiest 2012-04-25 18:32:48 UTC
I have verified that the fix described in comment 1 was added to our configuration management by Kenny, and has been applied to both STG and PROD.

Moving to ON_QA.

Comment 4 Meng Bo 2012-04-26 02:05:17 UTC
checked on devenv-stage_176,
issue has been fixed.