Safe mode and directory permission
| From: | Rudolf Wolf | Date: | Mon, 23 Sep 2002 08:20:10 +0000 |
| Subject: | Safe mode and directory permission | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-117254@lists.php.net to get a copy of this message | ||
Hello,
I'm working with Safe mode and I have a big trouble how the PHP is behaved. I have the web root
and under them is directory, where my scripts are. This is my situation:
rwxr-xr-x www www /var/www/htdocs .... Web root
rwxr-xr-x www www /var/www/htdocs/test .... PHP scripts
rw-r--r-- user user /var/www/htdocs/test/safe.php .... script
<?php
readfile("noowner");
readfile("owner");
?>
rw-r--r-- abc abc /var/www/htdocs/test/noowner.php .... script
rw-r--r-- user user /var/www/htdocs/test/owener.php .... script
And everything is working OK. That mean the "noowner" file is not included in script. BUT
I need to change the owner of directory to user USER and after that change, the file
"noowner" is included in spite of the user is different.
New situation:
rwxr-xr-x www www /var/www/htdocs .... Web root
rwxr-xr-x user user /var/www/htdocs/test .... PHP scripts
rw-r--r-- user user /var/www/htdocs/test/safe.php .... script
<?php
readfile("noowner");
readfile("owner");
?>
rw-r--r-- abc abc /var/www/htdocs/test/noowner.php .... script
rw-r--r-- user user /var/www/htdocs/test/owener.php .... script
My configuration: Apache 2.0.40 and PHP 4.2.3, the same problem on Apache 2.0.39 and PHP 4.2.2.
Do you know, where the problem is?
Thanks,
Rudolf Wolf.