|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
36 - 30 = ?
Subscribe to this entry?

 [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 21 15:01:24 2023 UTC