|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
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 )
        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/ ?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-07 17:39 UTC]
No since open_basedir is independent of safe_mode. It is safe_mode which prevents opening files with different uid.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Jul 12 06:01:25 2020 UTC