php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #55271 open_basedir_include_dir
Submitted: 2011-07-23 09:04 UTC Modified: 2021-05-30 04:22 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: spamik at yum dot pl Assigned: cmb (profile)
Status: No Feedback Package: Safe Mode/open_basedir
PHP Version: 5.3.6 OS:
Private report: No CVE-ID: None
 [2011-07-23 09:04 UTC] spamik at yum dot pl
Description:
------------
I'd like to propose making new php.ini var - open_basedir_include_dir - like 
safe_mode_include_dir , which would allow accessing one dir (files only in it) 
when open_basedir is set to other dir. Usual aplication of this would be "/tmp".

Since 5.3.x php allows tightening open_basedir. However tempnam() function 
(http://www.php.net/manual/pl/function.tempnam.php) does require as first 
parameter dir name. It does not take it from any php.ini var. So programmers had 
to hardcode in almost every program something like tempnam("/tmp",.... 
This makes open_basedir tightening useless as /tmp will remain unaccessible so 
tempnam() will fails. Solution would be open_basedir_include_dir ...



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-05-20 15:27 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-05-20 15:27 UTC] cmb@php.net
Are you aware that openbase_dir can be set to a list of
directories (like PATH)?
 [2021-05-30 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC