#49810 [NEW]: safe_mode uid/gid are always 0/1024
| From: | php-dev at micallef dot fr | Date: | Thu, 08 Oct 2009 08:48:13 +0000 |
| Subject: | #49810 [NEW]: safe_mode uid/gid are always 0/1024 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-143375@lists.php.net to get a copy of this message | ||
From: php-dev at micallef dot fr
Operating system: Solaris 10
PHP version: 5.2.11
PHP Bug Type: Safe Mode/open_basedir
Bug description: safe_mode uid/gid are always 0/1024
Description:
------------
Hello,
We have a Sparc T2000 with coolstack for apache (v2.2.9) and php 5.2.11.
When I activate safe_mode, we have this error :
Warning: Unknown: SAFE MODE Restriction in effect. The script whose
uid/gid is 1/1024 is not allowed to access /david/SHERPA/index.php owned by
uid/gid 1024/512 in Unknown on line 0
Warning: Unknown: failed to open stream: Permission denied in Unknown on
line 0
Fatal error: Unknown: Failed opening required '/test/php/index.php'
(include_path='.:/opt/php-5.2.11/includes') in Unknown on line 0
I suppose that de problem come with function php_getuid and php_getgid.
I have done same test on RHEL_5 and I haven't any problem.
Do you have a idea ?
Reproduce code:
---------------
<?php
//echo "teste";
echo "uid = " . getmyuid() . "\n";
echo "gid = " . getmygid() . "\n";
//echo file_get_contents('/etc/passwd');
//echo file_get_contents('test.txt');
//phpinfo();
?>
Expected result:
----------------
Warning: Unknown: SAFE MODE Restriction in effect. The script whose
uid/gid is 1/1024 is not allowed to access /david/SHERPA/index.php owned by
uid/gid 1024/512 in Unknown on line 0
Warning: Unknown: failed to open stream: Permission denied in Unknown on
line 0
Fatal error: Unknown: Failed opening required '/test/php/index.php'
(include_path='.:/opt/php-5.2.11/includes') in Unknown on line 0
--
Edit bug report at http://bugs.php.net/?id=49810&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49810&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49810&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49810&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=49810&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49810&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=49810&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=49810&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=49810&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=49810&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=49810&r=support
Expected behavior: http://bugs.php.net/fix.php?id=49810&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=49810&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=49810&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=49810&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49810&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49810&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=49810&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=49810&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=49810&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=49810&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=49810&r=mysqlcfg