#18500 [Com]: Safe mode: php reports wrong uid on file
| From: | rohan at cs dot rmit dot edu dot au | Date: | Thu, 27 Feb 2003 00:39:01 +0000 |
| Subject: | #18500 [Com]: Safe mode: php reports wrong uid on file | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-34381@lists.php.net to get a copy of this message | ||
ID: 18500
Comment by: rohan at cs dot rmit dot edu dot au
Reported By: b dot courtin at t-online dot net
Status: No Feedback
Bug Type: PHP options/info functions
Operating System: Solaris 2.8
PHP Version: 4.2.1
New Comment:
Also suffering this bug in 4.3.1/apache 1.3.27
compiled using Sun workshop 7 on Solaris 8 Sparc
exact same errors, ie
reported uid always = 1
reported gid = file's uid
on all file operations fopen() include etc...
any progress on this ?
Previous Comments:
------------------------------------------------------------------------
[2002-12-30 14:28:27] westman dot 2 at osu dot edu
I have been working with trying to get safe_mode to work for almost a
week. I have used a number of versions for php, including the recently
released 4.3.0 and all of them are giving me this same error message.
I have searched the Internet (Google) as well as bugs.php.net, all to
no avail.
In fact, if I have safe_mode on, I am unable to include any file from
ANY directory, even the cwd, unless it is owned by 1 (even though "."
is enabled both in the include_path and in the safe_mode_include_dirs
statements in php.ini):
Warning: Unknown(): SAFE MODE Restriction in effect. The script whose
uid/gid is 1/5004 is not allowed to access ./prepend.php owned by
uid/gid 0/1 in Unknown
on line 0
Warning: Unknown(prepend.php): failed to create stream: No such file or
directory in Unknown on line 0
Warning: Unknown(): Failed opening 'prepend.php' for inclusion
(include_path='.:/opt/apache/php:/opt/apache/php/lib:/opt/apache/php/inc')
in Unknown on line 0
Is it possible that safe_mode just doesn't work on Solaris?
------------------------------------------------------------------------
[2002-11-09 01:00:07] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2002-10-24 12:19:21] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
Forget the pre1, use the snapshot. And if it really doesn't work,
update the version to '4.3.0-dev'.
------------------------------------------------------------------------
[2002-10-24 02:56:38] b dot courtin at t-online dot net
Hi,
first of all thank you for working on this bug.
Unfortunately I have to report that with php-4.3.0-pre1 the bug is
still there (see output below). Webserver used is apache-1.3.27 on
solaris 2.8 (bug also was there with apache-1.3.26).
PHP still reports "script with uid=1 ..." User id 1 belongs to:
bash-2.03$ id daemon: uid=1(daemon) gid=1(other). apache is started as
user webamdin, uid's and file permissions see below.
Kind regards,
Bert Courtin
---
[24-Okt-2002 09:39:55] PHP Warning: file_exists() [<a
href='http://www.php.net/function.file-exists'>function.file-exists</a>]:
SAFE MODE Restriction in effect. The script whose uid is 1 is not
allowed to access /a/b/c/d/e/f/g/themes_d.string owned by uid 2003 in
/w/x/y/z/main_uebersicht.html on line 124
bash-2.03$ ls -la /a/b/c/d/e/f/g/themes_d.string
-rw-r----- 1 webadmin httpd 10772 Feb 26 2002
/a/b/c/d/e/f/g/themes_d.string
bash-2.03$ ls -la /w/x/y/z/main_uebersicht.html
-rw-r----- 1 webadmin httpd 16111 Jun 19 17:53
/w/x/y/z/main_uebersicht.html
bash-2.03$ id webadmin
uid=2003(webadmin) gid=1083(web)
bash-2.03$ id httpd
uid=2002(httpd) gid=1082(httpd)
bash-2.03$ ps -ef | grep httpd | head -1
webadmin 20534 20514 0 09:37:58 ? 0:00
/opt/apache-1.3.27/daybyday/bin/httpd -DSSL
bash-2.03$
------------------------------------------------------------------------
[2002-10-15 01:00:04] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/18500
--
Edit this bug report at http://bugs.php.net/?id=18500&edit=1