|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21095 symlink and chroot
Submitted: 2002-12-19 06:11 UTC Modified: 2002-12-29 14:32 UTC
From: busia at tiscali dot it Assigned:
Status: Wont fix Package: Filesystem function related
PHP Version: 4.3.0RC3 OS: Redhat 7.2
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.
Bug Type:
From: busia at tiscali dot it
New email:
PHP Version: OS:


 [2002-12-19 06:11 UTC] busia at tiscali dot it
if I use

symlinks("../foo", "bar");

the symlink that is created in /home/foo_alfa is 
bar -> /home/foo

ant not
bar -> ../foo

how expected

this is a problem because I use chroot jails for ftp and the file became not accessible.

Andrea Busia


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-19 18:43 UTC]
Are you using PHP with thread safety enabled?
 [2002-12-20 06:10 UTC] busia at tiscali dot it
Yes I use php with thread safe enabled, I'm using Apache 2.0.43 with worker MPM.
 [2002-12-29 14:32 UTC]
Because in thread safe mode PHP does not actually change directories making a symlink on relative paths will often fail if any chdir() calls are found inside the script. Therefor when ZTS is used symlinks are always done on FULL paths.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Sep 28 15:01:25 2023 UTC