Question

Running a VM with CentOS 5.7 with typical httpd install.

I'm trying to write a file to a folder outside of /var/www/html, lets say in /var/somedir

  • I've chmoded somedir with 777
  • I chowned it to apache:apache (root:apache didn't work either)
  • PHP's safe_mode is off
  • PHP's doc_root is empty (i.e. doc_root =)

I can't use rename() to move something out of the doc root and I can't use fwrite() to create a file outside of it either.

Just to verify, I exec'd whoami from a php file and it echo'd/returned apache when accessed in the browser.

I think I've hit google with about 200 searchs about this so far and I guess I'm still missing something.

Was it helpful?

Solution

Turns out that selinux was in fact enabled although my "linux guy" assured me that it was not!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top