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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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

<?
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: Sun Dec 22 05:01:30 2024 UTC