|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44340 Openbasedir and symlinks
Submitted: 2008-03-05 16:44 UTC Modified: 2008-03-06 08:22 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: nahuel dot angelinetti at revues dot org Assigned:
Status: Not a bug Package: Safe Mode/open_basedir
PHP Version: 5.2.5 OS: Debian etch
Private report: No CVE-ID: None
 [2008-03-05 16:44 UTC] nahuel dot angelinetti at revues dot org
When we have an openbasedir like :

and subdirs like :

When my script is running in /www/something/mysite/ and I want to create a link in the "another" directory to a file in "mysite" (../../myfile.html)

Reproduce code:
execute in /www/something/mysite/



my target is in :

and mylink is in :

Expected result:
Just to create links that source and destination ARE in the openbasedir !

Actual result:
It say I'm out of the openbasedir, but the link isn't.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-05 23:43 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

The link itself is outside of the allowable dir, hence the error.
 [2008-03-06 08:22 UTC] nahuel dot angelinetti at revues dot org
No, the link IS in the open_basedir. The link created create this link :
/www/something/mysite/yourstuff/another/mylink => ../../mytarget.html

And not :
/www/something/mysite/mylink => ../../mytarget.html

And the problem is it works well without open_basedir(and no link is pointing outside the open_basedir).
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Aug 10 17:01:25 2020 UTC