php apache SELinux problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a web page that calls a file, default.php. The web page works fine on a server with SELinux turned off, but not on one with enforcing turned on. The php calls in the page are ignored. The errors in the logs are like this:

[client 10.x.x.x] PHP Warning: main(php/defaults.php): failed to open stream: Permission denied in /home/httpd/index.php on line 3 [client 10.x.x.x] PHP Warning: main(): Failed opening 'php/defaults.php' for inclusion (include_path='.:/usr/share/pear') in /home/httpd/index.php on line 3

The permissions on the files are:

-rw-rw-r--  1 root root  8299 Feb 21 10:19 php/defaults.php
-rw-rw-r--  1 root root 4617 Feb 21 10:31 index.php

The SELinux settings are:

-rw-rw-r--  root   root   system_u:object_r:httpd_sys_content_t php/defaults.php
-rw-rw-r--  root   root   system_u:object_r:httpd_sys_content_t index.php

The first three lines of index.php looks like this:

<?php
$relative_path_to_php = "php/"; //*relative* path from *this* page to php directory
  include($relative_path_to_php."defaults.php");


Any thoughts on why I'm having this problem?

Bill

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux