php.net |  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
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 !
Your email address:
MUST BE VALID
Solve the problem:
4 + 33 = ?
Subscribe to this entry?

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

<?
chdir("/home/foo_alfa");
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-19 18:43 UTC] iliaa@php.net
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] iliaa@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Wed Nov 13 08:01:29 2024 UTC