-1

I have a question: I mount folder /var/www/html/testram

mount -t tmpfs -o size=5m,mode=0755 tmpfs /var/www/html/testram

And put file index.php with some text. When I open site from web browser I don't see any text. What I have:

drwxrwxrwx.  2 root    root     60 May 25 17:42 testram  
-rwxrwxrwx.  1 root    root 132723 May 25 17:18 index.php

In logs i have errors:

PHP Warning:

Unknown: failed to open stream: Permission denied in Unknown on line 0

PHP Fatal error:  Unknown: Failed opening required '/var/www/html/testram/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0

I take an experiment and create just folder

drwxr-xr-x. 2 root root     22 May 25 17:25 testfolder

and create file

-rw-r--r--. 1 root root 132723 May 25 17:12 index.php 

with the same text.

And when I open this index.php from web browser I see text.

Why I don't see any text from index.php mounted in tmpfs.

Thank you

chown apache.apache -R testram does any effect

Alex Tartan
  • 6,736
  • 10
  • 34
  • 45
DeamonMV
  • 722
  • 1
  • 10
  • 19
  • i find this topic [link](http://superuser.com/questions/244245/how-do-i-get-apache-to-follow-symlinks) and try use `Options FollowSymLinks` in conf of httpd. but any effect I dont get – DeamonMV May 26 '15 at 12:25
  • maybe you need to know, I try do all of this in Amazon ec2 server – DeamonMV May 26 '15 at 14:06

1 Answers1

0

You should have symlinks enabled in your httpd.conf or .htaccess:

Options +FollowSymlinks
umka
  • 1,655
  • 1
  • 12
  • 18