Red Hat Bugzilla – Bug 814990
Error in php applications: Permission denied: mod_mime_magic: can't read magic file
Last modified: 2015-05-14 18:53:35 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
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)
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
Attempting to tail files: test/logs/*
Use ctl + c to stop
Warning: Permanently added 'test-kwoodson.rhcloud.com,22.214.171.124' (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.
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.
checked on devenv-stage_176,
issue has been fixed.