Bug 814990 - Error in php applications: Permission denied: mod_mime_magic: can't read magic file
Error in php applications: Permission denied: mod_mime_magic: can't read mag...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Kenny Woodson
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-21 18:27 EDT by Nam Duong
Modified: 2015-05-14 18:53 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-27 16:46:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nam Duong 2012-04-21 18:27:21 EDT
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 11:41:36 EDT
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 13:20:57 EDT
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 14:32:48 EDT
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-25 22:05:17 EDT
checked on devenv-stage_176,
issue has been fixed.

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