php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18795 open_basedir does not work correctly
Submitted: 2002-08-07 17:10 UTC Modified: 2005-01-31 22:58 UTC
From: ilia at prohost dot org Assigned:
Status: Not a bug Package: Safe Mode/open_basedir
PHP Version: 4CVS-2002-08-07 OS: Linux 2.4.19
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ilia at prohost dot org
New email:
PHP Version: OS:

 

 [2002-08-07 17:10 UTC] ilia at prohost dot org
open_basedir directive does not allow operation within directories owned by another users.
php.ini directives:
safe_mode on
open_basedir = /home/ilia/

/home/ilia/ is owned by ilia:ilia

test.php ( owned by ilia:ilia, run as root )
<?php
        mkdir('safe_mode1', 0755);
        mkdir('safe_mode1/safe_mode2', 0755);
?>
creation of safe_mode1 directory succeeds, however creation of 'safe_mode2' inside 'safe_mode1' fails with a safe_mode error about uids not matching.
Shouldn't open_basedir directive allow creation of files/directories anywhere above /home/ilia/ ?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-07 17:39 UTC] edink@php.net
No since open_basedir is independent of safe_mode. It is safe_mode which prevents opening files with different uid.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 06:01:30 2024 UTC