Bug #18500: Safe mode: php reports wrong uid on file

From: Date: Tue, 23 Jul 2002 16:31:41 +0000
Subject: Bug #18500: Safe mode: php reports wrong uid on file
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-14904@lists.php.net to get a copy of this message
From:             b.courtin@t-online.net
Operating system: Solaris 2.8
PHP version:      4.2.1
PHP Bug Type:     PHP options/info functions
Bug description:  Safe mode: php reports wrong uid on file

Hi,

when using SAFE_MODE = ON, php reports a wrong uid on a file to be served.


It reports file has uid=1 althought it should report (and therefore serve
the page) uid=2003.

Details: I will get the following error:

--------
[23-Jul-2002 17:47:06] PHP Warning:  SAFE MODE Restriction in effect.  The
script whose uid/gid is 1/2003 is not allowed to access
/a/b/c/d/e/partner_sets.inc owned by uid/gid 2003/1082 in
/w/x/y/z/login_tol.html on line 13
[23-Jul-2002 17:47:06] PHP Fatal error:  Failed opening required
'/a/b/c/d/e/partner_sets.inc' (include_path='.:/opt/php-4.2.1/lib/php') in
/w/x/y/z/login_tol.html on line 13
---------

Where "/a/b/c/d/e/partner_sets.inc" is included from
"/w/x/y/z/login_tol.html" which is part of a frame of "/w/x/y/index.html".
(<frame src="/z/login_tol.html"...>)

It seems that the uid which is reported is wrong (1) and the gid wich is
reported (2003) is the uid which should be reported (see below).

File ownership/permissions are as follows:
--------------------------------------------

ls -la /w/x/y/index.html
-rw-r-----   1 webadmin httpd       3106 Nov  2  2001 /w/x/y/index.html

ls -la  /w/x/y/z/login_tol.html
-rw-r-----   1 webadmin httpd      15343 Apr 15 10:56
/w/x/y/z/login_tol.html

ls -la  /a/b/c/d/e/partner_sets.inc
-rwxr-----   1 webadmin httpd        897 Feb 26 20:20
/a/b/c/d/e/partner_sets.inc


User / group IDs are:
-----------------------
# id httpd
uid=2002(httpd) gid=1082(httpd)

# id webadmin
uid=2003(webadmin) gid=1082(httpd)


The apache server is running as uid/group httpd/httpd.

Kind regards,
Bert Courtin
-- 
Edit bug report at http://bugs.php.net/?id=18500&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=18500&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=18500&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=18500&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=18500&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18500&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=18500&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=18500&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=18500&r=submittedtwice
register_globals:    http://bugs.php.net/fix.php?id=18500&r=globals



Thread (11 messages)

« previous php.bugs (#14904) next »